<p>Kevin Harwell <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14759">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, approved
Kevin Harwell: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Don't aggressively terminate on failed re-INVITE.<br><br>Per the RFC when an outgoing re-INVITE is done we should<br>only terminate the dialog if a 481 or 408 is received.<br><br>ASTERISK-29033<br><br>Change-Id: I6c3ff513aa41005d02de0396ba820083e9b18503<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index f89416e..77b6615 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -3907,8 +3907,11 @@</span><br><span> ast_sip_session_send_request_with_cb(session, tdata, cb);</span><br><span> return;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- if (tsx->status_code != 488 && tsx->status_code != 500) {</span><br><span style="color: hsl(0, 100%, 40%);">- /* Other reinvite failures (except 488 and 500) result in destroying the session. */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Per RFC3261 14.1 a response to a re-INVITE should only terminate</span><br><span style="color: hsl(120, 100%, 40%);">+ * the dialog if a 481 or 408 occurs. All other responses should leave</span><br><span style="color: hsl(120, 100%, 40%);">+ * the dialog untouched.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (tsx->status_code == 481 || tsx->status_code == 408) {</span><br><span> if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS</span><br><span> && tdata) {</span><br><span> ast_sip_session_send_request(session, tdata);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14759">change 14759</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/c/asterisk/+/14759"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/16.8 </div>
<div style="display:none"> Gerrit-Change-Id: I6c3ff513aa41005d02de0396ba820083e9b18503 </div>
<div style="display:none"> Gerrit-Change-Number: 14759 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>