[Asterisk-code-review] bridge: stuck channel(s) after failed attended transfer (asterisk[certified/13.13])

Kevin Harwell asteriskteam at digium.com
Tue Jun 20 16:10:24 CDT 2017


Kevin Harwell has uploaded this change for review. ( https://gerrit.asterisk.org/5895


Change subject: bridge: stuck channel(s) after failed attended transfer
......................................................................

bridge: stuck channel(s) after failed attended transfer

If an attended transfer failed it was possible for some of the channels
involved to get "stuck" because Asterisk was not hanging up the transfer target.

This patch ensures Asterisk hangs up the transfer target when an attended
transfer failure occurs.

ASTERISK-27075 #close

Change-Id: I98a6ecd92d3461ab98c36f0d9451d23adaf3e5f9
---
M main/bridge.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/95/5895/1

diff --git a/main/bridge.c b/main/bridge.c
index 6152b1b..f19e90e 100644
--- a/main/bridge.c
+++ b/main/bridge.c
@@ -4786,7 +4786,11 @@
 	res = AST_BRIDGE_TRANSFER_SUCCESS;
 
 end:
-	if (res == AST_BRIDGE_TRANSFER_SUCCESS && hangup_target) {
+	/*
+	 * Hang up the transfer target if the transfer was not successful. However we also
+	 * want to hang it up if it was successful but told to do so.
+	 */
+	if (res != AST_BRIDGE_TRANSFER_SUCCESS || hangup_target) {
 		ast_softhangup(to_transfer_target, AST_SOFTHANGUP_DEV);
 	}
 

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

Gerrit-Project: asterisk
Gerrit-Branch: certified/13.13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I98a6ecd92d3461ab98c36f0d9451d23adaf3e5f9
Gerrit-Change-Number: 5895
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170620/08117619/attachment.html>


More information about the asterisk-code-review mailing list