<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body 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 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 06.07.2015 15:49, Nabeel wrote:<br>
    </div>
    <blockquote
cite="mid:CA+vx6K+MmGu67frQSPLm=HJ9EiUT43f61kbmidA__gaN=ja7XA@mail.gmail.com"
      type="cite">
      <p dir="ltr">The URI it seems to be resolving is "sip:<a
          moz-do-not-send="true" href="http://mydomain.com">mydomain.com</a>"
        (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 moz-do-not-send="true" href="http://mydomain.com">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 moz-do-not-send="true"
          href="mailto:sip%3A%2B447479189410@mydomain.com">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
          moz-do-not-send="true"
          href="mailto:sip%3A%2B447479189410@mydomain.com">sip:+447479189410@mydomain.com</a>]                         
      </p>
      <p dir="ltr">I think the routing URI should be "sip:<a
          moz-do-not-send="true" href="http://mydomain.com">mydomain.com</a>;transport=tls". 
        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'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 moz-do-not-send="true"
          href="http://mydomain.com">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
          moz-do-not-send="true" href="http://mydomain.com">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 moz-do-not-send="true"
          href="http://udp.mydomain.com">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
          moz-do-not-send="true" href="http://udp.mydomain.com">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, "Bogdan-Andrei
        Iancu" &lt;<a moz-do-not-send="true"
          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,<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 moz-do-not-send="true" 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'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
                    moz-do-not-send="true" 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 moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
  </body>
</html>