<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
tt
{mso-style-priority:99;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">It would cause the issue if they are sending all requests to that domain, including sequential requests like re-invite, and ignoring the Contact provided in the 200 OK. That is not correct according to RFC 3261, but I have seen many carriers
do this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><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 Mark Farmer <farmorg@gmail.com><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Friday, April 26, 2019 at 8:59 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] check_source_address()<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you, that makes sense now. I will keep that in mind for the future.
<o:p></o:p></p>
<div>
<p class="MsoNormal">In the meantime I have raised a query with our provider.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Additionally, I realised this morning that at our request, our provider is sending calls to us via a domain name instead of an IP. Would that likely cause the issue even if they are using RFC 3261? I have asked for it to be removed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Mark.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, 25 Apr 2019 at 16:50, Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">On 25.04.2019 17:11, Mark Farmer wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Thanks so much for helping with this. <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have applied the suggested config but the result is the same. OpenSIPS routes the RE-INVITE to itself and it never gets routed back to the Asterisk box.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">If the 2nd Route header in the RE-INVITE is the IP of the other interface - will that not always be the case? It's as though the 2nd Route header needs to be changed to have the IP of the Asterisk server.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Sanitized RE-INVITE from provider:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">INVITE <a href="http://sip:asterisk@my.host.name:5060" target="_blank">
sip:asterisk@my.host.name:5060</a> SIP/2.0<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p><tt><span style="font-size:10.0pt">If OpenSIPS identifies "<a href="http://my.host.name:5060" target="_blank">my.host.name:5060</a>" as a local domain, this will screw up the routing,</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>as it will go from loose (RFC 3261) to strict (old, deprecated RFC 2543 mechanism). Notice how</tt><br>
<tt>its not preserving the R-URI when it routes to itself as should happen with RFC 3261 routing,</tt><br>
<tt>because it has fallen back to RFC 2543 routing.</tt></span><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Your provider needs to follow RFC 3261 and use as Re-INVITE Request-URI the exact Contact</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>advertised by the caller: <a href="mailto:sip:asterisk@10.98.0.102:5060" target="_blank">
<sip:asterisk@10.98.0.102:5060></a>, and not confuse your routing engine</tt><br>
<tt>with a random target such as: INVITE <a href="mailto:sip:asterisk@my.host.name:5060" target="_blank">
sip:asterisk@my.host.name:5060</a>.</tt></span><o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Liviu Chircu<o:p></o:p></pre>
<pre>OpenSIPS Developer<o:p></o:p></pre>
<pre><a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a><o:p></o:p></pre>
</div>
<p class="MsoNormal">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Mark Farmer<br>
<a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a><o:p></o:p></p>
</div>
</div>
</body>
</html>