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@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@0:0:0:0:0:0:0:0. CSeq: 2 INVITE. From: "dan" sip:dan@iec.itsyscom.com;tag=9f9fd3ed. To: sip:dan@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@10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072;q=1, sip:dan@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@10.10.10.154:5060;q=0.01, sip:dan@10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072;q=1, ru: sip:dan@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@10.10.10.154:5060;q=0.01, sip:dan@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
Hello,
apparently the rule of enclosing uri in between <> was wrong, done only when q was set. I changed to do it always, to protect the uri parameters.
Can you try with the patch from commit: - http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=74bf08ef...
If nothing is broken, I will backport to stable branch.
Cheers, Daniel
On 5/27/13 4:42 PM, DanB wrote:
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@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@0:0:0:0:0:0:0:0. CSeq: 2 INVITE. From: "dan" sip:dan@iec.itsyscom.com;tag=9f9fd3ed. To: sip:dan@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@10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072;q=1, sip:dan@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@10.10.10.154:5060;q=0.01, sip:dan@10.10.10.141:3072;line=qhjb2bk0;rcv=sip:10.10.10.141:3072;q=1, ru: sip:dan@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@10.10.10.154:5060;q=0.01, sip:dan@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
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users