<p></p>
<p dir="auto">It seems that TOPOS is not working properly on RE-INVITE and stop masking IP and contact on some RE-INVITE.</p>
<p dir="auto">When a RE-INVITE is send with Kamailio IP as Request-URI TOPOS is not operating.</p>
<p dir="auto">Note : we are using the HTABLE trick to rewrite $ru and match the call but we would need to have TOPOS re-evaluating the dialog once done.</p>
<p dir="auto">We use a standard configuration with 2 modifications.</p>
<ol dir="auto">
<li>
<p dir="auto">in route[DISPATCH] to set the HTABLE<br>
if(is_method("INVITE")) {<br>
$sht(ct=>$ci::$ft) = $sel(contact.uri);<br>
}</p>
</li>
<li>
<p dir="auto">in route[WITHINDLG] to find the call if R-URI = myself<br>
if(has_totag() && uri==myself) {<br>
if($sht(ct=>$ci::$ft) != $null && $T_reply_code > 400) $shtex(ct=>$ci::$ft) = 10 ;<br>
if($sht(ct=>$ci::$tt) != $null) {<br>
$ru = $sht(ct=>$ci::$tt);<br>
if (is_method("BYE")) $shtex(ct=>$ci::$tt) = 10 ;<br>
route(RELAY);<br>
}<br>
}</p>
</li>
</ol>
<p dir="auto">As you can see in the PCAP the RE-INVITE goes directly to calling stating with the Contact not updated and the 200 OK is also sent to called party with wrong Contact info too.<br>
<a href="https://github.com/kamailio/kamailio/files/8730489/topos-issue.zip">topos-issue.zip</a></p>
<p dir="auto">This behavior breaks the BYE procedure.</p>
<p dir="auto">Any advice ?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3118">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJGFGP5EFV57XXUIBTVKZJ57ANCNFSM5WMRJ3RQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZIS563K36CTZZHCLG3VKZJ57A5CNFSM5WMRJ3R2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4SQGIYGQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3118</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3118",
"url": "https://github.com/kamailio/kamailio/issues/3118",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>