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?

Troubleshooting

Reproduction

Debugging Data

(paste your debugging data here)

Log Messages

(paste your log messages here)

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

Possible Solutions

Additional Information

version: kamailio 5.2.0-dev6 (x86_64/linux) c4daee
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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
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: c4daee
compiled on 15:59:42 Aug 22 2018 with gcc 5.4.0

Linux version 4.4.0-98-generic (buildd@lcy01-03) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017

Linux kamaillioegress 4.4.0-98-generic #121-Ubuntu SMP Tue Oct 10 14:24:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux



You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.