<p>Scenario:<br>
U1 (caller) ---> P1 (192.168.0.245, kamailio 4.3, loose-router) ----> P2 ----> (192.168.0.101, strict router) ----> .... ----> U2 (called)</p>

<p>When U2 answers the call, at P1 arrives the 200 OK with:<br>
Record-Route: sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-28d2e<br>
Record-Route: sip:192.168.0.245;lr=on</p>

<p>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.</p>

<p>From kamailio logs I see:<br>
<code>Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:88]: is_preloaded(): is_preloaded: No<br>
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<br>
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'<br>
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:878]: after_loose(): Next URI is a loose router<br>
</code></p>

<p>The Route HF in the ACK with the URI of the next hop does not contain ;lr .<br>
It seems that the function is_strict fails detecting the strict router. </p>

<p>Below the ACK received by U1:</p>

<p><code>#<br>
U 172.26.130.235:44435 -> 192.168.0.245:5060<br>
ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp SIP/2.0<br>
Via: SIP/2.0/UDP 172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-<br>
Max-Forwards: 70<br>
Route: <sip:192.168.0.245;lr><br>
Route: <sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-28d2e><br>
Contact: <sip:0000000010@172.26.130.235:44435;transport=UDP><br>
To: <sip:0000000011@192.168.0.245;transport=UDP>;tag=516145211<br>
From: <sip:0000000010@192.168.0.245;transport=UDP>;tag=a56ac352<br>
Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.<br>
CSeq: 2 ACK<br>
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<br>
User-Agent: Z 3.6.25251 r25476<br>
Content-Length: 0<br>
</code></p>

<p>and this the ACK forwarded by Kamailio to P2</p>

<p><code>#<br>
U 192.168.0.245:5060 -> 192.168.0.101:5060<br>
ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp SIP/2.0<br>
Via: SIP/2.0/UDP 192.168.0.245;branch=z9hG4bKa252.cc67d8b538d8ad5c01c3e75d472653ec.0<br>
Via: SIP/2.0/UDP 172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-<br>
Max-Forwards: 69<br>
Route: <sip:0000000011@192.168.0.101;transport=udp;pgw-call=call-28d2e><br>
Contact: <sip:0000000010@172.26.130.235:44435;transport=UDP><br>
To: <sip:0000000011@192.168.0.245;transport=UDP>;tag=516145211<br>
From: <sip:0000000010@192.168.0.245;transport=UDP>;tag=a56ac352<br>
Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.<br>
CSeq: 2 ACK<br>
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<br>
User-Agent: Z 3.6.25251 r25476<br>
Content-Length: 0<br>
</code></p>

<p>Thanks. Regards.</p>

<p>Antonio</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/267">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZWmdhD6bVxpAluuh4INcqY6JSOg7ks5oheoogaJpZM4FgQBJ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/267"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>