<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6571">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
Richard Mudgett: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Don't end session when receiving a 500 on a reinvite<br><br>During a reinvite, if a remote endpoint error occurs and it returns a 500 the<br>session would end. This patch makes it so the session is not terminated, but<br>continues as it was.<br><br>The reason for this is because some endpoints may send non session terminating<br>"server errors" like a failed codec negotiation. So in this case instead of<br>ending the call it can hopefully continue. In the case of a real server error<br>the session is already "doomed", will be known soon enough and appropriately<br>ended by Asterisk later.<br><br>Change-Id: Ifeedae86b8cb44b92d52c79046522ec5f0aff1d5<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 2 insertions(+), 2 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 2beb6dc..e25ba0a 100644<br>--- a/res/res_pjsip_session.c<br>+++ b/res/res_pjsip_session.c<br>@@ -3485,8 +3485,8 @@<br> ast_sip_session_send_request_with_cb(session, tdata, cb);<br> return;<br> }<br>- if (tsx->status_code != 488) {<br>- /* Other reinvite failures (except 488) result in destroying the session. */<br>+ if (tsx->status_code != 488 && tsx->status_code != 500) {<br>+ /* Other reinvite failures (except 488 and 500) result in destroying the session. */<br> if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS<br> && tdata) {<br> ast_sip_session_send_request(session, tdata);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6571">change 6571</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/6571"/><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: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ifeedae86b8cb44b92d52c79046522ec5f0aff1d5 </div>
<div style="display:none"> Gerrit-Change-Number: 6571 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>