[asterisk-commits] bridge: Kick channel from bridge if hung up during action. (asterisk[certified/13.1])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 24 17:16:33 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: bridge: Kick channel from bridge if hung up during action.
......................................................................


bridge: Kick channel from bridge if hung up during action.

When executing an action in a bridge it is possible for the
channel to be hung up without the bridge becoming aware of it.
This is most easily reproducible by hanging up when the bridge
is streaming DTMF due to a feature timeout. This change makes
it so after action execution the channel is checked to determine
if it has been hung up and if it has it is kicked from the bridge.

ASTERISK-25341 #close

Change-Id: I6dd8b0c3f5888da1c57afed9e8a802ae0a053062
---
M main/bridge_channel.c
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Ashley Sanders: Looks good to me, but someone else must approve



diff --git a/main/bridge_channel.c b/main/bridge_channel.c
index 914e9a4..8ccdbc1 100644
--- a/main/bridge_channel.c
+++ b/main/bridge_channel.c
@@ -1873,6 +1873,13 @@
 	default:
 		break;
 	}
+
+	/* While invoking an action it is possible for the channel to be hung up. So
+	 * that the bridge respects this we check here and if hung up kick it out.
+	 */
+	if (bridge_channel->chan && ast_check_hangup_locked(bridge_channel->chan)) {
+		ast_bridge_channel_kick(bridge_channel, 0);
+	}
 }
 
 /*!

-- 
To view, visit https://gerrit.asterisk.org/1135
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6dd8b0c3f5888da1c57afed9e8a802ae0a053062
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list