<p>Ivan Poddubny has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7615">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">features: Stop music on hold in Bridge AMI action<br><br>Before Asterisk 12, the Bridge action handler called ast_stop_moh on<br>both channels, but the new implementation doesn't do it, so when one<br>of the channels is on hold, it stays on hold while also being<br>in a bridge, resulting in "robotic sound".<br><br>Reported by: Zane Conkle<br><br>ASTERISK-25079 #close<br><br>Change-Id: I4b129c5a20c15e63968842460ac5a1a85903cf9f<br>---<br>M main/features.c<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/15/7615/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/features.c b/main/features.c<br>index 516c64a..5482d3f 100644<br>--- a/main/features.c<br>+++ b/main/features.c<br>@@ -758,6 +758,7 @@<br> int chanb_priority;<br> struct ast_bridge *bridge;<br> char buf[256];<br>+ int moh_is_playing;<br> RAII_VAR(struct ast_features_xfer_config *, xfer_cfg_a, NULL, ao2_cleanup);<br> RAII_VAR(struct ast_features_xfer_config *, xfer_cfg_b, NULL, ao2_cleanup);<br> <br>@@ -785,6 +786,10 @@<br> chana_priority++;<br> }<br> ast_channel_unlock(chana);<br>+ moh_is_playing = ast_test_flag(ast_channel_flags(chana), AST_FLAG_MOH);<br>+ if (moh_is_playing) {<br>+ ast_moh_stop(chana);<br>+ }<br> <br> chanb = ast_channel_get_by_name_prefix(channelb, strlen(channelb));<br> if (!chanb) {<br>@@ -793,6 +798,10 @@<br> return 0;<br> }<br> ast_channel_lock(chanb);<br>+ moh_is_playing = ast_test_flag(ast_channel_flags(chanb), AST_FLAG_MOH);<br>+ if (moh_is_playing) {<br>+ ast_moh_stop(chanb);<br>+ }<br> xfer_cfg_b = ast_get_chan_features_xfer_config(chanb);<br> chanb_exten = ast_strdupa(ast_channel_exten(chanb));<br> chanb_context = ast_strdupa(ast_channel_context(chanb));<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7615">change 7615</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7615"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4b129c5a20c15e63968842460ac5a1a85903cf9f </div>
<div style="display:none"> Gerrit-Change-Number: 7615 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Ivan Poddubny <ivan.poddubny@gmail.com> </div>