[asterisk-commits] eliel: trunk r199514 - /trunk/apps/app_externalivr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 7 12:29:48 CDT 2009


Author: eliel
Date: Sun Jun  7 12:29:44 2009
New Revision: 199514

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=199514
Log:
Move application ExternalIVR static documentation to XML.

Move application ExternalIVR static documentation to the new AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      app_externalivr.diff uploaded by eliel (license 64)


Modified:
    trunk/apps/app_externalivr.c

Modified: trunk/apps/app_externalivr.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/apps/app_externalivr.c?view=diff&rev=199514&r1=199513&r2=199514
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Sun Jun  7 12:29:44 2009
@@ -48,25 +48,49 @@
 #include "asterisk/tcptls.h"
 #include "asterisk/astobj2.h"
 
-static const char * const app = "ExternalIVR";
-
-static const char * const synopsis = "Interfaces with an external IVR application";
-static const char * const descrip =
-"  ExternalIVR(command|ivr://ivrhosti([,arg[,arg...]])[,options]): Either forks a process\n"
-"to run given command or makes a socket to connect to given host and starts\n"
-"a generator on the channel. The generator's play list is controlled by the\n"
-"external application, which can add and clear entries via simple commands\n"
-"issued over its stdout. The external application will receive all DTMF events\n"
-"received on the channel, and notification if the channel is hung up. The\n"
-"application will not be forcibly terminated when the channel is hung up.\n"
-"See doc/externalivr.txt for a protocol specification.\n"
-"The 'n' option tells ExternalIVR() not to answer the channel. \n"
-"The 'i' option tells ExternalIVR() not to send a hangup and exit when the\n"
-"  channel receives a hangup, instead it sends an 'I' informative message\n"
-"  meaning that the external application MUST hang up the call with an H command\n"
-"The 'd' option tells ExternalIVR() to run on a channel that has been hung up\n"
-"  and will not look for hangups.  The external application must exit with\n"
-"  an 'E' command.\n";
+/*** DOCUMENTATION
+	<application name="ExternalIVR" language="en_US">
+		<synopsis>
+			Interfaces with an external IVR application.
+		</synopsis>
+		<syntax>
+			<parameter name="command|ivr://host" required="true" hasparams="true">
+				<argument name="arg1" />
+				<argument name="arg2" multiple="yes" />
+			</parameter>
+			<parameter name="options">
+				<optionlist>
+					<option name="n">
+						<para>Tells ExternalIVR() not to answer the channel.</para>
+					</option>
+					<option name="i">
+						<para>Tells ExternalIVR() not to send a hangup and exit when the
+						channel receives a hangup, instead it sends an <literal>I</literal>
+						informative message meaning that the external application MUST hang
+						up the call with an <literal>H</literal> command.</para>
+					</option>
+					<option name="d">
+						<para>Tells ExternalIVR() to run on a channel that has been hung up
+						and will not look for hangups. The external application must exit with
+						an <literal>E</literal> command.</para>
+					</option>
+				</optionlist>
+			</parameter>
+		</syntax>
+		<description>
+			<para>Either forks a process to run given command or makes a socket to connect
+			to given host and starts a generator on the channel. The generator's play list
+			is controlled by the external application, which can add and clear entries via
+			simple commands issued over its stdout. The external application will receive
+			all DTMF events received on the channel, and notification if the channel is
+			hung up. The received on the channel, and notification if the channel is hung
+			up. The application will not be forcibly terminated when the channel is hung up.
+			See <filename>doc/externalivr.txt</filename> for a protocol specification.</para>
+		</description>
+	</application>
+ ***/
+
+static const char app[] = "ExternalIVR";
 
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
 #define ast_chan_log(level, channel, format, ...) ast_log(level, "%s: " format, channel->name , ## __VA_ARGS__)
@@ -800,7 +824,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app, app_exec, synopsis, descrip);
+	return ast_register_application_xml(app, app_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "External IVR Interface Application");




More information about the asterisk-commits mailing list