<div dir="ltr">I added &#39;<tt>$rp = 5061&#39;</tt><tt> and it now registers successfully.  Just a suggestion, if I set the listening port and transport to TLS and 5061, it makes sense for the routing and register port to default to 5061, not remain at 5060.</tt></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 July 2015 at 19:24, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><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,</tt><tt><br>
    </tt><tt><br>
    </tt><tt>add a port:</tt><tt><br>
    </tt><tt> $rp = 50</tt><tt>70</tt><tt><br>
    </tt><tt><br>
    </tt><tt>add a transport</tt><tt> param:</tt><tt><br>
    </tt><tt>  </tt><tt>add_uri_param(&quot;transport=tls&quot;);</tt><tt><br>
      or set a outgoing/send socket with TLS<br>
        force_send_socket(&quot;tls:ip:port&quot;);<br>
    </tt><span class=""><tt><br>
    </tt><tt>Regards,</tt><br>
    <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>
    </span><div><div class="h5"><div>On 06.07.2015 21:09, Nabeel wrote:<br>
    </div>
    <blockquote type="cite">
      <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" 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 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>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>