[Asterisk-code-review] stasis: Only place stasis created and dialed channels into dial bridge. (...asterisk[16])
Friendly Automation
asteriskteam at digium.com
Fri May 3 10:47:18 CDT 2019
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11320 )
Change subject: stasis: Only place stasis created and dialed channels into dial bridge.
......................................................................
stasis: Only place stasis created and dialed channels into dial bridge.
The dial bridge is meant to hold channels which have been created
and dialed in stasis. It handles the frames coming from them and raises
the appropriate events.
It was possible for the code to mistakenly place calls which came
from the dialplan into the dial bridge if they were not in an
answered state. These channels are not outgoing channels and
should not be placed into the dial bridge.
The code now checks to ensure that only stasis created channels are
placed into the dial bridge by checking that a PBX does not exist
on the channel.
ASTERISK-27756
Change-Id: Ideee69ff06c9a0b31f7ed61165f5c055f51d21b6
---
M res/stasis/control.c
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/stasis/control.c b/res/stasis/control.c
index 866b58e..3532324 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -1085,7 +1085,11 @@
{
ast_bridge_depart(chan);
- if (!ast_check_hangup(chan) && ast_channel_state(chan) != AST_STATE_UP) {
+ /* Channels which have a PBX are not ones that have been created and dialed from ARI. They
+ * have externally come in from the dialplan, and thus should not be placed into the dial
+ * bridge. Only channels which are created and dialed in ARI should go into the dial bridge.
+ */
+ if (!ast_check_hangup(chan) && ast_channel_state(chan) != AST_STATE_UP && !ast_channel_pbx(chan)) {
/* Channel is still being dialed, so put it back in the dialing bridge */
add_to_dial_bridge(control, chan);
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11320
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ideee69ff06c9a0b31f7ed61165f5c055f51d21b6
Gerrit-Change-Number: 11320
Gerrit-PatchSet: 2
Gerrit-Owner: Abhay Gupta <abhay at avissol.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Holger Hans Peter Freyther <automatic at freyther.de>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190503/1a7d58e2/attachment.html>
More information about the asterisk-code-review
mailing list