[sr-dev] [kamailio/kamailio] TOPOS not handling change of to-tag in provisional responses (#2489)

James Brown notifications at github.com
Tue Sep 29 22:19:05 CEST 2020


### Description

TOPOS Module is not handling change of to-tags in provisional responses.
When the B party sends two provisional responses (to an INVITE) with different to tags, a subsequent PRACK does not get handled/routed correctly.
In this deployment, dbtext is used.

### Troubleshooting

The TOPOS module is enabled in kamailio 5.3.6.
```
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              
```
The 180-Ringing response does not have a Require header field with 100rel, but the 183-Session-Progress response does have `Require:100rel` in it.
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.
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).

#### Reproduction

- enable TOPOS module with text database and apply it to all transactions
- make an INVITE through the proxy, with `Supported:100rel`
- send a 180-Ringing response from the B party
- send a 183-Session-Progress response from the B party, with `Require:100rel` and a different to-tag
- watch the PRACK request fail

#### Debugging Data

```
I can provide debugging data later.
```

#### Log Messages

```
I can provide logging data later.
```

#### SIP Traffic

<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
https://pastebin.com/XEf2Ndh2
```

### Possible Solutions

Unknown
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
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

```

* **Operating System**:

```
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


```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2489
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200929/f494ebce/attachment.htm>


More information about the sr-dev mailing list