summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-10-10 21:05:51 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-10-10 21:05:51 +0000
commit516c9ec665ed910139bd8583c20e78f3839078e4 (patch)
treea050df01f63cc54dcdf82e161fe0e2c2a0f96f3c /apps
parent357b733b669ce53071557cafed14e18c586abc7b (diff)
app_queue: Made pass connected line updates from the caller to ringing queue members.
Party A calls Party B Party B puts Party A on hold. Party B calls a queue. Ringing queue member D sees Party B identification. Party B transfers Party A to the queue. Queue member D does not get a connected line update for Party A. Queue member D answers the call and still sees Party B information. However, if Party A later transfers the call to Party C then queue member D gets a connected line update for Party C. * Made pass connected line updates from the caller to queue members while the queue members are ringing. (closes issue AST-1017) Reported by: Thomas Arimont (closes issue ABE-2886) Reported by: Thomas Arimont Tested by: rmudgett ........ Merged revisions 374801 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier ........ Merged revisions 374802 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374803 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374804 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c41
1 files changed, 34 insertions, 7 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 0dc2ca64d..8f1f8f23a 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4405,13 +4405,6 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
return NULL;
}
- /*!
- * \todo
- * XXX Queue like Dial really should send any connected line
- * updates (AST_CONTROL_CONNECTED_LINE) from the caller to each
- * ringing queue member.
- */
-
if ((f->frametype == AST_FRAME_DTMF) && caller_disconnect && (f->subclass.integer == '*')) {
ast_verb(3, "User hit %c to disconnect call.\n", f->subclass.integer);
*to = 0;
@@ -4425,6 +4418,40 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
ast_frfree(f);
return NULL;
}
+
+ /* Send the frame from the in channel to all outgoing channels. */
+ for (o = start; o; o = o->call_next) {
+ if (!o->stillgoing || !o->chan) {
+ /* This outgoing channel has died so don't send the frame to it. */
+ continue;
+ }
+ switch (f->frametype) {
+ case AST_FRAME_CONTROL:
+ switch (f->subclass.integer) {
+ case AST_CONTROL_CONNECTED_LINE:
+ if (ast_channel_connected_line_sub(in, o->chan, f, 1) &&
+ ast_channel_connected_line_macro(in, o->chan, f, 0, 1)) {
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ }
+ break;
+ case AST_CONTROL_REDIRECTING:
+ if (ast_channel_redirecting_sub(in, o->chan, f, 1) &&
+ ast_channel_redirecting_macro(in, o->chan, f, 0, 1)) {
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ }
+ break;
+ default:
+ /* We are not going to do anything with this frame. */
+ goto skip_frame;
+ }
+ break;
+ default:
+ /* We are not going to do anything with this frame. */
+ goto skip_frame;
+ }
+ }
+skip_frame:;
+
ast_frfree(f);
}
if (!*to) {