diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-16 17:07:10 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-16 17:07:10 +0000 |
commit | 51d294067d3812e9f8da78ac2c979a44cff1ea9a (patch) | |
tree | 3ad6c581e8540ce3cc10a6bc508d5c4e2f344e96 | |
parent | 70636d3013bd77c6808a9c478caca3f9f3b83780 (diff) |
Merged revisions 54884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r54884 | file | 2007-02-16 12:02:35 -0500 (Fri, 16 Feb 2007) | 2 lines
Allow directed pickup to pick up the real context instead of the macro context if a Macro is used. (issue #8984 reported by jamesb63)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54885 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_dial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 47fdc5b79..178cd279a 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1393,7 +1393,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags ast_app_group_set_channel(tc, outbound_group); /* Inherit context and extension */ - ast_copy_string(tc->dialcontext, chan->context, sizeof(tc->dialcontext)); + if (!ast_strlen_zero(chan->macrocontext)) + ast_copy_string(tc->dialcontext, chan->macrocontext, sizeof(tc->dialcontext)); + else + ast_copy_string(tc->dialcontext, chan->context, sizeof(tc->dialcontext)); ast_copy_string(tc->exten, chan->exten, sizeof(tc->exten)); res = ast_call(tc, numsubst, 0); /* Place the call, but don't wait on the answer */ |