From 7a4581a41b3de0285a31007915f89b8b03c505b6 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Thu, 24 Sep 2015 14:49:46 -0500 Subject: [PATCH] Do not swallow frames on channels leaving bridges. When leaving a bridge, indications on a channel could be swallowed by the internal indication logic because it appears that the channel is on its way to be hung up anyway. One such situation where this is detrimental is when channels on hold are redirected out of a bridge. The AST_CONTROL_UNHOLD indication from the bridging code is swallowed, leaving the channel in question to still appear to be on hold. The fix here is to modify the logic inside ast_indicate_data() to not drop the indication if the channel is simply leaving a bridge. This way, channels on hold redirected out of a bridge revert to their expected "in use" state after the redirection. ASTERISK-25418 #close Reported by Mark Michelson Change-Id: If6115204dfa0551c050974ee138fabd15f978949 --- main/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/channel.c b/main/channel.c index 8be7aab361..d84bf7236a 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4435,7 +4435,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition, /* Don't bother if the channel is about to go away, anyway. */ if ((ast_test_flag(ast_channel_flags(chan), AST_FLAG_ZOMBIE) - || ast_check_hangup(chan)) + || (ast_check_hangup(chan) && !ast_channel_is_leaving_bridge(chan))) && condition != AST_CONTROL_MASQUERADE_NOTIFY) { res = -1; goto indicate_cleanup; -- 2.47.2