From 90ddc9b84f9ec7583fd3db584f010a1659c8cc50 Mon Sep 17 00:00:00 2001 From: eliel Date: Mon, 1 Jun 2009 15:38:48 +0000 Subject: Move static documentation of E|Dead|AGI() application and manager action to XML. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198561 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_agi.c | 141 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 105 insertions(+), 36 deletions(-) (limited to 'res/res_agi.c') diff --git a/res/res_agi.c b/res/res_agi.c index 3ef41169d..6c6e88290 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -790,6 +790,107 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") speech and dtmf. + + + Executes an AGI compliant application. + + + + + + + + + + Executes an Asterisk Gateway Interface compliant + program on a channel. AGI allows Asterisk to launch external programs written + in any language to control a telephony channel, play audio, read DTMF digits, + etc. by communicating with the AGI protocol on stdin and + stdout. As of 1.6.0, this channel will + not stop dialplan execution on hangup inside of this application. Dialplan + execution will continue normally, even upon hangup until the AGI application + signals a desire to stop (either by exiting or, in the case of a net script, by + closing the connection). A locally executed AGI script will receive SIGHUP on + hangup from the channel except when using DeadAGI. A fast AGI server will + correspondingly receive a HANGUP in OOB data. Both of these signals may be disabled + by setting the AGISIGHUP channel variable to no + before executing the AGI application. + Use the CLI command agi show commnands to list available agi + commands. + This application sets the following channel variable upon completion: + + + The status of the attempt to the run the AGI script + text string, one of: + + + + + + + + + EAGI + DeadAGI + + + + + Executes an EAGI compliant application. + + + + + + + Using 'EAGI' provides enhanced AGI, with incoming audio available out of band + on file descriptor 3. + + + + + AGI + DeadAGI + + + + + Executes AGI on a hungup channel. + + + + + + + + + + + AGI + EAGI + + + + + Add an AGI command to execute by Async AGI. + + + + + Channel that is currently in Async AGI. + + + Application to execute. + + + This will be sent back in CommandID header of AsyncAGI exec + event notification. + + + + Add an AGI command to the execute queue of the channel in Async AGI. + + ***/ #define MAX_ARGS 128 @@ -803,30 +904,6 @@ static char *eapp = "EAGI"; static char *deadapp = "DeadAGI"; -static char *synopsis = "Executes an AGI compliant application"; -static char *esynopsis = "Executes an EAGI compliant application"; -static char *deadsynopsis = "Executes AGI on a hungup channel"; - -static char *descrip = -" [E|Dead]AGI(command,args): Executes an Asterisk Gateway Interface compliant\n" -"program on a channel. AGI allows Asterisk to launch external programs written\n" -"in any language to control a telephony channel, play audio, read DTMF digits,\n" -"etc. by communicating with the AGI protocol on stdin and stdout.\n" -" As of 1.6.0, this channel will not stop dialplan execution on hangup inside\n" -"of this application. Dialplan execution will continue normally, even upon\n" -"hangup until the AGI application signals a desire to stop (either by exiting\n" -"or, in the case of a net script, by closing the connection).\n" -" A locally executed AGI script will receive SIGHUP on hangup from the channel\n" -"except when using DeadAGI. A fast AGI server will correspondingly receive a\n" -"HANGUP in OOB data. Both of these signals may be disabled by setting the\n" -"AGISIGHUP channel variable to \"no\" before executing the AGI application.\n" -" Using 'EAGI' provides enhanced AGI, with incoming audio available out of band\n" -"on file descriptor 3.\n\n" -" Use the CLI command 'agi show commnands' to list available agi commands.\n" -" This application sets the following channel variable upon completion:\n" -" AGISTATUS The status of the attempt to the run the AGI script\n" -" text string, one of SUCCESS | FAILURE | NOTFOUND | HANGUP\n"; - static int agidebug = 0; #define TONE_BLOCK_SIZE 200 @@ -913,14 +990,6 @@ static const struct ast_datastore_info agi_commands_datastore_info = { .destroy = agi_destroy_commands_cb }; -static const char mandescr_asyncagi[] = -"Description: Add an AGI command to the execute queue of the channel in Async AGI\n" -"Variables:\n" -" *Channel: Channel that is currently in Async AGI\n" -" *Command: Application to execute\n" -" CommandID: comand id. This will be sent back in CommandID header of AsyncAGI exec event notification\n" -"\n"; - static struct agi_cmd *get_agi_cmd(struct ast_channel *chan) { struct ast_datastore *store; @@ -3635,10 +3704,10 @@ static int load_module(void) no other commands have been registered yet */ (void) ast_agi_register_multiple(ast_module_info->self, commands, ARRAY_LEN(commands)); - ast_register_application(deadapp, deadagi_exec, deadsynopsis, descrip); - ast_register_application(eapp, eagi_exec, esynopsis, descrip); - ast_manager_register2("AGI", EVENT_FLAG_AGI, action_add_agi_cmd, "Add an AGI command to execute by Async AGI", mandescr_asyncagi); - return ast_register_application(app, agi_exec, synopsis, descrip); + ast_register_application_xml(deadapp, deadagi_exec); + ast_register_application_xml(eapp, eagi_exec); + ast_manager_register_xml("AGI", EVENT_FLAG_AGI, action_add_agi_cmd); + return ast_register_application_xml(app, agi_exec); } AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Asterisk Gateway Interface (AGI)", -- cgit v1.2.3