[asterisk-commits] russell: trunk r46781 - in /trunk:
doc/channelvariables.txt pbx/pbx_dundi.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Nov 1 11:40:13 MST 2006
Author: russell
Date: Wed Nov 1 12:40:13 2006
New Revision: 46781
URL: http://svn.digium.com/view/asterisk?rev=46781&view=rev
Log:
Add the ability to pass options to the Dial application when using the DUNDi
switch in the dialplan by setting the DUNDIDIALARGS channel variable.
(issue #8084, patch by bluecrow76, with small modifications and documentation
updates)
Modified:
trunk/doc/channelvariables.txt
trunk/pbx/pbx_dundi.c
Modified: trunk/doc/channelvariables.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/channelvariables.txt?rev=46781&r1=46780&r2=46781&view=diff
==============================================================================
--- trunk/doc/channelvariables.txt (original)
+++ trunk/doc/channelvariables.txt Wed Nov 1 12:40:13 2006
@@ -696,6 +696,12 @@
${DUNDTECH} * The Technology of the result from a call to DUNDiLookup()
${DUNDDEST} * The Destination of the result from a call to DUNDiLookup()
+The DUNDi dialplan switch uses the following variables
+---------------------------------------------------------
+${DUNDIDIALARGS} Settings this variable allows you to provide options to be
+ passed to the Dial application for calls being placed using
+ the DUNDi switch.
+
The Zaptel channel sets the following variables:
---------------------------------------------------------
${ANI2} * The ANI2 Code provided by the network on the incoming call.
Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?rev=46781&r1=46780&r2=46781&view=diff
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Wed Nov 1 12:40:13 2006
@@ -4276,6 +4276,7 @@
int res;
int x=0;
char req[1024];
+ const char *dundiargs;
struct ast_app *dial;
if (!strncasecmp(context, "macro-", 6)) {
@@ -4313,7 +4314,9 @@
}
if (x < res) {
/* Got a hit! */
- snprintf(req, sizeof(req), "%s/%s", results[x].tech, results[x].dest);
+ dundiargs = pbx_builtin_getvar_helper(chan, "DUNDIDIALARGS");
+ snprintf(req, sizeof(req), "%s/%s||%s", results[x].tech, results[x].dest,
+ S_OR(dundiargs, ""));
dial = pbx_findapp("Dial");
if (dial)
res = pbx_exec(chan, dial, req);
More information about the asterisk-commits
mailing list