diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-16 17:02:35 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-16 17:02:35 +0000 |
commit | 7f78e9b1354c8bb4dd2c9477ff46322e3daa93da (patch) | |
tree | 9562e46b55e9d85312352b1f428e6d00bcfa1e28 /apps/app_dial.c | |
parent | 9ea1c16e576ae2dce899f822eb16e775f9758614 (diff) |
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/branches/1.4@54884 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-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 e19c4f107..323647834 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1185,7 +1185,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags ast_app_group_set_channel(tmp->chan, outbound_group); /* Inherit context and extension */ - ast_copy_string(tmp->chan->dialcontext, chan->context, sizeof(tmp->chan->dialcontext)); + if (!ast_strlen_zero(chan->macrocontext)) + 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)); /* Place the call, but don't wait on the answer */ |