From 8192031e831c6c68a9547df3c5ab6c0601c7d6a9 Mon Sep 17 00:00:00 2001 From: "Eliel C. Sardanons" Date: Thu, 4 Dec 2008 13:45:32 +0000 Subject: Added XML documentation for the following AGI commands: - get option - get variable - hangup - noop git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160896 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_agi.c | 78 +++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 23 deletions(-) diff --git a/res/res_agi.c b/res/res_agi.c index 4ce871ec2..c563aefed 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -222,6 +222,57 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Example return code: 200 result=1 (testvariable) + + + Stream file, prompt for DTMF, with timeout. + + + + + + + + Behaves similar to STREAM FILE but used with a timeout option. + + + stream file + + + + + Gets a channel variable. + + + + + + Returns 0 if variablename is not set. + Returns 1 if variablename is set and returns + the variable in parentheses. + Example return code: 200 result=1 (testvariable) + + + + + Hangup the current channel. + + + + + + Hangs up the specified channel. If no channel name is given, hangs + up the current channel + + + + + Does nothing. + + + + Does nothing. + + Enable/Disable Music on hold generator @@ -2190,12 +2241,6 @@ static char usage_verbose[] = " is the the verbose level (1-4)\n" " Always returns 1.\n"; -static char usage_getvariable[] = -" Usage: GET VARIABLE \n" -" Returns 0 if is not set. Returns 1 if \n" -" is set and returns the variable in parentheses.\n" -" example return code: 200 result=1 (testvariable)\n"; - static char usage_setvariable[] = " Usage: SET VARIABLE \n"; @@ -2203,11 +2248,6 @@ static char usage_setcallerid[] = " Usage: SET CALLERID \n" " Changes the callerid of the current channel.\n"; -static char usage_hangup[] = -" Usage: HANGUP []\n" -" Hangs up the specified channel.\n" -" If no channel name is given, hangs up the current channel\n"; - static char usage_waitfordigit[] = " Usage: WAIT FOR DIGIT \n" " Waits up to 'timeout' milliseconds for channel to receive a DTMF digit.\n" @@ -2269,10 +2309,6 @@ static char usage_controlstreamfile[] = " extension must not be included in the filename.\n\n" " Note: ffchar and rewchar default to * and # respectively.\n"; -static char usage_getoption[] = -" Usage: GET OPTION [timeout]\n" -" Behaves similar to STREAM FILE but used with a timeout option.\n"; - static char usage_saynumber[] = " Usage: SAY NUMBER [gender]\n" " Say a given number, returning early if any of the given DTMF digits\n" @@ -2363,10 +2399,6 @@ static char usage_break_aagi[] = " Usage: ASYNCAGI BREAK\n" " Break the Async AGI loop.\n"; -static char usage_noop[] = -" Usage: NoOp\n" -" Does nothing.\n"; - static char usage_speechcreate[] = " Usage: SPEECH CREATE \n" " Create a speech object to be used by the other Speech AGI commands.\n"; @@ -2412,10 +2444,10 @@ static struct agi_command commands[] = { { { "exec", NULL }, handle_exec, NULL, NULL, 1 }, { { "get", "data", NULL }, handle_getdata, NULL, NULL, 0 }, { { "get", "full", "variable", NULL }, handle_getvariablefull, NULL, NULL, 1 }, - { { "get", "option", NULL }, handle_getoption, "Stream file, prompt for DTMF, with timeout", usage_getoption , 0 }, - { { "get", "variable", NULL }, handle_getvariable, "Gets a channel variable", usage_getvariable , 1 }, - { { "hangup", NULL }, handle_hangup, "Hangup the current channel", usage_hangup , 0 }, - { { "noop", NULL }, handle_noop, "Does nothing", usage_noop , 1 }, + { { "get", "option", NULL }, handle_getoption, NULL, NULL, 0 }, + { { "get", "variable", NULL }, handle_getvariable, NULL, NULL, 1 }, + { { "hangup", NULL }, handle_hangup, NULL, NULL, 0 }, + { { "noop", NULL }, handle_noop, NULL, NULL, 1 }, { { "receive", "char", NULL }, handle_recvchar, "Receives one character from channels supporting it", usage_recvchar , 0 }, { { "receive", "text", NULL }, handle_recvtext, "Receives text from channels supporting it", usage_recvtext , 0 }, { { "record", "file", NULL }, handle_recordfile, "Records to a given file", usage_recordfile , 0 }, -- cgit v1.2.3