71 unsigned char cpeid[4];
74 int width, height, buttons;
78 for (x = 0; x < 4; x++)
81 strcpy(data[0],
"** CPE Info **");
82 strcpy(data[1],
"Identifying CPE...");
83 strcpy(data[2],
"Please wait...");
90 ast_verb(3,
"Got CPEID of '%02x:%02x:%02x:%02x' on '%s'\n",
91 (
unsigned)cpeid[0], (
unsigned)cpeid[1], (
unsigned)cpeid[2],
92 (
unsigned)cpeid[3], chan->
name);
95 strcpy(data[1],
"Measuring CPE...");
96 strcpy(data[2],
"Please wait...");
100 ast_verb(3,
"CPE has %d lines, %d columns, and %d buttons on '%s'\n", height, width, buttons, chan->
name);
106 snprintf(data[1], 80,
"CPEID: %02x:%02x:%02x:%02x",
107 (
unsigned)cpeid[0], (
unsigned)cpeid[1],
108 (
unsigned)cpeid[2], (
unsigned)cpeid[3]);
110 strcpy(data[1],
"CPEID Unknown");
112 snprintf(data[2], 80,
"Geom: %dx%d, %d buttons", width, height, buttons);
114 strcpy(data[2],
"Geometry unknown");
115 strcpy(data[3],
"Press # to exit");
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data)
Check if scripts for a given app are already loaded. Version may be -1, if any version is okay...
int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice)
#define ast_verb(level,...)
static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)
const ast_string_field name
int ast_waitfordigit(struct ast_channel *c, int ms)
Waits for a digit.
int ast_adsi_unload_session(struct ast_channel *chan)
int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)