diff --git a/res/res_agi.c b/res/res_agi.c
index 207befb7e6..3ef41169de 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -130,6 +130,32 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+
+ Sends audio file on channel and allows the listner to control the stream.
+
+
+
+ The file extension must not be included in the filename.
+
+
+
+
+ Defaults to *
+
+
+ Defaults to #
+
+
+
+
+ Send the given file, allowing playback to be controled by the given
+ digits, if any. Use double quotes for the digits if you wish none to be
+ permitted. Returns 0 if playback completes without a digit
+ being pressed, or the ASCII numerical value of the digit if one was pressed,
+ or -1 on error or if the channel was disconnected.
+
+
Removes database key/value
@@ -571,6 +597,199 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
Always returns 0.
+
+
+ Set channel dialplan priority.
+
+
+
+
+
+ Changes the priority for continuation upon exiting the application.
+ The priority must be a valid priority or label.
+
+
+
+
+ Sets a channel variable.
+
+
+
+
+
+
+ Sets a variable to the current channel.
+
+
+
+
+ Sends audio file on channel.
+
+
+
+ File name to play. The file extension must not be
+ included in the filename.
+
+
+ Use double quotes for the digits if you wish none to be
+ permitted.
+
+
+ If sample offset is provided then the audio will seek to sample
+ offset before play starts.
+
+
+
+ Send the given file, allowing playback to be interrupted by the given
+ digits, if any. Returns 0 if playback completes without a digit
+ being pressed, or the ASCII numerical value of the digit if one was pressed,
+ or -1 on error or if the channel was disconnected.
+
+
+ [control stream file]
+
+
+
+
+ Toggles TDD mode (for the deaf).
+
+
+
+
+
+
+
+
+
+
+ Enable/Disable TDD transmission/reception on a channel. Returns 1 if
+ successful, or 0 if channel is not TDD-capable.
+
+
+
+
+ Logs a message to the asterisk verbose log.
+
+
+
+
+
+
+ Sends message to the console via verbose
+ message system. level is the the verbose level (1-4).
+ Always returns 1
+
+
+
+
+ Waits for a digit to be pressed.
+
+
+
+
+
+ Waits up to timeout milliseconds for channel to
+ receive a DTMF digit. Returns -1 on channel failure, 0
+ if no digit is received in the timeout, or the numerical value of the ascii of the digit if
+ one is received. Use -1 for the timeout value if
+ you desire the call to block indefinitely.
+
+
+
+
+ Creates a speech object.
+
+
+
+
+
+ Create a speech object to be used by the other Speech AGI commands.
+
+
+
+
+ Sets a speech engine setting.
+
+
+
+
+
+
+ Set an engine-specific setting.
+
+
+
+
+ Destroys a speech object.
+
+
+
+
+ Destroy the speech object created by SPEECH CREATE.
+
+
+ [speech create]
+
+
+
+
+ Loads a grammar.
+
+
+
+
+
+
+ Loads the specified grammar as the specified name.
+
+
+
+
+ Unloads a grammar.
+
+
+
+
+
+ Unloads the specified grammar.
+
+
+
+
+ Activates a grammar.
+
+
+
+
+
+ Activates the specified grammar on the speech object.
+
+
+
+
+ Deactivates a grammar.
+
+
+
+
+
+ Deactivates the specified grammar on the speech object.
+
+
+
+
+ Recognizes speech.
+
+
+
+
+
+
+
+ Plays back given prompt while listening for
+ speech and dtmf.
+
+
***/
#define MAX_ARGS 128
@@ -2557,84 +2776,6 @@ static int handle_speechrecognize(struct ast_channel *chan, AGI *agi, int argc,
return RESULT_SUCCESS;
}
-static const char usage_verbose[] =
-" Usage: VERBOSE \n"
-" Sends to the console via verbose message system.\n"
-" is the the verbose level (1-4)\n"
-" Always returns 1.\n";
-
-static const char usage_setvariable[] =
-" Usage: SET VARIABLE \n";
-
-static const char usage_waitfordigit[] =
-" Usage: WAIT FOR DIGIT \n"
-" Waits up to 'timeout' milliseconds for channel to receive a DTMF digit.\n"
-" Returns -1 on channel failure, 0 if no digit is received in the timeout, or\n"
-" the numerical value of the ascii of the digit if one is received. Use -1\n"
-" for the timeout value if you desire the call to block indefinitely.\n";
-
-static const char usage_tddmode[] =
-" Usage: TDD MODE \n"
-" Enable/Disable TDD transmission/reception on a channel. Returns 1 if\n"
-" successful, or 0 if channel is not TDD-capable.\n";
-
-static const char usage_streamfile[] =
-" Usage: STREAM FILE [sample offset]\n"
-" Send the given file, allowing playback to be interrupted by the given\n"
-" digits, if any. Use double quotes for the digits if you wish none to be\n"
-" permitted. If sample offset is provided then the audio will seek to sample\n"
-" offset before play starts. Returns 0 if playback completes without a digit\n"
-" being pressed, or the ASCII numerical value of the digit if one was pressed,\n"
-" or -1 on error or if the channel was disconnected. Remember, the file\n"
-" extension must not be included in the filename.\n";
-
-static const char usage_controlstreamfile[] =
-" Usage: CONTROL STREAM FILE [skipms] [ffchar] [rewchr] [pausechr]\n"
-" Send the given file, allowing playback to be controled by the given\n"
-" digits, if any. Use double quotes for the digits if you wish none to be\n"
-" permitted. Returns 0 if playback completes without a digit\n"
-" being pressed, or the ASCII numerical value of the digit if one was pressed,\n"
-" or -1 on error or if the channel was disconnected. Remember, the file\n"
-" extension must not be included in the filename.\n\n"
-" Note: ffchar and rewchar default to * and # respectively.\n";
-
-static const char usage_setpriority[] =
-" Usage: SET PRIORITY \n"
-" Changes the priority for continuation upon exiting the application.\n"
-" The priority must be a valid priority or label.\n";
-
-static const char usage_speechcreate[] =
-" Usage: SPEECH CREATE \n"
-" Create a speech object to be used by the other Speech AGI commands.\n";
-
-static const char usage_speechset[] =
-" Usage: SPEECH SET \n"
-" Set an engine-specific setting.\n";
-
-static const char usage_speechdestroy[] =
-" Usage: SPEECH DESTROY\n"
-" Destroy the speech object created by SPEECH CREATE.\n";
-
-static const char usage_speechloadgrammar[] =
-" Usage: SPEECH LOAD GRAMMAR \n"
-" Loads the specified grammar as the specified name.\n";
-
-static const char usage_speechunloadgrammar[] =
-" Usage: SPEECH UNLOAD GRAMMAR \n"
-" Unloads the specified grammar.\n";
-
-static const char usage_speechactivategrammar[] =
-" Usage: SPEECH ACTIVATE GRAMMAR \n"
-" Activates the specified grammar on the speech object.\n";
-
-static const char usage_speechdeactivategrammar[] =
-" Usage: SPEECH DEACTIVATE GRAMMAR \n"
-" Deactivates the specified grammar on the speech object.\n";
-
-static const char usage_speechrecognize[] =
-" Usage: SPEECH RECOGNIZE []\n"
-" Plays back given prompt while listening for speech and dtmf.\n";
-
/*!
* \brief AGI commands list
*/
@@ -2670,21 +2811,21 @@ static struct agi_command commands[] = {
{ { "set", "context", NULL }, handle_setcontext, NULL, NULL, 0},
{ { "set", "extension", NULL }, handle_setextension, NULL, NULL, 0},
{ { "set", "music", NULL }, handle_setmusic, NULL, NULL, 0 },
- { { "set", "priority", NULL }, handle_setpriority, "Set channel dialplan priority", usage_setpriority , 0 },
- { { "set", "variable", NULL }, handle_setvariable, "Sets a channel variable", usage_setvariable , 1 },
- { { "stream", "file", NULL }, handle_streamfile, "Sends audio file on channel", usage_streamfile , 0 },
- { { "control", "stream", "file", NULL }, handle_controlstreamfile, "Sends audio file on channel and allows the listner to control the stream", usage_controlstreamfile , 0 },
- { { "tdd", "mode", NULL }, handle_tddmode, "Toggles TDD mode (for the deaf)", usage_tddmode , 0 },
- { { "verbose", NULL }, handle_verbose, "Logs a message to the asterisk verbose log", usage_verbose , 1 },
- { { "wait", "for", "digit", NULL }, handle_waitfordigit, "Waits for a digit to be pressed", usage_waitfordigit , 0 },
- { { "speech", "create", NULL }, handle_speechcreate, "Creates a speech object", usage_speechcreate, 0 },
- { { "speech", "set", NULL }, handle_speechset, "Sets a speech engine setting", usage_speechset, 0 },
- { { "speech", "destroy", NULL }, handle_speechdestroy, "Destroys a speech object", usage_speechdestroy, 1 },
- { { "speech", "load", "grammar", NULL }, handle_speechloadgrammar, "Loads a grammar", usage_speechloadgrammar, 0 },
- { { "speech", "unload", "grammar", NULL }, handle_speechunloadgrammar, "Unloads a grammar", usage_speechunloadgrammar, 1 },
- { { "speech", "activate", "grammar", NULL }, handle_speechactivategrammar, "Activates a grammar", usage_speechactivategrammar, 0 },
- { { "speech", "deactivate", "grammar", NULL }, handle_speechdeactivategrammar, "Deactivates a grammar", usage_speechdeactivategrammar, 0 },
- { { "speech", "recognize", NULL }, handle_speechrecognize, "Recognizes speech", usage_speechrecognize, 0 },
+ { { "set", "priority", NULL }, handle_setpriority, NULL, NULL, 0 },
+ { { "set", "variable", NULL }, handle_setvariable, NULL, NULL, 1 },
+ { { "stream", "file", NULL }, handle_streamfile, NULL, NULL, 0 },
+ { { "control", "stream", "file", NULL }, handle_controlstreamfile, NULL, NULL, 0 },
+ { { "tdd", "mode", NULL }, handle_tddmode, NULL, NULL, 0 },
+ { { "verbose", NULL }, handle_verbose, NULL, NULL, 1 },
+ { { "wait", "for", "digit", NULL }, handle_waitfordigit, NULL, NULL, 0 },
+ { { "speech", "create", NULL }, handle_speechcreate, NULL, NULL, 0 },
+ { { "speech", "set", NULL }, handle_speechset, NULL, NULL, 0 },
+ { { "speech", "destroy", NULL }, handle_speechdestroy, NULL, NULL, 1 },
+ { { "speech", "load", "grammar", NULL }, handle_speechloadgrammar, NULL, NULL, 0 },
+ { { "speech", "unload", "grammar", NULL }, handle_speechunloadgrammar, NULL, NULL, 1 },
+ { { "speech", "activate", "grammar", NULL }, handle_speechactivategrammar, NULL, NULL, 0 },
+ { { "speech", "deactivate", "grammar", NULL }, handle_speechdeactivategrammar, NULL, NULL, 0 },
+ { { "speech", "recognize", NULL }, handle_speechrecognize, NULL, NULL, 0 },
};
static AST_RWLIST_HEAD_STATIC(agi_commands, agi_command);