[sr-dev] [kamailio/kamailio] Retaining Contact Header for 301, 302 requests when using Topoh module (Issue #3256)

tuan-pham-hoiio notifications at github.com
Wed Oct 5 11:40:57 CEST 2022


### Description

After I turned on topoh module, the forwarding call flow seems to break. This might be caused by the Contact header on Redirecting request is masked.

### Expected behavior

The Contact header in 301, 302 SIP message will not be masked, and the forward call will succeed.

#### Actual observed behavior

The 302 SIP Contact header gets masked by 127.0.0.1 (masked_ip).

#### SIP Traffic

```
2022/10/05 13:47:58.093790 192.168.1.109:5060 -> 192.168.1.66:55709
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/TCP 192.168.1.66:58554;received=192.168.1.66;branch=z9hG4bK-524287-1---493db1f2d8f51001;rport=55709
Record-Route: <sip:127.0.0.1;line=sr-N6IAzBFsMJZfWBc7MmZfMxq-W.y6Mx1LMBu5oB1dNB1EpSthH.3sW6WBW.Vlz6aYgxuqMB37z.pBMP**>
Record-Route: <sip:192.168.1.109;transport=tcp;r2=on;lr;ftag=697cc523;did=d26.97c1>
From: <sip:1000 at 192.168.1.109;transport=TCP>;tag=697cc523
To: <sip:1001 at 192.168.1.109>;tag=1357659545
Call-ID: g_hnmT8yukR7M9QxI-t6jA..
CSeq: 2 INVITE
Contact: <sip:127.0.0.1;line=sr-N6IAzBj6M.KyM.qLOBF6zGZfOBF6W.vuMxNA>
Supported: replaces, path, timer
User-Agent: Grandstream GXP1620 1.0.4.106
Diversion: <sip:1001 at 192.168.1.165:5070>;reason=unconditional
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0
```

### Possible Solutions

The behavior becomes normal when I turn off the topoh module.
Hence, I think this can be solved by retaining the Contact header for 301, 302 requests when using topoh.

### Additional Information

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

```
kamailio 5.4.5
```

* **Operating System**:

```
Centos 7
```

[topoh_302.tar.gz](https://github.com/kamailio/kamailio/files/9714508/topoh_302.tar.gz)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3256
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3256 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20221005/19c13959/attachment.htm>


More information about the sr-dev mailing list