<p>Like mentioned by comments here, the behavior is as expected by specs, the proxy has to resolve the R-URI address for forwarding. The ACK following 200ok is independent of INVITE transaction (can have also different path than the INVITE, a matter of Record-Route headers).</p>
<p>Use other variants if you want to keep the ip/port of the callee, like a dialog variable, or htable value based on call id and to-tag, or even use set_contact_alias()/handle_ruri_alias() for a solution that doesn't require storage inside kamailio.</p>
<p>I am closing this one, if you want to discuss further about possible solutions, write to sr-users mailing list.</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/1998?email_source=notifications&email_token=ABO7UZKTSPDWNR5KJG4KVS3P5S3RRA5CNFSM4H4ZREHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEV4FQ#issuecomment-508124694">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZL2DZESJYIGXZ4BU73P5S3RRANCNFSM4H4ZREHA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZIXJPT5SEEPD3BOX7LP5S3RRA5CNFSM4H4ZREHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEV4FQ.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/1998?email_source=notifications\u0026email_token=ABO7UZKTSPDWNR5KJG4KVS3P5S3RRA5CNFSM4H4ZREHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEV4FQ#issuecomment-508124694",
"url": "https://github.com/kamailio/kamailio/issues/1998?email_source=notifications\u0026email_token=ABO7UZKTSPDWNR5KJG4KVS3P5S3RRA5CNFSM4H4ZREHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZEV4FQ#issuecomment-508124694",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>