[Asterisk-code-review] bridge_softmix: clear hold when joining a softmix bridge (asterisk[16])

Kevin Harwell asteriskteam at digium.com
Wed Nov 13 17:31:51 CST 2019


Kevin Harwell has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13176 )


Change subject: bridge_softmix: clear hold when joining a softmix bridge
......................................................................

bridge_softmix: clear hold when joining a softmix bridge

MOH continues to play if a channel was on hold prior to entering a softmix
bridge. When this happens other participants in the bridge will hear the
music, and it will not stop even if the original "holder" attempts an unhold.

For the most part a softmix bridge ignores holds, so a participating channel
shouldn't join while on hold. This patch checks to see if the channel joining
the softmix bridge is currently on hold. If so then it indicates an unhold.

ASTERISK-28618

Change-Id: I66ccd4efc80f5b4c3dd68186b379eb442916392b
---
M bridges/bridge_softmix.c
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/76/13176/1

diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index a90c716..d907084 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -726,6 +726,13 @@
 		sfu_topologies_on_join(bridge, bridge_channel);
 	}
 
+	/* Complete any active hold before entering, or transitioning to softmix. */
+	if (ast_channel_hold_state(bridge_channel->chan) == AST_CONTROL_HOLD) {
+		ast_debug(1, "Channel %s simulating UNHOLD for bridge softmix join.\n",
+			ast_channel_name(bridge_channel->chan));
+		ast_indicate(bridge_channel->chan, AST_CONTROL_UNHOLD);
+	}
+
 	softmix_poke_thread(softmix_data);
 	return 0;
 }

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13176
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I66ccd4efc80f5b4c3dd68186b379eb442916392b
Gerrit-Change-Number: 13176
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191113/c111a10c/attachment-0001.html>


More information about the asterisk-code-review mailing list