summaryrefslogtreecommitdiff
path: root/apps/app_externalivr.c
diff options
context:
space:
mode:
authorEliel C. Sardanons <eliels@gmail.com>2009-06-07 17:29:44 +0000
committerEliel C. Sardanons <eliels@gmail.com>2009-06-07 17:29:44 +0000
commite18eae86c95842542efbb7d031db1bad37789514 (patch)
tree9f28c844f5f9cb89d94a97211d720dcc0d1b17ce /apps/app_externalivr.c
parent12ff77f9757d240de38f0a3d6ed569831eeecf95 (diff)
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) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_externalivr.c')
-rw-r--r--apps/app_externalivr.c64
1 files changed, 44 insertions, 20 deletions
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index db3db3db8..3a8f0a95d 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -48,25 +48,49 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#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 unload_module(void)
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");