diff options
author | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2008-11-01 21:10:07 +0000 |
commit | 5b168ee34babe562be856ec8f1dd14c0abd7c1a5 (patch) | |
tree | 9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_talkdetect.c | |
parent | 1fef0f63bbbde9530837995c8790b839f73b74e7 (diff) |
Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format. Currently, a new format is available for
applications and dialplan functions. A good number of conversions to the new format
are also included.
For more information, see the following message to asterisk-dev:
http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_talkdetect.c')
-rw-r--r-- | apps/app_talkdetect.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c index 9bc5e84dd..a0236b8fc 100644 --- a/apps/app_talkdetect.c +++ b/apps/app_talkdetect.c @@ -39,21 +39,39 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/dsp.h" #include "asterisk/app.h" -static char *app = "BackgroundDetect"; - -static char *synopsis = "Background a file with talk detect"; - -static char *descrip = -" BackgroundDetect(<filename>[,<sil>[,<min>[,<max>[,<analysistime>]]]]):\n" -"Plays back <filename>, waiting for interruption from a given digit (the digit\n" -"must start the beginning of a valid extension, or it will be ignored). During\n" -"the playback of the file, audio is monitored in the receive direction, and if\n" -"a period of non-silence which is greater than <min> ms yet less than <max> ms\n" -"is followed by silence for at least <sil> ms, which occurs during the first\n" -"<analysistime> ms, then the audio playback is aborted and processing jumps to\n" -"the <talk> extension, if available. If unspecified, <sil>, <min>, <max>, and\n" -"<analysistime> default to 1000, 100, infinity, and infinity respectively.\n"; +/*** DOCUMENTATION + <application name="BackGroundDetect" language="en_US"> + <synopsis> + Background a file with talk detect. + </synopsis> + <syntax> + <parameter name="filename" required="true" /> + <parameter name="sil"> + <para>If not specified, defaults to <literal>1000</literal>.</para> + </parameter> + <parameter name="min"> + <para>If not specified, defaults to <literal>100</literal>.</para> + </parameter> + <parameter name="max"> + <para>If not specified, defaults to <literal>infinity</literal>.</para> + </parameter> + <parameter name="analysistime"> + <para>If not specified, defaults to <literal>infinity</literal>.</para> + </parameter> + </syntax> + <description> + <para>Plays back <replaceable>filename</replaceable>, waiting for interruption from a given digit (the digit + must start the beginning of a valid extension, or it will be ignored). During + the playback of the file, audio is monitored in the receive direction, and if + a period of non-silence which is greater than <replaceable>min</replaceable> ms yet less than + <replaceable>max</replaceable> ms is followed by silence for at least <replaceable>sil</replaceable> ms, + which occurs during the first <replaceable>analysistime</replaceable> ms, then the audio playback is + aborted and processing jumps to the <replaceable>talk</replaceable> extension, if available.</para> + </description> + </application> + ***/ +static char *app = "BackgroundDetect"; static int background_detect_exec(struct ast_channel *chan, void *data) { @@ -227,7 +245,7 @@ static int unload_module(void) static int load_module(void) { - return ast_register_application(app, background_detect_exec, synopsis, descrip); + return ast_register_application_xml(app, background_detect_exec); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Playback with Talk Detection"); |