<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi,<br>
      <br>
      That is a great catch, thank you for finding and reporting this.
      See the attach patch that should address the problem. Could you
      please give it a try to see if it really solves the problem ?<br>
      <br>
      Best Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 13.05.2016 22:30, Ravitez Ravi
      wrote:<br>
    </div>
    <blockquote
cite="mid:CANs_LF_8bwxgm1q37uXWF79jH1v0LwFN55JH-rGmXCB9oz0vtQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi All,
        <div>        Good Day,</div>
        <div>        Here's the problem i'm facing and would be a great
          help if you could comment.</div>
        <div>        Thank you.</div>
        <div><br>
        </div>
        <div>
          <div>is_myself() does not check for SIPS port if connection
            type is TLS</div>
          <div><span class="" style="white-space:pre">        </span></div>
          <div><b>Configuration :</b></div>
          <div>- Opensips V1.11.5 running in secure mode on port 5061</div>
          <div>- Avaya trying to communicate with Opensips server.</div>
          <div>- Opensips server ip 192.168.1.11</div>
          <div>- Avaya ip : 192.168.1.20</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><b>Steps :</b></div>
          <div>- Avaya sends INVITE to Opensips with route header</div>
          <div><span class="" style="white-space:pre">        </span>Route:
            &lt;sip:192.168.1.11;transport=tls;lr;phase=terminating&gt;</div>
          <div>  </div>
          <div>- Opensips tries to process it but fails.</div>
          <div><span class="" style="white-space:pre">        </span><b><font
                color="#ff0000">DBG:rr:is_preloaded: is_preloaded: Yes</font></b></div>
          <div><b><font color="#ff0000"><span class="" style="white-space:pre">        </span>DBG:core:grep_sock_info:
                checking if host==us: 14==14 &amp;&amp;  [192.168.1.11]
                == [192.168.1.11]</font></b></div>
          <div><b><font color="#ff0000"><span class="" style="white-space:pre">        </span>DBG:core:grep_sock_info:
                checking if port 5061 matches port 5060</font></b></div>
          <div><b><font color="#ff0000"><span class="" style="white-space:pre">        </span>DBG:core:check_self:
                host != me</font></b></div>
          <div><b><font color="#ff0000"><span class="" style="white-space:pre">        </span>DBG:rr:after_loose:
                Topmost URI is NOT myself</font></b></div>
          <div><span class="" style="white-space:pre">        </span>....</div>
          <div><span class="" style="white-space:pre">        </span>....</div>
          <div><span class="" style="white-space:pre">        </span>....</div>
          <div><span class="" style="white-space:pre">        </span>SIP/2.0
            403 Preload Route denied</div>
          <div> </div>
          <div><b>Code Snippet :</b></div>
          <div>/*</div>
          <div> * Check if URI is myself</div>
          <div> */</div>
          <div>#ifdef ENABLE_USER_CHECK</div>
          <div>static inline int is_myself(str *_user, str* _host,
            unsigned short _port)</div>
          <div>#else</div>
          <div>static inline int is_myself(str* _host, unsigned short
            _port)</div>
          <div>#endif</div>
          <div>{</div>
          <div><span class="" style="white-space:pre">        </span>int ret;</div>
          <div><br>
          </div>
          <div><span class="" style="white-space:pre">        </span><b><font
                color="#ff0000">ret = check_self(_host, _port ? _port :
                SIP_PORT, 0);/* match all protos*/</font></b></div>
          <div><span class="" style="white-space:pre">        </span>if (ret
            &lt; 0) return 0;</div>
          <div><br>
          </div>
          <div><span class="" style="white-space:pre">        </span></div>
          <div><b><font color="#38761d">Should is_myself() check for
                connection type and then decide to either use SIP or
                SIPS port.</font></b></div>
        </div>
        <div><b><font color="#38761d"><br>
            </font></b></div>
        <div><b><font color="#38761d"><br>
            </font></b></div>
        <div><b><font color="#38761d"><br>
            </font></b></div>
        <div><font color="#000000">Regards,</font></div>
        <div><font color="#000000">Ravitez.D</font></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>