<p>Mark Petersen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18189">View Change</a></p><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, 5 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/18189/1</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 cd1346f..0cad810 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -12441,9 +12441,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>@@ -12451,6 +12450,9 @@</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%);">+                        /* set_destination on UPDATE in early dialog,</span><br><span style="color: hsl(120, 100%, 40%);">+                  * mangles eventually later CANCEL according to ASTERISK-24628 */</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><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18189">change 18189</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/+/18189"/><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: Id1920ecbfea7739a038b14dc94487ecfe7b57eef </div>
<div style="display:none"> Gerrit-Change-Number: 18189 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Mark Petersen <bugs.digium.com@zombie.dk> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>