Asterisk - The Open Source Telephony Project
21.4.1
|
Program Asterisk ADSI Scripts into phone. More...
#include "asterisk.h"
#include <netinet/in.h>
#include <ctype.h>
#include "asterisk/paths.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/adsi.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
Go to the source code of this file.
Data Structures | |
struct | adsi_display |
struct | adsi_event |
struct | adsi_flag |
struct | adsi_key_cmd |
struct | adsi_script |
struct | adsi_soft_key |
struct | adsi_state |
struct | adsi_subscript |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | adsi_exec (struct ast_channel *chan, const char *data) |
static int | adsi_process (struct adsi_script *state, char *buf, const char *script, int lineno) |
static int | adsi_prog (struct ast_channel *chan, const char *script) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | clearcbone (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static int | cleardisplay (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static int | clearflag (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | cleartimer (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static struct adsi_script * | compile_script (const char *script) |
static int | digitcollect (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static int | digitdirect (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static char * | get_token (char **buf, const char *script, int lineno) |
static struct adsi_display * | getdisplaybyname (struct adsi_script *state, char *name, const char *script, int lineno, int create) |
static int | geteventbyname (char *name) |
static struct adsi_flag * | getflagbyname (struct adsi_script *state, char *name, const char *script, int lineno, int create) |
static int | getjustifybyname (char *name) |
static struct adsi_soft_key * | getkeybyname (struct adsi_script *state, char *name, const char *script, int lineno) |
static struct adsi_state * | getstatebyname (struct adsi_script *state, char *name, const char *script, int lineno, int create) |
static struct adsi_subscript * | getsubbyname (struct adsi_script *state, char *name, const char *script, int lineno) |
static int | goto_line (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | goto_line_rel (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | load_module (void) |
Load the module. More... | |
static int | onevent (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | process_opcode (struct adsi_subscript *sub, char *code, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | process_returncode (struct adsi_soft_key *key, char *code, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | process_token (void *out, char *src, int maxlen, int argtype) |
static int | send_delay (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | send_dtmf (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | set_state (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static int | setflag (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | showdisplay (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | showkeys (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | starttimer (char *buf, char *name, int id, char *args, struct adsi_script *istate, const char *script, int lineno) |
static int | subscript (char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Asterisk ADSI Programming Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_DEPRECATED, .load = load_module, .unload = unload_module, .requires = "res_adsi", } |
static const char | app [] = "ADSIProg" |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const struct adsi_event | events [] |
static const struct adsi_event | justify [] |
static const struct adsi_key_cmd | kcmds [] |
static const struct adsi_key_cmd | opcmds [] |
static char * | validdtmf = "123456789*0#ABCD" |
Program Asterisk ADSI Scripts into phone.
Definition in file app_adsiprog.c.
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 1605 of file app_adsiprog.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and ast_register_application_xml.