Hello,

 

Quoting from the bug report, where Daniel already replied:

 

“It looks like you are using topoh module, which has the purpose of changing the headers that contain ip addresses. Remove it from your config.”

 

Have you tried already to deactivate this module in your cfg?

 

Cheers,

 

Henning

 

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Edward Romanenco
Sent: Sunday, March 29, 2020 2:51 PM
To: sr-users@lists.sip-router.org
Subject: [SR-Users] Kamailio breaks RFC's 'Contact Header'

 

Description

I'm running Kamailio 5.2.0, whenever I relay an invite via Kamailio, my original contact header is changed from the original:

sip:+XXXXXXXXX@YYY.YYY.YYY.YYYY:5060;transport=udp;gw=netvision

To

sip:YYY.YYY.YYY.YYY;line=sr-.n274i0TMfsHMcCAlVyAMV5IlgCXvV8n4edQlgIUlgKQ4Vk74gI1LmZ69NM79FZAR3JC.cDNLfHUj3Wnp3MP9nd*.

Even when I set it correctly on my route, using:

remove_hf("Contact");

append_hf("Contact: sip:$tU@YYY.YYY.YYY.YYY:5060;transport=udp;gw=netvision\r\n", "Contact");

 

It still ends up being modified. 

What can I do to keep the contact header as it is?

 

SIP Traffic

U YYY.YYY.YYY.YYY:5060 -> 81.24.193.248:5060

INVITE sip:+442033202609@81.24.193.248:5060 SIP/2.0.

Record-Route: <sip:YYY.YYY.YYY.YYY;r2=on;lr=on;ftag=mp0S9yH11vryH;vsf=AAAAAAAAAAAAAAAAAAAAAAADCAEACRgPGB8AAy4xNjM->.

Record-Route: <sip:2YYY.YYY.YYY.YYY;line=sr-.n274V8TlidQMVyUlg87vV8nlfDXlVHB9VD0.VHB9VDoLGtNRbH7ltlTEkyQl3jXEky1LNMoRkt5ukt5ukt5ukt5ukt5ukt5ukt5ukt5W8M5WktckoLuWAsduktTMm64pCAD>.

Via: SIP/2.0/UDP YYY.YYY.YYY.YYY;branch=z9hG4bK53e9.308596b23ed683368534c9d609dce0f6.0.

Via: SIP/2.0/UDP YYY.YYY.YYY.YYY;branch=z9hG4bKsr-kA2uvfsUlerJWtIylgCXvV8n4edQlgIUlgKQ4Vk74gI1.oJVjb2njburlgCXvV8n4edQlgIUlgKQ4HWsRbWPLVDX.GrXLcAHlcC74nZXKbTVpcHh4b6mMGZvJgLsLcJTkgtGu2PGgy**.

Max-Forwards: 67.

From: +18702935016 <sip:+18702935016@YYY.YYY.YYY.YYY>;tag=mp0S9yH11vryH.

To: <sip:+442033202609@81.24.193.248>.

Call-ID: !!:jbkfMgyHjbsDjblfjqAQlVldvgyHKolDlcIHlcknKVIdjcIT.

CSeq: 18182498 INVITE.

Contact: <sip:YYY.YYY.YYY.YYY;line=sr-.n274i0TMfsHMcCAlVyAMV5IlgCXvV8n4edQlgIUlgKQ4Vk74gI1LmZ69NM79FZAR3JC.cDNLfHUj3Wnp3MP9nd*>.

User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20180706T160334Z~de3df8dc0e~64bit.

Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY.

Supported: timer, path, replaces.

Allow-Events: talk, hold, conference, refer.

Content-Type: application/sdp.

Content-Disposition: session.

Content-Length: 224.

Remote-Party-ID: "+18702935016" <sip:+18702935016@YYY.YYY.YYY.YYY>;party=calling;screen=yes;privacy=off.

.

v=0.

o=FreeSWITCH 1585439298 1585439299 IN IP4 ZZZ.ZZZ.ZZZ.ZZZ.

s=FreeSWITCH.

c=IN IP4 ZZZ.ZZZ