<p>Richard Mudgett <strong>uploaded patch set #7</strong> to the change originally created by Moritz Fain.</p><p><a href="https://gerrit.asterisk.org/9297">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_stasis: Fix stale data in ARI bridges<br><br>Fixed an issue that resulted in "Allocation failed" each time an ARI<br>request was made to start playing MOH on a bridge.<br><br>In bridge_moh_create() we were attaching the after bridge callbacks to<br>chan which is the ;1 channel of the unreal channel pair.  We should have<br>attached them to the ;2 channel which is pushed into the bridge by<br>ast_unreal_channel_push_to_bridge().  The callbacks are called when the<br>specific channel leaves the bridging system.  Since the ;1 channel is<br>never put into a bridge the callbacks never get called.  The callbacks<br>then never remove the moh_wrapper from the app_bridges_moh container.  As<br>a result we cannot find the channel associated with the wrapper to start<br>MOH because it has hungup.  This is the reason causing the reported issue.<br><br>* Rather than using after bridge callbacks to cleanup, we now have<br>moh_channel_thread() doing the cleanup when the channel hangs up.<br><br>* Fixed moh_channel_thread() accumulating control frames on the stasis<br>bridge MOH channel until MOH is stopped.  Control frames are no longer<br>accumulated while MOH is playing.<br><br>* Fixed channel ref counting issue.  stasis_app_bridge_moh_channel() may<br>or may not return a channel ref.  As a result ast_ari_bridges_start_moh()<br>wouldn't know it may have a channel ref to release.<br>stasis_app_bridge_moh_channel() will now return a ref with the channel it<br>returns.<br><br>* Eliminated RAII_VAR in bridge_moh_create().<br><br>ASTERISK-26094 #close<br><br>Change-Id: Ibff479e167b3320c68aaabfada7e1d0ef7bd548c<br>---<br>M res/ari/resource_bridges.c<br>M res/res_stasis.c<br>2 files changed, 37 insertions(+), 45 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/9297/7</pre><p>To view, visit <a href="https://gerrit.asterisk.org/9297">change 9297</a>. To unsubscribe, or for help writing mail filters, 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/9297"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: Ibff479e167b3320c68aaabfada7e1d0ef7bd548c </div>
<div style="display:none"> Gerrit-Change-Number: 9297 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: Moritz Fain <moritz@fain.io> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Moritz Fain <moritz@fain.io> </div>
<div style="display:none"> Gerrit-Reviewer: Pascal Cadotte Michaud <pcm@wazo.io> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>