aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-16 18:51:15 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-16 18:51:15 +0000
commit383f8f27afa0120fcd72ec175f04c0268d8278b4 (patch)
tree34171642d42cb0ed8d965cdc5ce3397d1d3e3b20 /apps/app_dial.c
parent71d1fb0e1213036a4f098e2148d3378a9ab0c65d (diff)
Need to check macro extension as well as macro context for directed pickup.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54924 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 323647834..a585cfaa9 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1189,7 +1189,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
ast_copy_string(tmp->chan->dialcontext, chan->macrocontext, sizeof(tmp->chan->dialcontext));
else
ast_copy_string(tmp->chan->dialcontext, chan->context, sizeof(tmp->chan->dialcontext));
- ast_copy_string(tmp->chan->exten, chan->exten, sizeof(tmp->chan->exten));
+ if (!ast_strlen_zero(chan->macroexten))
+ ast_copy_string(tmp->chan->exten, chan->macroexten, sizeof(tmp->chan->exten));
+ else
+ ast_copy_string(tmp->chan->exten, chan->exten, sizeof(tmp->chan->exten));
/* Place the call, but don't wait on the answer */
res = ast_call(tmp->chan, numsubst, 0);