<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6168">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Release media resources on session end quicker.<br><br>A change was made long ago where the session was kept around<br>until the underlying INVITE session had been destroyed. This<br>had the side effect of also keeping the underlying media resources<br>around for this time as well.<br><br>This change ensures that when we are told to terminate the<br>session we immediately release any media sessions associated<br>with it.<br><br>ASTERISK-27110<br><br>Change-Id: I643e431d5c3bf05cda220c1d39e824a505a29b82<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c<br>index bb349a4..31e2014 100644<br>--- a/res/res_pjsip_session.c<br>+++ b/res/res_pjsip_session.c<br>@@ -2396,6 +2396,15 @@<br> response = 603;<br> }<br> <br>+ /* The media sessions need to exist for the lifetime of the underlying channel<br>+ * to ensure that anything (such as bridge_native_rtp) has access to them as<br>+ * appropriate. Since ast_sip_session_terminate is called by chan_pjsip and other<br>+ * places when the session is to be terminated we terminate any existing<br>+ * media sessions here.<br>+ */<br>+ SWAP(session->active_media_state, session->pending_media_state);<br>+ ast_sip_session_media_state_reset(session->pending_media_state);<br>+<br> switch (session->inv_session->state) {<br> case PJSIP_INV_STATE_NULL:<br> if (!session->inv_session->invite_tsx) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6168">change 6168</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/6168"/><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: merged </div>
<div style="display:none"> Gerrit-Change-Id: I643e431d5c3bf05cda220c1d39e824a505a29b82 </div>
<div style="display:none"> Gerrit-Change-Number: 6168 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>