<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div>
<div>
<div dir="ltr">It’s a very non rfc scenario. Source ip and via are the ip of a loadbalancer that I need to skip …. ;-(. The contact does have the correct ip. Anyway, you gave me a good hint. I will add the contact ip as record route and see what that gives.</div>
</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
Verzonden vanuit <a href="https://aka.ms/o0ukef">Outlook voor iOS</a></div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Van:</b> Users <users-bounces@lists.opensips.org> namens Ben Newlin <Ben.Newlin@genesys.com><br>
<b>Verzonden:</b> Friday, October 6, 2023 5:35:40 PM<br>
<b>Aan:</b> OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Onderwerp:</b> Re: [OpenSIPS-Users] on routing invite's in a trunk context.</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
{color:blue;
text-decoration:underline}
.x_MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
-->
</style>
<div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt">Johan,</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">This is actually a pretty standard SIP flow that we use all the time. I recommend this article [1] for an overview of how routing works in SIP.
</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">In short, the Contact and Record-Route headers are only used for routing of requests not responses, and mostly only sequential requests which are requests within a dialog. The topology_hiding_match and loose_route
functions both operate on requests only, so they can both only be called from a request_route [1] [2].</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">The 200 OK is a response within the initial INVITE transaction. Responses within a SIP transaction are routed based on the source IP of request and/or the Via headers. OpenSIPS should just handle that for
you, unless you have some strange routing.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">[1] <a href="https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explained/">
https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explained/</a></span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">[2] <a href="https://opensips.org/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match">
https://opensips.org/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match</a></span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">[3] <a href="https://opensips.org/docs/modules/3.2.x/rr.html#func_loose_route">
https://opensips.org/docs/modules/3.2.x/rr.html#func_loose_route</a></span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div>
<p class="x_MsoNormal"><span style="font-size:11.0pt; color:black">Ben Newlin</span><span style="font-size:11.0pt"></span></p>
</div>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div id="x_mail-editor-reference-message-container">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt; color:black">From:
</span></b><span style="font-size:12.0pt; color:black">Users <users-bounces@lists.opensips.org> on behalf of johan <johan@democon.be><br>
<b>Date: </b>Friday, October 6, 2023 at 10:30 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>[OpenSIPS-Users] on routing invite's in a trunk context.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt"> EXTERNAL EMAIL - Please use caution with links and attachments <br>
<br>
This is a general question on routing (to be honest: it is a really <br>
strange case).<br>
<br>
<br>
A has a sip trunk to B (opensips), B has a sip trunk to C<br>
<br>
<br>
<br>
A sends an invite to B with contact header A' and record-route header <br>
to A''<br>
<br>
B string the record_route header , calls topology hiding and droutes the <br>
call to C<br>
<br>
C sends 200 OK back but it needs to be routed on the content of the <br>
contact header.<br>
<br>
<br>
Now how does this route to A ? Is this the default <br>
topology_hiding_match() case ? Or do I need to do something special ?<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
Users@lists.opensips.org<br>
</span><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"><span style="font-size:11.0pt">https://protect-us.mimecast.com/s/8fzVCG6Q9Ni160o8YuKJzbj?domain=lists.opensips.org</span></a><span style="font-size:11.0pt"></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>