summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-01-08 18:42:39 +0000
committerJoshua Colp <jcolp@digium.com>2008-01-08 18:42:39 +0000
commitfb2aef67b937ac3efe717f07331002d690b481a1 (patch)
tree325eccde181ff7b6fea19784af5a5eb13f545fca /apps/app_queue.c
parent9c0c82d0d01b0a0d17c2f2e494ff3c83bc3bbd3d (diff)
Merged revisions 97093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97093 | file | 2008-01-08 14:36:40 -0400 (Tue, 08 Jan 2008) | 4 lines Make app_queue calls work with directed pickup. (closes issue #11700) Reported by: jbauer ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 472e2118e..1185b361c 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2100,6 +2100,16 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies
/* Presense of ADSI CPE on outgoing channel follows ours */
tmp->chan->adsicpe = qe->chan->adsicpe;
+ /* Inherit context and extension */
+ if (!ast_strlen_zero(qe->chan->macrocontext))
+ ast_copy_string(tmp->chan->dialcontext, qe->chan->macrocontext, sizeof(tmp->chan->dialcontext));
+ else
+ ast_copy_string(tmp->chan->dialcontext, qe->chan->context, sizeof(tmp->chan->dialcontext));
+ if (!ast_strlen_zero(qe->chan->macroexten))
+ ast_copy_string(tmp->chan->exten, qe->chan->macroexten, sizeof(tmp->chan->exten));
+ else
+ ast_copy_string(tmp->chan->exten, qe->chan->exten, sizeof(tmp->chan->exten));
+
/* Place the call, but don't wait on the answer */
if ((res = ast_call(tmp->chan, location, 0))) {
/* Again, keep going even if there's an error */