diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-01 18:40:13 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-01 18:40:13 +0000 |
commit | ab30798e24de79aee136368b813fb95a254e1a5e (patch) | |
tree | b87ee6317daeb086a816e3a103d3b100dce54480 /pbx | |
parent | 15bdb1a680f44358128474f6c1bc63c97d260eca (diff) |
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)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46781 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_dundi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index dba8607d5..e947e56f6 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -4276,6 +4276,7 @@ static int dundi_exec(struct ast_channel *chan, const char *context, const char int res; int x=0; char req[1024]; + const char *dundiargs; struct ast_app *dial; if (!strncasecmp(context, "macro-", 6)) { @@ -4313,7 +4314,9 @@ static int dundi_exec(struct ast_channel *chan, const char *context, const char } 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); |