Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOPOS not handling change of to-tag in provisional responses #2489

Closed
frideo opened this issue Sep 29, 2020 · 3 comments
Closed

TOPOS not handling change of to-tag in provisional responses #2489

frideo opened this issue Sep 29, 2020 · 3 comments

Comments

@frideo
Copy link

frideo commented Sep 29, 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

https://pastebin.com/XEf2Ndh2

Possible Solutions

Unknown

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


@miconda
Copy link
Member

miconda commented Oct 1, 2020

Try with the commits from the last master branch which were just pushed to repo (the one referenced above being relevant). If works, then they will be backported.

@frideo
Copy link
Author

frideo commented Oct 1, 2020

I've successfully tested this change, using the exact same scenario.
Now the PRACK messages get routed properly to the B party, with correct Via/Contact header fields and with correct RURI.

Thanks very much for this.

@frideo frideo closed this as completed Oct 1, 2020
henningw pushed a commit that referenced this issue Oct 1, 2020
henningw pushed a commit that referenced this issue Oct 1, 2020
henningw pushed a commit that referenced this issue Oct 1, 2020
@henningw
Copy link
Contributor

henningw commented Oct 1, 2020

Thanks for the conformation, commit backported to stable branches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants