[SR-Users] Adding Contacts info from branches in 302 redirect not as expected

DanB danb.lists at gmail.com
Mon May 27 16:42:36 CEST 2013


Hey Guys,

I was wondering if someone can help me with identifying my issue (which 
I suspect it as a  bug).

I am doing some redirect tests between 2 servers, both running same 
Kamailio version - 4.0.0 out of debian packages.
"""
root at IECDev:/home/dan# kamailio -V
version: kamailio 4.0.0 (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, 
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_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 13:13:24 Mar 29 2013 with gcc 4.7.2
"""

On redirect server I have location stored, doing lookup and right after 
using "sl_send_reply("302", "iClass4-AP Redirect");"

Up to information stored in the Contact of redirect request everything 
works smooth, the problem which I get is with the information in the 
Contact of the redirect:
"""
#
U 2013/05/27 16:55:39.171237 127.0.0.1:5070 -> 10.10.10.21:5060
SIP/2.0 302 iClass4 AP Redirect.
Call-ID: 1886b401c36753c96bb85a0f4ad7ef88 at 0:0:0:0:0:0:0:0.
CSeq: 2 INVITE.
From: "dan" <sip:dan at iec.itsyscom.com>;tag=9f9fd3ed.
To: <sip:dan at iec.itsyscom.com>;tag=46a6e639fa023622ac1ba4fea686e961.affb.
Via: SIP/2.0/UDP 10.10.10.21;branch=z9hG4bK0947.8bc60857.0.
Via: SIP/2.0/UDP 
10.10.10.154:5060;rport=5060;branch=z9hG4bK-363833-3efe2f43332be9a60ebd1e1aad124280.
Contact: 
<sip:dan at 10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072>;q=1, 
sip:dan at 10.10.10.154:5060;transport=udp;registering_acc=iec_itsyscom_com.
Server: iClass4-AP 4.0.0.
Content-Length: 0.
"""

It appears that the information of the first contact is correctly 
encapsulated but the second (out of first branch) not.

Due to this in the server capturing the redirect I will only have first 
contact correctly written in the ruri and second one partially. Example 
of loging this:
"""
May 27 16:55:39 IECDev /usr/sbin/kamailio[3556]: ERROR: <script>: 
Extracted destination set: Contact: <sip:dan at 10.10.10.154:5060>;q=0.01, 
<sip:dan at 10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072>;q=1, 
ru: sip:dan at iec.itsyscom.com, du: sip:127.0.0.1:5070
May 27 16:55:39 IECDev /usr/sbin/kamailio[3556]: ERROR: <script>: 
Branches: <sip:dan at 10.10.10.154:5060>;q=0.01, 
<sip:dan at 10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072>;q=1
""".

I would suspect the redirect function not properly inserting the content 
of each contact uri within it's own <> boundaries but I would appreciate 
a confirmation on this from someone more experienced with Kamailio's code.

Thanks in advance for any tip!

DanB



More information about the sr-users mailing list