54static char *
app =
"GetCPEID";
70 unsigned char cpeid[4];
73 int width, height, buttons;
77 for (x = 0; x < 4; x++)
80 strcpy(data[0],
"** CPE Info **");
81 strcpy(data[1],
"Identifying CPE...");
82 strcpy(data[2],
"Please wait...");
89 ast_verb(3,
"Got CPEID of '%02hhx:%02hhx:%02hhx:%02hhx' on '%s'\n",
93 strcpy(data[1],
"Measuring CPE...");
94 strcpy(data[2],
"Please wait...");
98 ast_verb(3,
"CPE has %d lines, %d columns, and %d buttons on '%s'\n", height, width, buttons,
ast_channel_name(chan));
104 snprintf(data[1], 80,
"CPEID: %02hhx:%02hhx:%02hhx:%02hhx",
105 cpeid[0], cpeid[1], cpeid[2], cpeid[3]);
107 strcpy(data[1],
"CPEID Unknown");
109 snprintf(data[2], 80,
"Geom: %dx%d, %d buttons", width, height, buttons);
111 strcpy(data[2],
"Geometry unknown");
112 strcpy(data[3],
"Press # to exit");
144 .
requires =
"res_adsi",
ADSI Support (built upon Caller*ID)
int ast_adsi_unload_session(struct ast_channel *chan)
int ast_adsi_print(struct ast_channel *chan, char **lines, int *align, int voice)
Display some stuff on the screen.
int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice)
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_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
static const struct adsi_event justify[]
static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)
static int cpeid_exec(struct ast_channel *chan, const char *idata)
static int load_module(void)
static int unload_module(void)
Asterisk main include file. File version handling, generic pbx functions.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
General Asterisk PBX channel definitions.
int ast_waitfordigit(struct ast_channel *c, int ms)
Waits for a digit.
const char * ast_channel_name(const struct ast_channel *chan)
Generic File Format Support. Should be included by clients of the file handling routines....
#define ast_verb(level,...)
Asterisk locking-related definitions:
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_DEPRECATED
#define ASTERISK_GPL_KEY
The text the key() function should return.
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
Core PBX routines and definitions.
Main Channel structure associated with a channel.