[svn-commits] eliel: branch group/appdocsxml r153334 - /team/group/appdocsxml/apps/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 31 23:45:55 CDT 2008


Author: eliel
Date: Fri Oct 31 23:45:54 2008
New Revision: 153334

URL: http://svn.digium.com/view/asterisk?view=rev&rev=153334
Log:
Introduce BackGroundDetect() application XML documentation.
(closes issue 0013699)
Reported by: snuffy
Patches:
    bug13699_20081016_part2.diff uploaded by snuffy (license 35)
    With some changes by me.


Modified:
    team/group/appdocsxml/apps/app_talkdetect.c

Modified: team/group/appdocsxml/apps/app_talkdetect.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_talkdetect.c?view=diff&rev=153334&r1=153333&r2=153334
==============================================================================
--- team/group/appdocsxml/apps/app_talkdetect.c (original)
+++ team/group/appdocsxml/apps/app_talkdetect.c Fri Oct 31 23:45:54 2008
@@ -39,21 +39,39 @@
 #include "asterisk/dsp.h"
 #include "asterisk/app.h"
 
+/*** 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 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";
-
 
 static int background_detect_exec(struct ast_channel *chan, void *data)
 {
@@ -227,7 +245,7 @@
 
 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");




More information about the svn-commits mailing list