aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-01 21:10:07 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-01 21:10:07 +0000
commitb1f91b97d2085cc845d0f57bd9907de50c995105 (patch)
tree9c836ac808552d20be6bd2baa3a3c29f642eda53 /apps/app_dial.c
parentc5d084051f21e943fcbcc347fc80b166885f298d (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: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c572
1 files changed, 390 insertions, 182 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index f0fd7463d..089523ef4 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -62,188 +62,396 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/global_datastores.h"
#include "asterisk/dsp.h"
-static char *app = "Dial";
+/*** DOCUMENTATION
+ <application name="Dial" language="en_US">
+ <synopsis>
+ Attempt to connect to another device or endpoint and bridge the call.
+ </synopsis>
+ <syntax>
+ <parameter name="Technology/Resource" required="true" argsep="&amp;">
+ <argument name="Technology/Resource" required="true">
+ <para>Specification of the device(s) to dial. These must be in the format of
+ <literal>Technology/Resource</literal>, where <replaceable>Technology</replaceable>
+ represents a particular channel driver, and <replaceable>Resource</replaceable>
+ represents a resource available to that particular channel driver.</para>
+ </argument>
+ <argument name="Technology2/Resource2" required="false" multiple="true">
+ <para>Optional extra devices to dial in parallel</para>
+ <para>If you need more then one enter them as
+ Technology2/Resource2&amp;Technology3/Resourse3&amp;.....</para>
+ </argument>
+ </parameter>
+ <parameter name="timeout" required="false">
+ <para>Specifies the number of seconds we attempt to dial the specified devices</para>
+ <para>If not specified, this defaults to 136 years.</para>
+ </parameter>
+ <parameter name="options" required="false">
+ <optionlist>
+ <option name="A">
+ <argument name="x" required="true">
+ <para>The file to play to the called party</para>
+ </argument>
+ <para>Play an announcement to the called party, where <replaceable>x</replaceable> is the prompt to be played</para>
+ </option>
+ <option name="C">
+ <para>Reset the call detail record (CDR) for this call.</para>
+ </option>
+ <option name="c">
+ <para>If the Dial() application cancels this call, always set the flag to tell the channel
+ driver that the call is answered elsewhere.</para>
+ </option>
+ <option name="d">
+ <para>Allow the calling user to dial a 1 digit extension while waiting for
+ a call to be answered. Exit to that extension if it exists in the
+ current context, or the context defined in the <variable>EXITCONTEXT</variable> variable,
+ if it exists.</para>
+ </option>
+ <option name="D" argsep=":">
+ <argument name="called" />
+ <argument name="calling" />
+ <para>Send the specified DTMF strings <emphasis>after</emphasis> the called
+ party has answered, but before the call gets bridged. The
+ <replaceable>called</replaceable> DTMF string is sent to the called party, and the
+ <replaceable>calling</replaceable> DTMF string is sent to the calling party. Both arguments
+ can be used alone.</para>
+ </option>
+ <option name="e">
+ <para>Execute the <literal>h</literal> extension for peer after the call ends</para>
+ </option>
+ <option name="f">
+ <para>Force the callerid of the <emphasis>calling</emphasis> channel to be set as the
+ extension associated with the channel using a dialplan <literal>hint</literal>.
+ For example, some PSTNs do not allow CallerID to be set to anything
+ other than the number assigned to the caller.</para>
+ </option>
+ <option name="F" argsep="^">
+ <argument name="context" required="false" />
+ <argument name="exten" required="false" />
+ <argument name="priority" required="true" />
+ <para>When the caller hangs up, transfer the called party
+ to the specified destination and continue execution at that location.</para>
+ </option>
+ <option name="g">
+ <para>Proceed with dialplan execution at the next priority in the current extension if the
+ destination channel hangs up.</para>
+ </option>
+ <option name="G" argsep="^">
+ <argument name="context" required="false" />
+ <argument name="exten" required="false" />
+ <argument name="priority" required="true" />
+ <para>If the call is answered, transfer the calling party to
+ the specified <replaceable>priority</replaceable> and the called party to the specified
+ <replaceable>priority</replaceable> plus one.</para>
+ <note>
+ <para>You cannot use any additional action post answer options in conjunction with this option.</para>
+ </note>
+ </option>
+ <option name="h">
+ <para>Allow the called party to hang up by sending the <literal>*</literal> DTMF digit.</para>
+ </option>
+ <option name="H">
+ <para>Allow the calling party to hang up by hitting the <literal>*</literal> DTMF digit.</para>
+ </option>
+ <option name="i">
+ <para>Asterisk will ignore any forwarding requests it may receive on this dial attempt.</para>
+ </option>
+ <option name="k">
+ <para>Allow the called party to enable parking of the call by sending
+ the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="K">
+ <para>Allow the calling party to enable parking of the call by sending
+ the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="L" argsep=":">
+ <argument name="x" required="true">
+ <para>Maximum call time, in milliseconds</para>
+ </argument>
+ <argument name="y">
+ <para>Warning time, in milliseconds</para>
+ </argument>
+ <argument name="z">
+ <para>Repeat time, in milliseconds</para>
+ </argument>
+ <para>Limit the call to <replaceable>x</replaceable> milliseconds. Play a warning when <replaceable>y</replaceable> milliseconds are
+ left. Repeat the warning every <replaceable>z</replaceable> milliseconds until time expires.</para>
+ <para>This option is affected by the following variables:</para>
+ <variablelist>
+ <variable name="LIMIT_PLAYAUDIO_CALLER">
+ <value name="yes" default="true" />
+ <value name="no" />
+ <para>If set, this variable causes Asterisk to play the prompts to the caller.</para>
+ </variable>
+ <variable name="LIMIT_PLAYAUDIO_CALLEE">
+ <value name="yes" />
+ <value name="no" default="true"/>
+ <para>If set, this variable causes Asterisk to play the prompts to the callee.</para>
+ </variable>
+ <variable name="LIMIT_TIMEOUT_FILE">
+ <value name="filename"/>
+ <para>If specified, <replaceable>filename</replaceable> specifies the sound prompt to play when the timeout is reached.
+ If not set, the time remaining will be announced.</para>
+ </variable>
+ <variable name="LIMIT_CONNECT_FILE">
+ <value name="filename"/>
+ <para>If specified, <replaceable>filename</replaceable> specifies the sound prompt to play when the call begins.
+ If not set, the time remaining will be announced.</para>
+ </variable>
+ <variable name="LIMIT_WARNING_FILE">
+ <value name="filename"/>
+ <para>If specified, <replaceable>filename</replaceable> specifies the sound prompt to play as
+ a warning when time <replaceable>x</replaceable> is reached. If not set, the time remaining will be announced.</para>
+ </variable>
+ </variablelist>
+ </option>
+ <option name="m">
+ <argument name="class" required="false"/>
+ <para>Provide hold music to the calling party until a requested
+ channel answers. A specific music on hold <replaceable>class</replaceable>
+ (as defined in <filename>musiconhold.conf</filename>) can be specified.</para>
+ </option>
+ <option name="M" argsep="^">
+ <argument name="macro" required="true">
+ <para>Name of the macro that should be executed.</para>
+ </argument>
+ <argument name="arg" multiple="true">
+ <para>Macro arguments</para>
+ </argument>
+ <para>Execute the specified <replaceable>macro</replaceable> for the <emphasis>called</emphasis> channel
+ before connecting to the calling channel. Arguments can be specified to the Macro
+ using <literal>^</literal> as a delimiter. The macro can set the variable
+ <variable>MACRO_RESULT</variable> to specify the following actions after the macro is
+ finished executing:</para>
+ <variablelist>
+ <variable name="MACRO_RESULT">
+ <para>If set, this action will be taken after the macro finished executing.</para>
+ <value name="ABORT">
+ Hangup both legs of the call
+ </value>
+ <value name="CONGESTION">
+ Behave as if line congestion was encountered
+ </value>
+ <value name="BUSY">
+ Behave as if a busy signal was encountered
+ </value>
+ <value name="CONTINUE">
+ Hangup the called party and allow the calling party to continue dialplan execution at the next priority
+ </value>
+ <!-- TODO: Fix this syntax up, once we've figured out how to specify the GOTO syntax -->
+ <value name="GOTO:&lt;context&gt;^&lt;exten&gt;^&lt;priority&gt;">
+ Transfer the call to the specified destination.
+ </value>
+ </variable>
+ </variablelist>
+ <note>
+ <para>You cannot use any additional action post answer options in conjunction
+ with this option. Also, pbx services are not run on the peer (called) channel,
+ so you will not be able to set timeouts via the TIMEOUT() function in this macro.</para>
+ </note>
+ </option>
+ <option name="n">
+ <para>This option is a modifier for the call screening/privacy mode. (See the
+ <literal>p</literal> and <literal>P</literal> options.) It specifies
+ that no introductions are to be saved in the <directory>priv-callerintros</directory>
+ directory.</para>
+ </option>
+ <option name="N">
+ <para>This option is a modifier for the call screening/privacy mode. It specifies
+ that if Caller*ID is present, do not screen the call.</para>
+ </option>
+ <option name="o">
+ <para>Specify that the Caller*ID that was present on the <emphasis>calling</emphasis> channel
+ be set as the Caller*ID on the <emphasis>called</emphasis> channel. This was the
+ behavior of Asterisk 1.0 and earlier.</para>
+ </option>
+ <option name="O">
+ <argument name="mode">
+ <para>With <replaceable>mode</replaceable> either not specified or set to <literal>1</literal>,
+ the originator hanging up will cause the phone to ring back immediately.</para>
+ <para>With <replaceable>mode</replaceable> set to <literal>2</literal>, when the operator
+ flashes the trunk, it will ring their phone back.</para>
+ </argument>
+ <para>Enables <emphasis>operator services</emphasis> mode. This option only
+ works when bridging a DAHDI channel to another DAHDI channel
+ only. if specified on non-DAHDI interfaces, it will be ignored.
+ When the destination answers (presumably an operator services
+ station), the originator no longer has control of their line.
+ They may hang up, but the switch will not release their line
+ until the destination party (the operator) hangs up.</para>
+ </option>
+ <option name="p">
+ <para>This option enables screening mode. This is basically Privacy mode
+ without memory.</para>
+ </option>
+ <option name="P">
+ <argument name="x" />
+ <para>Enable privacy mode. Use <replaceable>x</replaceable> as the family/key in the AstDB database if
+ it is provided. The current extension is used if a database family/key is not specified.</para>
+ </option>
+ <option name="r">
+ <para>Indicate ringing to the calling party, even if the called party isn't actually ringing. Pass no audio to the calling
+ party until the called channel has answered.</para>
+ </option>
+ <option name="S">
+ <argument name="x" required="true" />
+ <para>Hang up the call <replaceable>x</replaceable> seconds <emphasis>after</emphasis> the called party has
+ answered the call.</para>
+ </option>
+ <option name="t">
+ <para>Allow the called party to transfer the calling party by sending the
+ DTMF sequence defined in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="T">
+ <para>Allow the calling party to transfer the called party by sending the
+ DTMF sequence defined in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="U" argsep="^">
+ <argument name="x" required="true">
+ <para>Name of the subroutine to execute via Gosub</para>
+ </argument>
+ <argument name="arg" multiple="true" required="false">
+ <para>Arguments for the Gosub routine</para>
+ </argument>
+ <para>Execute via Gosub the routine <replaceable>x</replaceable> for the <emphasis>called</emphasis> channel before connecting
+ to the calling channel. Arguments can be specified to the Gosub
+ using <literal>^</literal> as a delimiter. The Gosub routine can set the variable
+ <variable>GOSUB_RESULT</variable> to specify the following actions after the Gosub returns.</para>
+ <variablelist>
+ <variable name="GOSUB_RESULT">
+ <value name="ABORT">
+ Hangup both legs of the call.
+ </value>
+ <value name="CONGESTION">
+ Behave as if line congestion was encountered.
+ </value>
+ <value name="BUSY">
+ Behave as if a busy signal was encountered.
+ </value>
+ <value name="CONTINUE">
+ Hangup the called party and allow the calling party
+ to continue dialplan execution at the next priority.
+ </value>
+ <!-- TODO: Fix this syntax up, once we've figured out how to specify the GOTO syntax -->
+ <value name="GOTO:&lt;context&gt;^&lt;exten&gt;^&lt;priority&gt;">
+ Transfer the call to the specified priority. Optionally, an extension, or
+ extension and priority can be specified.
+ </value>
+ </variable>
+ </variablelist>
+ <note>
+ <para>You cannot use any additional action post answer options in conjunction
+ with this option. Also, pbx services are not run on the peer (called) channel,
+ so you will not be able to set timeouts via the TIMEOUT() function in this routine.</para>
+ </note>
+ </option>
+ <option name="w">
+ <para>Allow the called party to enable recording of the call by sending
+ the DTMF sequence defined for one-touch recording in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="W">
+ <para>Allow the calling party to enable recording of the call by sending
+ the DTMF sequence defined for one-touch recording in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="x">
+ <para>Allow the called party to enable recording of the call by sending
+ the DTMF sequence defined for one-touch automixmonitor in <filename>features.conf</filename>.</para>
+ </option>
+ <option name="X">
+ <para>Allow the calling party to enable recording of the call by sending
+ the DTMF sequence defined for one-touch automixmonitor in <filename>features.conf</filename>.</para>
+ </option>
+ </optionlist>
+ </parameter>
+ <parameter name="URL">
+ <para>The optional URL will be sent to the called party if the channel driver supports it.</para>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application will place calls to one or more specified channels. As soon
+ as one of the requested channels answers, the originating channel will be
+ answered, if it has not already been answered. These two channels will then
+ be active in a bridged call. All other channels that were requested will then
+ be hung up.</para>
+
+ <para>Unless there is a timeout specified, the Dial application will wait
+ indefinitely until one of the called channels answers, the user hangs up, or
+ if all of the called channels are busy or unavailable. Dialplan executing will
+ continue if no requested channels can be called, or if the timeout expires.
+ This application will report normal termination if the originating channel
+ hangs up, or if the call is bridged and either of the parties in the bridge
+ ends the call.</para>
+
+ <para>If the <variable>OUTBOUND_GROUP</variable> variable is set, all peer channels created by this
+ application will be put into that group (as in Set(GROUP()=...).
+ If the <variable>OUTBOUND_GROUP_ONCE</variable> variable is set, all peer channels created by this
+ application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,
+ however, the variable will be unset after use.</para>
+
+ <para>This application sets the following channel variables:</para>
+ <variablelist>
+ <variable name="DIALEDTIME">
+ <para>This is the time from dialing a channel until when it is disconnected.</para>
+ </variable>
+ <variable name="ANSWEREDTIME">
+ <para>This is the amount of time for actual call.</para>
+ </variable>
+ <variable name="DIALSTATUS">
+ <para>This is the status of the call</para>
+ <value name="CHANUNAVAIL" />
+ <value name="CONGESTION" />
+ <value name="NOANSWER" />
+ <value name="BUSY" />
+ <value name="ANSWER" />
+ <value name="CANCEL" />
+ <value name="DONTCALL">
+ For the Privacy and Screening Modes.
+ Will be set if the called party chooses to send the calling party to the 'Go Away' script.
+ </value>
+ <value name="TORTURE">
+ For the Privacy and Screening Modes.
+ Will be set if the called party chooses to send the calling party to the 'torture' script.
+ </value>
+ <value name="INVALIDARGS" />
+ </variable>
+ </variablelist>
+ </description>
+ </application>
+ <application name="RetryDial" language="en_US">
+ <synopsis>
+ Place a call, retrying on failure allowing an optional exit extension.
+ </synopsis>
+ <syntax>
+ <parameter name="announce" required="true">
+ <para>Filename of sound that will be played when no channel can be reached</para>
+ </parameter>
+ <parameter name="sleep" required="true">
+ <para>Number of seconds to wait after a dialattempt failed before a new attempt is made</para>
+ </parameter>
+ <parameter name="retries" required="true">
+ <para>Number of retries</para>
+ <para>When this is reached flow will continue at the next priority in the dialplan</para>
+ </parameter>
+ <parameter name="dialargs" required="true">
+ <para>Same format as arguments provided to the Dial application</para>
+ </parameter>
+ </syntax>
+ <description>
+ <para>This application will attempt to place a call using the normal Dial application.
+ If no channel can be reached, the <replaceable>announce</replaceable> file will be played.
+ Then, it will wait <replaceable>sleep</replaceable> number of seconds before retrying the call.
+ After <replaceable>retries</replaceable> number of attempts, the calling channel will continue at the next priority in the dialplan.
+ If the <replaceable>retries</replaceable> setting is set to 0, this application will retry endlessly.
+ While waiting to retry a call, a 1 digit extension may be dialed. If that
+ extension exists in either the context defined in <variable>EXITCONTEXT</variable> or the current
+ one, The call will jump to that extension immediately.
+ The <replaceable>dialargs</replaceable> are specified in the same format that arguments are provided
+ to the Dial application.</para>
+ </description>
+ </application>
+ ***/
-static char *synopsis = "Place a call and connect to the current channel";
-
-static char *descrip =
-" Dial(Technology/resource[&Tech2/resource2...][,timeout][,options][,URL]):\n"
-"This application will place calls to one or more specified channels. As soon\n"
-"as one of the requested channels answers, the originating channel will be\n"
-"answered, if it has not already been answered. These two channels will then\n"
-"be active in a bridged call. All other channels that were requested will then\n"
-"be hung up.\n"
-" Unless there is a timeout specified, the Dial application will wait\n"
-"indefinitely until one of the called channels answers, the user hangs up, or\n"
-"if all of the called channels are busy or unavailable. Dialplan executing will\n"
-"continue if no requested channels can be called, or if the timeout expires.\n\n"
-" This application sets the following channel variables upon completion:\n"
-" DIALEDTIME - This is the time from dialing a channel until when it\n"
-" is disconnected.\n"
-" ANSWEREDTIME - This is the amount of time for actual call.\n"
-" DIALSTATUS - This is the status of the call:\n"
-" CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n"
-" DONTCALL | TORTURE | INVALIDARGS\n"
-" For the Privacy and Screening Modes, the DIALSTATUS variable will be set to\n"
-"DONTCALL if the called party chooses to send the calling party to the 'Go Away'\n"
-"script. The DIALSTATUS variable will be set to TORTURE if the called party\n"
-"wants to send the caller to the 'torture' script.\n"
-" This application will report normal termination if the originating channel\n"
-"hangs up, or if the call is bridged and either of the parties in the bridge\n"
-"ends the call.\n"
-" The optional URL will be sent to the called party if the channel supports it.\n"
-" If the OUTBOUND_GROUP variable is set, all peer channels created by this\n"
-"application will be put into that group (as in Set(GROUP()=...).\n"
-" If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this\n"
-"application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,\n"
-"however, the variable will be unset after use.\n\n"
-" Options:\n"
-" A(x) - Play an announcement to the called party, using 'x' as the file.\n"
-" C - Reset the CDR for this call.\n"
-" c - If DIAL cancels this call, always set the flag to tell the channel\n"
-" driver that the call is answered elsewhere.\n"
-" d - Allow the calling user to dial a 1 digit extension while waiting for\n"
-" a call to be answered. Exit to that extension if it exists in the\n"
-" current context, or the context defined in the EXITCONTEXT variable,\n"
-" if it exists.\n"
-" D([called][:calling]) - Send the specified DTMF strings *after* the called\n"
-" party has answered, but before the call gets bridged. The 'called'\n"
-" DTMF string is sent to the called party, and the 'calling' DTMF\n"
-" string is sent to the calling party. Both parameters can be used\n"
-" alone.\n"
-" e - execute the 'h' extension for peer after the call ends. This\n"
-" operation will not be performed if the peer was parked\n"
-" f - Force the callerid of the *calling* channel to be set as the\n"
-" extension associated with the channel using a dialplan 'hint'.\n"
-" For example, some PSTNs do not allow CallerID to be set to anything\n"
-" other than the number assigned to the caller.\n"
-" F(context^exten^pri) - When the caller hangs up, transfer the called party\n"
-" to the specified context and extension and continue execution.\n"
-" g - Proceed with dialplan execution at the current extension if the\n"
-" destination channel hangs up.\n"
-" G(context^exten^pri) - If the call is answered, transfer the calling party to\n"
-" the specified priority and the called party to the specified priority+1.\n"
-" Optionally, an extension, or extension and context may be specified. \n"
-" Otherwise, the current extension is used. You cannot use any additional\n"
-" action post answer options in conjunction with this option.\n"
-" h - Allow the called party to hang up by sending the '*' DTMF digit, or\n"
-" whatever sequence was defined in the featuremap section for\n"
-" 'disconnect' in features.conf\n"
-" H - Allow the calling party to hang up by hitting the '*' DTMF digit, or\n"
-" whatever sequence was defined in the featuremap section for\n"
-" 'disconnect' in features.conf\n"
-" i - Asterisk will ignore any forwarding requests it may receive on this\n"
-" dial attempt.\n"
-" k - Allow the called party to enable parking of the call by sending\n"
-" the DTMF sequence defined for call parking in the featuremap section of features.conf.\n"
-" K - Allow the calling party to enable parking of the call by sending\n"
-" the DTMF sequence defined for call parking in the featuremap section of features.conf.\n"
-" L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are\n"
-" left. Repeat the warning every 'z' ms. The following special\n"
-" variables can be used with this option:\n"
-" * LIMIT_PLAYAUDIO_CALLER yes|no (default yes)\n"
-" Play sounds to the caller.\n"
-" * LIMIT_PLAYAUDIO_CALLEE yes|no\n"
-" Play sounds to the callee.\n"
-" * LIMIT_TIMEOUT_FILE File to play when time is up.\n"
-" * LIMIT_CONNECT_FILE File to play when call begins.\n"
-" * LIMIT_WARNING_FILE File to play as warning if 'y' is defined.\n"
-" The default is to say the time remaining.\n"
-" m([class]) - Provide hold music to the calling party until a requested\n"
-" channel answers. A specific MusicOnHold class can be\n"
-" specified.\n"
-" M(x[^arg]) - Execute the Macro for the *called* channel before connecting\n"
-" to the calling channel. Arguments can be specified to the Macro\n"
-" using '^' as a delimiter. The Macro can set the variable\n"
-" MACRO_RESULT to specify the following actions after the Macro is\n"
-" finished executing.\n"
-" * ABORT Hangup both legs of the call.\n"
-" * CONGESTION Behave as if line congestion was encountered.\n"
-" * BUSY Behave as if a busy signal was encountered.\n"
-" * CONTINUE Hangup the called party and allow the calling party\n"
-" to continue dialplan execution at the next priority.\n"
-" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
-" specified priority. Optionally, an extension, or\n"
-" extension and priority can be specified.\n"
-" You cannot use any additional action post answer options in conjunction\n"
-" with this option. Also, pbx services are not run on the peer (called) channel,\n"
-" so you will not be able to set timeouts via the TIMEOUT() function in this macro.\n"
-" n - This option is a modifier for the screen/privacy mode. It specifies\n"
-" that no introductions are to be saved in the priv-callerintros\n"
-" directory.\n"
-" N - This option is a modifier for the screen/privacy mode. It specifies\n"
-" that if callerID is present, do not screen the call.\n"
-" o - Specify that the CallerID that was present on the *calling* channel\n"
-" be set as the CallerID on the *called* channel. This was the\n"
-" behavior of Asterisk 1.0 and earlier.\n"
-" O([x]) - \"Operator Services\" mode (DAHDI channel to DAHDI channel\n"
-" only, if specified on non-DAHDI interface, it will be ignored).\n"
-" When the destination answers (presumably an operator services\n"
-" station), the originator no longer has control of their line.\n"
-" They may hang up, but the switch will not release their line\n"
-" until the destination party hangs up (the operator). Specified\n"
-" without an arg, or with 1 as an arg, the originator hanging up\n"
-" will cause the phone to ring back immediately. With a 2 specified,\n"
-" when the \"operator\" flashes the trunk, it will ring their phone\n"
-" back.\n"
-" p - This option enables screening mode. This is basically Privacy mode\n"
-" without memory.\n"
-" P([x]) - Enable privacy mode. Use 'x' as the family/key in the database if\n"
-" it is provided. The current extension is used if a database\n"
-" family/key is not specified.\n"
-" r - Indicate ringing to the calling party. Pass no audio to the calling\n"
-" party until the called channel has answered.\n"
-" S(x) - Hang up the call after 'x' seconds *after* the called party has\n"
-" answered the call.\n"
-" t - Allow the called party to transfer the calling party by sending the\n"
-" DTMF sequence defined in the blindxfer setting in the featuremap section\n"
-" of features.conf.\n"
-" T - Allow the calling party to transfer the called party by sending the\n"
-" DTMF sequence defined in the blindxfer setting in the featuremap section\n"
-" of features.conf.\n"
-" U(x[^arg]) - Execute via Gosub the routine 'x' for the *called* channel before connecting\n"
-" to the calling channel. Arguments can be specified to the Gosub\n"
-" using '^' as a delimiter. The Gosub routine can set the variable\n"
-" GOSUB_RESULT to specify the following actions after the Gosub returns.\n"
-" * ABORT Hangup both legs of the call.\n"
-" * CONGESTION Behave as if line congestion was encountered.\n"
-" * BUSY Behave as if a busy signal was encountered.\n"
-" * CONTINUE Hangup the called party and allow the calling party\n"
-" to continue dialplan execution at the next priority.\n"
-" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
-" specified priority. Optionally, an extension, or\n"
-" extension and priority can be specified.\n"
-" You cannot use any additional action post answer options in conjunction\n"
-" with this option. Also, pbx services are not run on the peer (called) channel,\n"
-" so you will not be able to set timeouts via the TIMEOUT() function in this routine.\n"
-" w - Allow the called party to enable recording of the call by sending\n"
-" the DTMF sequence defined in the automon setting in the featuremap section\n"
-" of features.conf.\n"
-" W - Allow the calling party to enable recording of the call by sending\n"
-" the DTMF sequence defined in the automon setting in the featuremap section\n"
-" of features.conf.\n"
-" x - Allow the called party to enable recording of the call by sending\n"
-" the DTMF sequence defined in the automixmon setting in the featuremap section\n"
-" of features.conf.\n"
-" X - Allow the calling party to enable recording of the call by sending\n"
-" the DTMF sequence defined in the automixmon setting in the featuremap section\n"
-" of features.conf.\n";
-
-/* RetryDial App by Anthony Minessale II <anthmct@yahoo.com> Jan/2005 */
+static char *app = "Dial";
static char *rapp = "RetryDial";
-static char *rsynopsis = "Place a call, retrying on failure allowing optional exit extension.";
-static char *rdescrip =
-" RetryDial(announce,sleep,retries,dialargs): This application will attempt to\n"
-"place a call using the normal Dial application. If no channel can be reached,\n"
-"the 'announce' file will be played. Then, it will wait 'sleep' number of\n"
-"seconds before retrying the call. After 'retries' number of attempts, the\n"
-"calling channel will continue at the next priority in the dialplan. If the\n"
-"'retries' setting is set to 0, this application will retry endlessly.\n"
-" While waiting to retry a call, a 1 digit extension may be dialed. If that\n"
-"extension exists in either the context defined in ${EXITCONTEXT} or the current\n"
-"one, The call will jump to that extension immediately.\n"
-" The 'dialargs' are specified in the same format that arguments are provided\n"
-"to the Dial application.\n";
enum {
OPT_ANNOUNCE = (1 << 0),
@@ -2187,8 +2395,8 @@ static int load_module(void)
else
ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_dial");
- res = ast_register_application(app, dial_exec, synopsis, descrip);
- res |= ast_register_application(rapp, retrydial_exec, rsynopsis, rdescrip);
+ res = ast_register_application_xml(app, dial_exec);
+ res |= ast_register_application_xml(rapp, retrydial_exec);
return res;
}