]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
bridge: stuck channel(s) after failed attended transfer
authorKevin Harwell <kharwell@digium.com>
Tue, 20 Jun 2017 21:01:48 +0000 (16:01 -0500)
committerKevin Harwell <kharwell@digium.com>
Wed, 21 Jun 2017 16:17:41 +0000 (11:17 -0500)
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

main/bridge.c

index 740a88f8cebda2f1c67ab8a88e377ed6d91ee7b2..73a3d9282d2582bb28bb12f8e5ca0a88ebcae352 100644 (file)
@@ -4789,7 +4789,7 @@ enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_tra
        res = AST_BRIDGE_TRANSFER_SUCCESS;
 
 end:
-       if (res == AST_BRIDGE_TRANSFER_SUCCESS && hangup_target) {
+       if ((res == AST_BRIDGE_TRANSFER_SUCCESS && hangup_target) || res == AST_BRIDGE_TRANSFER_FAIL) {
                ast_softhangup(to_transfer_target, AST_SOFTHANGUP_DEV);
        }