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

Friendly Automation asteriskteam at digium.com
Mon Nov 18 09:12:21 CST 2019


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13202 )

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

bridge_softmix: clear hold when joining a softmix bridge

MOH continues to play to a channel if that channel was on hold prior to
entering a softmix bridge. MOH 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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index fbe1587..0febc46 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -479,6 +479,13 @@
 			: DEFAULT_SOFTMIX_INTERVAL,
 		bridge_channel, 0);
 
+	/* 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/+/13202
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I66ccd4efc80f5b4c3dd68186b379eb442916392b
Gerrit-Change-Number: 13202
Gerrit-PatchSet: 2
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191118/34963703/attachment.html>


More information about the asterisk-code-review mailing list