Asterisk - The Open Source Telephony Project GIT-master-3dae2cf
|
AGI Extension interfaces - Asterisk Gateway Interface. More...
Go to the source code of this file.
Data Structures | |
struct | agi_command |
struct | agi_state |
Typedefs | |
typedef struct agi_state | AGI |
typedef struct agi_command | agi_command |
Functions | |
int | ast_agi_register (struct ast_module *mod, agi_command *cmd) |
Registers an AGI command. More... | |
int | ast_agi_register_multiple (struct ast_module *mod, struct agi_command *cmd, unsigned int len) |
Registers a group of AGI commands, provided as an array of struct agi_command entries. More... | |
int | ast_agi_send (int fd, struct ast_channel *chan, char *fmt,...) |
Sends a string of text to an application connected via AGI. More... | |
int | ast_agi_unregister (agi_command *cmd) |
Unregisters an AGI command. More... | |
int | ast_agi_unregister_multiple (struct agi_command *cmd, unsigned int len) |
Unregisters a group of AGI commands, provided as an array of struct agi_command entries. More... | |
AGI Extension interfaces - Asterisk Gateway Interface.
Definition in file agi.h.
typedef struct agi_command agi_command |
int ast_agi_register | ( | struct ast_module * | mod, |
agi_command * | cmd | ||
) |
Registers an AGI command.
mod | Pointer to the module_info structure for the module that is registering the command |
cmd | Pointer to the descriptor for the command |
1 | on success |
0 | the command is already registered |
AST_OPTIONAL_API_UNAVAILABLE | the module is not loaded. |
Definition at line 3823 of file res_agi.c.
References ast_join, AST_LIST_INSERT_TAIL, ast_log, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, AST_STATIC_DOC, ast_strdup, ast_strlen_zero(), ast_verb, AST_XML_DOC, ast_xmldoc_build_description(), ast_xmldoc_build_seealso(), ast_xmldoc_build_synopsis(), ast_xmldoc_build_syntax(), find_command(), LOG_WARNING, MAX_CMD_LEN, and NULL.
Referenced by ast_agi_register_multiple(), AST_TEST_DEFINE(), and load_module().
int ast_agi_register_multiple | ( | struct ast_module * | mod, |
struct agi_command * | cmd, | ||
unsigned int | len | ||
) |
Registers a group of AGI commands, provided as an array of struct agi_command entries.
mod | Pointer to the module_info structure for the module that is registering the commands |
cmd | Pointer to the first entry in the array of command descriptors |
len | Length of the array (use the ARRAY_LEN macro to determine this easily) |
Definition at line 3903 of file res_agi.c.
References ast_agi_register(), ast_agi_unregister(), len(), and agi_command::mod.
Referenced by load_module().
int ast_agi_send | ( | int | fd, |
struct ast_channel * | chan, | ||
char * | fmt, | ||
... | |||
) |
Sends a string of text to an application connected via AGI.
fd | The file descriptor for the AGI session (from struct agi_state) |
chan | Pointer to an associated Asterisk channel, if any |
fmt | printf-style format string |
Definition at line 1481 of file res_agi.c.
References agi_buf, AGI_BUF_INITSIZE, agidebug, ast_carefulwrite(), ast_channel_name(), ast_log, ast_str_buffer(), ast_str_set_va(), ast_str_strlen(), ast_str_thread_get(), ast_verbose(), buf, and LOG_ERROR.
Referenced by agi_handle_command(), handle_answer(), handle_asyncagi_break(), handle_autohangup(), handle_channelstatus(), handle_controlstreamfile(), handle_dbdel(), handle_dbdeltree(), handle_dbget(), handle_dbput(), handle_exec(), handle_getdata(), handle_getoption(), handle_getvariable(), handle_getvariablefull(), handle_gosub(), handle_hangup(), handle_noop(), handle_recordfile(), handle_recvchar(), handle_recvtext(), handle_sayalpha(), handle_saydate(), handle_saydatetime(), handle_saydigits(), handle_saynumber(), handle_sayphonetic(), handle_saytime(), handle_sendimage(), handle_sendtext(), handle_setcallerid(), handle_setcontext(), handle_setextension(), handle_setmusic(), handle_setpriority(), handle_setvariable(), handle_speechactivategrammar(), handle_speechcreate(), handle_speechdeactivategrammar(), handle_speechdestroy(), handle_speechloadgrammar(), handle_speechrecognize(), handle_speechset(), handle_speechunloadgrammar(), handle_streamfile(), handle_tddmode(), handle_verbose(), handle_waitfordigit(), launch_netscript(), run_agi(), and setup_env().
int ast_agi_unregister | ( | agi_command * | cmd | ) |
Unregisters an AGI command.
cmd | Pointer to the descriptor for the command |
Definition at line 3867 of file res_agi.c.
References ast_free, ast_join, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, AST_XML_DOC, agi_command::docsrc, agi_command::list, MAX_CMD_LEN, NULL, agi_command::seealso, agi_command::summary, agi_command::syntax, and agi_command::usage.
Referenced by ast_agi_register_multiple(), ast_agi_unregister_multiple(), AST_TEST_DEFINE(), and unload_module().
int ast_agi_unregister_multiple | ( | struct agi_command * | cmd, |
unsigned int | len | ||
) |
Unregisters a group of AGI commands, provided as an array of struct agi_command entries.
cmd | Pointer to the first entry in the array of command descriptors |
len | Length of the array (use the ARRAY_LEN macro to determine this easily) |
Definition at line 3933 of file res_agi.c.
References ast_agi_unregister(), and len().
Referenced by unload_module().