Scenario: U1 (caller) ---> P1 (192.168.0.245, kamailio 4.3, loose-router) ----> P2 ----> (192.168.0.101, strict router) ----> .... ----> U2 (called)
When U2 answers the call, at P1 arrives the 200 OK with: Record-Route: sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-28d2e Record-Route: sip:192.168.0.245;lr=on
The problem is that the ACK from U1 is forwarded from kamailio to P2, as if P2 is a loose router. P2 drops the ACK message.
From kamailio logs I see:
`Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:88]: is_preloaded(): is_preloaded: No Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:783]: after_loose(): Topmost route URI: 'sip:192.168.0.245;lr=on' is me Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:869]: after_loose(): URI to be processed: 'sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-289ce' Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:878]: after_loose(): Next URI is a loose router `
The Route HF in the ACK with the URI of the next hop does not contain ;lr . It seems that the function is_strict fails detecting the strict router.
Below the ACK received by U1:
`# U 172.26.130.235:44435 -> 192.168.0.245:5060 ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp SIP/2.0 Via: SIP/2.0/UDP 172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z- Max-Forwards: 70 Route: sip:192.168.0.245;lr Route: sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-28d2e Contact: sip:0000000010@172.26.130.235:44435;transport=UDP To: sip:0000000011@192.168.0.245;transport=UDP;tag=516145211 From: sip:0000000010@192.168.0.245;transport=UDP;tag=a56ac352 Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY. CSeq: 2 ACK Proxy-Authorization: Digest username="0000000010",realm="192.168.0.245",nonce="VaTXblWk1kKUxIMJBdWbpRBBCP850QVR",uri="sip:0000000011@192.168.0.245;transport=UDP",response="1daf03c97b8a12e0154d463f543e5592",algorithm=MD5 User-Agent: Z 3.6.25251 r25476 Content-Length: 0 `
and this the ACK forwarded by Kamailio to P2
`# U 192.168.0.245:5060 -> 192.168.0.101:5060 ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.0.245;branch=z9hG4bKa252.cc67d8b538d8ad5c01c3e75d472653ec.0 Via: SIP/2.0/UDP 172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z- Max-Forwards: 69 Route: sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-28d2e Contact: sip:0000000010@172.26.130.235:44435;transport=UDP To: sip:0000000011@192.168.0.245;transport=UDP;tag=516145211 From: sip:0000000010@192.168.0.245;transport=UDP;tag=a56ac352 Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY. CSeq: 2 ACK Proxy-Authorization: Digest username="0000000010",realm="192.168.0.245",nonce="VaTXblWk1kKUxIMJBdWbpRBBCP850QVR",uri="sip:0000000011@192.168.0.245;transport=UDP",response="1daf03c97b8a12e0154d463f543e5592",algorithm=MD5 User-Agent: Z 3.6.25251 r25476 Content-Length: 0 `
Thanks. Regards.
Antonio
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/267
I push a patch to master branch in commit 0c42a84 - can you test it?
If all ok, I will backport
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/267#issuecomment-125272156
Hi Daniel, the patch fixed the issue. Now the next hop is correctly detected as a strict router:
<pre> 0(21553) DEBUG: rr [loose.c:88]: is_preloaded(): is_preloaded: No 0(21553) DEBUG: rr [loose.c:783]: after_loose(): Topmost route URI: 'sip:10.10.45.227;lr=on' is me 0(21553) DEBUG: rr [loose.c:871]: after_loose(): URI to be processed: 'sip:123456@10.10.45.228;transport=udp;pgw-call=call-9' 0(21553) DEBUG: rr [loose.c:873]: after_loose(): Next URI is a strict router 0(21553) DEBUG: rr [loose.c:328]: save_ruri(): New header: 'Route: <sip:10.10.45.203;transport=udp>'</pre>
Thanks for the support.
Regards. Antonio
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/267#issuecomment-125516649
Closed #267.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/267#event-368626723
Thanks for providing feedback, patch pushed to 4.2 and 4.3 branches.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/267#issuecomment-126039948