summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-11-02 14:15:14 +0000
committerJoshua Colp <jcolp@digium.com>2016-11-02 09:16:41 -0500
commit4de5454ef1417691b012d3d83cdd1ca9a6d09401 (patch)
treeda7ab2d4f9bf7f6507d98b189d620273e25a2b5a /apps/app_dial.c
parenta380bba1e36cc448ef797b381b9a0ef245e3bded (diff)
app_dial: Fix incorrect device state when channel is picked up.
Given the scenario where multiple channels are dialed using Dial() but the caller is picked up using PickupChan() all outgoing channels except the channel specified to PickupChan() would be marked as ringing until the call had been hung up. When using the PickupChan application the channel executing the application is swapped into place of another channel. As part of this process the channel is answered. The Dial application has explicit logic which checks if the channel is answered, cancels all other outgoing channels, and bridges. This logic is different than the normal logic that is executed when an outgoing channel is answered. This different logic failed to publish dial events stating that the other outgoing channels had been canceled. As a result references to the outgoing channels were held onto by the dial masquerade process until the call had been ended and the channels had gone away. This would result in the channels appearing in the "core show channels" list despite not being present anymore and would also result in incorrect device state. This change makes it so that this logic also publishes dial events stating that the other outgoing channels have been canceled. ASTERISK-26549 Change-Id: Iea7168e6e82f7d4609ec0366153804e4f55ea64f
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index d871f7f57..2f5935d19 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1301,6 +1301,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
}
}
peer = c;
+ publish_dial_end_event(in, out_chans, peer, "CANCEL");
ast_copy_flags64(peerflags, o,
OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |