[asterisk-commits] eliel: branch group/appdocsxml r146639 - /team/group/appdocsxml/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 6 09:50:21 CDT 2008


Author: eliel
Date: Mon Oct  6 09:50:19 2008
New Revision: 146639

URL: http://svn.digium.com/view/asterisk?view=rev&rev=146639
Log:
Introduce MixMonitor() and StopMixMonitor() XML documentation.

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

Modified: team/group/appdocsxml/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_mixmonitor.c?view=diff&rev=146639&r1=146638&r2=146639
==============================================================================
--- team/group/appdocsxml/apps/app_mixmonitor.c (original)
+++ team/group/appdocsxml/apps/app_mixmonitor.c Mon Oct  6 09:50:19 2008
@@ -46,38 +46,78 @@
 #include "asterisk/app.h"
 #include "asterisk/channel.h"
 
+/*** DOCUMENTATION
+	<application name="MixMonitor" language="en_US">
+		<synopsis>
+			Record a call and mix the audio during the recording.
+		</synopsis>
+		<syntax>
+			<parameter name="file" required="true" argsep=".">
+				<argument name="filename" required="true">
+					<para>If <replaceable>filename</replaceable> is an absolute path, uses that path, otherwise
+					creates the file in the configured monitoring directory from <filename>asterisk.conf.</filename></para>
+				</argument>
+				<argument name="extension" required="true" />
+			</parameter>
+			<parameter name="options">
+				<optionlist>
+					<option name="a">
+						<para>Append to the file instead of overwriting it.</para>
+					</option>
+					<option name="b">
+						<para>Only save audio to the file while the channel is bridged.</para>
+						<note><para>Does not include conferences or sounds played to each bridged party</para></note>
+					</option>
+					<option name="v">
+						<para>Adjust the <emphasis>heard</emphasis> volume by a factor of <replaceable>x</replaceable>
+						(range <literal>-4</literal> to <literal>4</literal>)</para>
+						<argument name="x" required="true" />
+					</option>
+					<option name="V">
+						<para>Adjust the <emphasis>spoken</emphasis> volume by a factor
+						of <replaceable>x</replaceable> (range <literal>-4</literal> to <literal>4</literal>)</para>
+						<argument name="x" required="true" />
+					</option>
+					<option name="W">
+						<para>Adjust both, <emphasis>heard and spoken</emphasis> volumes by a factor
+						of <replaceable>x</replaceable> (range <literal>-4</literal> to <literal>4</literal>)</para>
+						<argument name="x" required="true" />
+					</option>
+				</optionlist>
+			</parameter>
+			<parameter name="command">
+				<para>Will be executed when the recording is over.</para>
+				<para>Any strings matching <literal>^{X}</literal> will be unescaped to <variable>X</variable>.</para>
+				<para>All variables will be evaluated at the time MixMonitor is called.</para>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Records the audio on the current channel to the specified file.</para>
+			<variablelist>
+				<variable name="MIXMONITOR_FILENAME">
+					<para>Will contain the filename used to record.</para>
+				</variable>
+			</variablelist>	
+		</description>
+	</application>
+	<application name="StopMixMonitor" language="en_US">
+		<synopsis>
+			Stop recording a call through MixMonitor.
+		</synopsis>
+		<syntax />
+		<description>
+			<para>Stops the audio recording that was started with a call to <literal>MixMonitor()</literal>
+			on the current channel.</para>
+		</description>
+	</application>
+		
+ ***/
+
 #define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
 
 static const char *app = "MixMonitor";
-static const char *synopsis = "Record a call and mix the audio during the recording";
-static const char *desc = ""
-"  MixMonitor(<file>.<ext>[,<options>[,<command>]]):\n"
-"Records the audio on the current channel to the specified file.\n"
-"If the filename is an absolute path, uses that path, otherwise\n"
-"creates the file in the configured monitoring directory from\n"
-"asterisk.conf.\n\n"
-"Valid options:\n"
-" a      - Append to the file instead of overwriting it.\n"
-" b      - Only save audio to the file while the channel is bridged.\n"
-"          Note: Does not include conferences or sounds played to each bridged\n"
-"                party.\n"
-" v(<x>) - Adjust the heard volume by a factor of <x> (range -4 to 4)\n"	
-" V(<x>) - Adjust the spoken volume by a factor of <x> (range -4 to 4)\n"	
-" W(<x>) - Adjust the both heard and spoken volumes by a factor of <x>\n"
-"         (range -4 to 4)\n\n"	
-"<command> will be executed when the recording is over\n"
-"Any strings matching ^{X} will be unescaped to ${X}.\n"
-"All variables will be evaluated at the time MixMonitor is called.\n"
-"The variable MIXMONITOR_FILENAME will contain the filename used to record.\n"
-"";
 
 static const char *stop_app = "StopMixMonitor";
-static const char *stop_synopsis = "Stop recording a call through MixMonitor";
-static const char *stop_desc = ""
-"  StopMixMonitor():\n"
-"Stops the audio recording that was started with a call to MixMonitor()\n"
-"on the current channel.\n"
-"";
 
 struct module_symbols *me;
 
@@ -415,8 +455,8 @@
 	int res;
 
 	ast_cli_register_multiple(cli_mixmonitor, sizeof(cli_mixmonitor) / sizeof(struct ast_cli_entry));
-	res = ast_register_application(app, mixmonitor_exec, synopsis, desc);
-	res |= ast_register_application(stop_app, stop_mixmonitor_exec, stop_synopsis, stop_desc);
+	res = ast_register_application_xml(app, mixmonitor_exec);
+	res |= ast_register_application_xml(stop_app, stop_mixmonitor_exec);
 
 	return res;
 }




More information about the asterisk-commits mailing list