<p></p>
<h3>Description</h3>
<p>TOPOS Module is not handling change of to-tags in provisional responses.<br>
When the B party sends two provisional responses (to an INVITE) with different to tags, a subsequent PRACK does not get handled/routed correctly.<br>
In this deployment, dbtext is used.</p>
<h3>Troubleshooting</h3>
<p>The TOPOS module is enabled in kamailio 5.3.6.</p>
<pre><code>A1                        Kamailio           B1

  INVITE -->
   <-- 100
                                      INVITE -->
                                       <-- 100

                                       <-- 180 (to-tag = randomtag20354)
   <-- 180 (to-tag = randomtag20354)

                                       <-- 183 (to-tag = randomtag20354DAE)
   <-- 183 (to-tag = randomtag20354DAE)

   PRACK (to-tag = randomtag20354DAE) -->
    <--  403 PRACK              
</code></pre>
<p>The 180-Ringing response does not have a Require header field with 100rel, but the 183-Session-Progress response does have <code>Require:100rel</code> in it.<br>
When the A1 sends the PRACK request, the to-tag matches that in the 183-Session-Progress response, but the TOPOS module does not decode the message.<br>
Then, when kamailio processes this PRACK request, it does not have the expected Route header fields or expected RURI and cannot be routed to B1 (so a 403 response happens).</p>
<h4>Reproduction</h4>
<ul>
<li>enable TOPOS module with text database and apply it to all transactions</li>
<li>make an INVITE through the proxy, with <code>Supported:100rel</code></li>
<li>send a 180-Ringing response from the B party</li>
<li>send a 183-Session-Progress response from the B party, with <code>Require:100rel</code> and a different to-tag</li>
<li>watch the PRACK request fail</li>
</ul>
<h4>Debugging Data</h4>
<pre><code>I can provide debugging data later.
</code></pre>
<h4>Log Messages</h4>
<pre><code>I can provide logging data later.
</code></pre>
<h4>SIP Traffic</h4>

<pre><code>https://pastebin.com/XEf2Ndh2
</code></pre>
<h3>Possible Solutions</h3>
<p>Unknown</p>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.3.6 (x86_64/linux) bf6c08
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: bf6c08 
compiled on 09:57:03 Sep 10 2020 with gcc 8.3.0

</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>Debian 10.4 in docker

4.15.0-51-generic

Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:29:52 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:22 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683


</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2489">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJSHXOPIJXGVGSPG6TSII6LTANCNFSM4R6H5F5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZIMGLRZSDXFFTNZESDSII6LTA5CNFSM4R6H5F5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KTHNAZA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2489",
"url": "https://github.com/kamailio/kamailio/issues/2489",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>