<p></p>
<p>For replies, the function <code>is_first_hop()</code> is a best effort attempt to figure out if the proxy is the node next to the callee and cannot detect spirals. See the readme explaining what it does for a reply.</p>
<p>The parsing of the IP in the record route header is needed to match the source IP and detect loops, this is by design and needed for the expected behaviour.</p>
<p>A new function (or parameter) can be added to control if one needs to detect loops or not, based on how its SIP routing is designed through the proxy.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2732#issuecomment-836548588">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOVKRI55XEYYDOZMQTTM63NXANCNFSM44QNZLCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZKEXKVNYBLXKO7XPGLTM63NXA5CNFSM44QNZLCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGHOLP3A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2732#issuecomment-836548588",
"url": "https://github.com/kamailio/kamailio/issues/2732#issuecomment-836548588",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>