<p>Hi Bogdan,</p>

<p>thanks for replying!</p>

<p>Actually, when I made the attached patch, I didn't dig too deep into the handling of strict and loose routing, I just had a problem, which the patch seemed to solve.</p>

<p>The scenario was:</p>

<p>We had an asterisk behind an opensips proxy, and tried to communicate with an other telco. Our asterisk created an INVITE like this:</p>

<pre><code>INVITE sip:&lt;opensips_address&gt; SIP/2.0
Route: &lt;sip:phonenumber@telco_address&gt;
</code></pre>

<p>After getting through opensips, the packet looked like:</p>

<pre><code>INVITE sip:&lt;phonenumber@telco_address&gt; SIP/2.0
Route: &lt;sip:opensips_address&gt; 
</code></pre>

<p>The other endpoint was also a proxy, and handled this incoming message wrong: it forwarded the message to some of the their SIP servers, and changed the RURI to <code>&lt;sip:proxy_address&gt;</code> which it could not handle. As I mentioned, I didn't dig myself deep into the world of SIP routing, so there is a chance that this problem was actually caused by their proxy's bug.</p>

<p>However, with the patch above, our proxy never send out <code>Route:</code> headers to our outer legs. This fixed the problem above, and it seems that nothing else got broken (we use this in production since I attached the patch).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/642#issuecomment-173915709">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciWaO4BrH8F9MCH8KW7XEZqsR3Tq_ks5pciDVgaJpZM4F_2xj.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/642#issuecomment-173915709"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>