<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14735">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/14735/1</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 7172e27b..0f47c92 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -3976,8 +3976,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/+/14735">change 14735</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/+/14735"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I6c3ff513aa41005d02de0396ba820083e9b18503 </div>
<div style="display:none"> Gerrit-Change-Number: 14735 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>