diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-08 18:36:40 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-08 18:36:40 +0000 |
commit | ffaf83dc83fce81de133db1f3c194c61d74bb4a2 (patch) | |
tree | 9261227852306e60434132405e9b8106f4e2b388 /apps | |
parent | 259d9e0d387fac212225a4dc5aeb876e78b7c9b4 (diff) |
Make app_queue calls work with directed pickup.
(closes issue #11700)
Reported by: jbauer
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97093 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 2be4d03dc..ac8845ce1 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1861,6 +1861,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 */ |