<p dir="ltr">Hi,  </p>
<p dir="ltr">How can I include the proto/port indications in the URI?</p>
<div class="gmail_quote">On 6 Jul 2015 18:14, &quot;Bogdan-Andrei Iancu&quot; &lt;<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Nabeel,</tt><tt><br>
    </tt><tt><br>
    </tt><tt>According to RFC3263 (</tt><tt>Locating SIP Servers</tt><tt>),
      if no proto/port indications are found in the URI, a NAPTR lookup
      should be tried (to determine the protocol). If no luck, UDP is
      assumed. And it proceeds with port discovery - doing an SRV lookup
      .<br>
      <br>
      In your case, there is no proto, proto. No NATPR either, so UDP is
      assumed as default.<br>
    </tt>
    <pre>Regards,
</pre>
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    <div>On 06.07.2015 15:49, Nabeel wrote:<br>
    </div>
    <blockquote type="cite">
      <p dir="ltr">The URI it seems to be resolving is &quot;sip:<a href="http://mydomain.com" target="_blank">mydomain.com</a>&quot;
        (from the log):</p>
      <p dir="ltr">Jul  6 10:27:20 server0
        /usr/local/sbin/opensips[1731]: DBG:core:parse_msg:  uri:    
        &lt;sip:<a href="http://mydomain.com" target="_blank">mydomain.com</a>&gt;              
      </p>
      <p dir="ltr">Jul  6 10:27:20 server0
        /usr/local/sbin/opensips[1731]: DBG:core:parse_to: display={},
        ruri={<a href="mailto:sip%3A%2B447479189410@mydomain.com" target="_blank">sip:+447479189410@mydomain.com</a>}                                                                   
        Jul  6 10:27:20 server0 /usr/local/sbin/opensips[1731]:
        DBG:core:get_hdr_field: &lt;To&gt; [38]; uri=[<a href="mailto:sip%3A%2B447479189410@mydomain.com" target="_blank">sip:+447479189410@mydomain.com</a>]                         
      </p>
      <p dir="ltr">I think the routing URI should be &quot;sip:<a href="http://mydomain.com" target="_blank">mydomain.com</a>;transport=tls&quot;. 
        Please let me know how I can specify the URI for TLS in
        OpenSIPS.<br>
                   <br>
        I have an SRV record at my domain for TLS, but not a NAPTR
        record.   In the log below,  OpenSIPS first looks for NAPTR
        record, doesn&#39;t find it, then looks for SRV record, but it is
        for UDP so it fails:</p>
      <p dir="ltr">Jul  6 07:42:14 server0
        /usr/local/sbin/opensips[1731]: DBG:core:mk_proxy: doing DNS
        lookup...<br>
        Jul  6 07:42:14 server0 /usr/local/sbin/opensips[1731]:
        DBG:core:sip_resolvehost: no port, no proto -&gt; do NAPTR
        lookup!<br>
        Jul  6 07:42:14 server0 /usr/local/sbin/opensips[1731]:
        DBG:core:get_record: lookup(<a href="http://mydomain.com" target="_blank">mydomain.com</a>, 35) failed<br>
        Jul  6 07:42:14 server0 /usr/local/sbin/opensips[1731]:
        DBG:core:sip_resolvehost: no valid NAPTR record found for <a href="http://mydomain.com" target="_blank">mydomain.com</a>,
        trying direct SRV lookup...<br>
        Jul  6 07:42:14 server0 /usr/local/sbin/opensips[1731]:
        DBG:core:get_record: lookup(_sip._<a href="http://udp.mydomain.com" target="_blank">udp.mydomain.com</a>, 33)
        failed                                                    Jul  6
        07:42:14 server0 /usr/local/sbin/opensips[1731]:
        DBG:core:sip_resolvehost: no valid SRV record found for _sip._<a href="http://udp.mydomain.com" target="_blank">udp.mydomain.com</a>,
        trying A record lookup...<br>
        Jul  6 07:42:14 server0 /usr/local/sbin/opensips[1731]:
        ERROR:tm:update_uac_dst: failed to fwd to af 2, proto 1  (no
        corresponding listening socket)</p>
      <div class="gmail_quote">On 6 Jul 2015 09:34, &quot;Bogdan-Andrei
        Iancu&quot; &lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi,<br>
              <br>
              What is the complete SIP URI that OpenSIPS tries to
              resolve ? What kind of query (NATPR , SRV, AAA) and the
              query string depends on the RURI you have.<br>
              <br>
              Regards,<br>
            </tt>
            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
            <div>On 05.07.2015 09:36, Nabeel wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>I&#39;m running OpenSIPS with TLS support compiled and
                  enabled.   The first SRV record OpenSIPS searches for
                  when connecting is  _sip._udp. (as shown below).   </div>
                <div><br>
                </div>
                <div>It should be _sips._tcp.  How can this be fixed?</div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>DBG:core:get_record: lookup(_sip._<a href="http://udp.domain.com" target="_blank">udp.domain.com</a>, 33) failed</div>
                <div><br>
                </div>
              </div>
              <br>
              <fieldset></fieldset>
              <br>
              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>