<p>Kevin Harwell <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18453">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Kevin Harwell: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: SIP route header is missing on UPDATE<br><br>if Asterisk need to send an UPDATE before answer<br>on a channel that uses Record-Route:<br>it will not include a Route header<br><br>ASTERISK-29955<br><br>Change-Id: Id1920ecbfea7739a038b14dc94487ecfe7b57eef<br>---<br>M channels/chan_sip.c<br>1 file changed, 7 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_sip.c b/channels/chan_sip.c</span><br><span>index b6aff80..77685b2 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -12443,9 +12443,8 @@</span><br><span>      * Send UPDATE to the same destination as CANCEL, if call is not in final state.</span><br><span>      */</span><br><span>  if (!sip_route_empty(&p->route) &&</span><br><span style="color: hsl(0, 100%, 40%);">-                       !(sipmethod == SIP_CANCEL ||</span><br><span style="color: hsl(0, 100%, 40%);">-                            (sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED)) ||</span><br><span style="color: hsl(0, 100%, 40%);">-                         (sipmethod == SIP_UPDATE && (p->invitestate == INV_PROCEEDING || p->invitestate == INV_EARLY_MEDIA)))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                !(sipmethod == SIP_CANCEL ||</span><br><span style="color: hsl(120, 100%, 40%);">+                  (sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED)))) {</span><br><span>             if (p->socket.type != AST_TRANSPORT_UDP && p->socket.tcptls_session) {</span><br><span>                         /* For TCP/TLS sockets that are connected we won't need</span><br><span>                   * to do any hostname/IP lookups */</span><br><span>@@ -12453,6 +12452,11 @@</span><br><span>                       /* For NATed traffic, we ignore the contact/route and</span><br><span>                         * simply send to the received-from address. No need</span><br><span>                          * for lookups. */</span><br><span style="color: hsl(120, 100%, 40%);">+            } else if (sipmethod == SIP_UPDATE && (p->invitestate == INV_PROCEEDING || p->invitestate == INV_EARLY_MEDIA)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        /* Calling set_destination for an UPDATE in early dialog</span><br><span style="color: hsl(120, 100%, 40%);">+                       * will result in mangling of the target for a subsequent</span><br><span style="color: hsl(120, 100%, 40%);">+                      * CANCEL according to ASTERISK-24628 so do not do it.</span><br><span style="color: hsl(120, 100%, 40%);">+                         */</span><br><span>          } else {</span><br><span>                     set_destination(p, sip_route_first_uri(&p->route));</span><br><span>           }</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18453">change 18453</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/+/18453"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: Id1920ecbfea7739a038b14dc94487ecfe7b57eef </div>
<div style="display:none"> Gerrit-Change-Number: 18453 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Mark Petersen <asterisk.org@zombie.dk> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-CC: Mark Petersen <bugs.digium.com@zombie.dk> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>