<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi John,<br>
      <br>
      Probably the 5061 port (specific to TLS) is not re-written during
      the routing process - for example see the 5061 in the REGISTER
      RURI. How do you route the REGISTER from OpenSIPS to Asterisk ?
      Dispatcher ? or ?<br>
      <br>
      Regards,  <br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
    <div class="moz-cite-prefix">On 03/15/2019 01:03 AM, John Kiniston
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFJQOGek1LZExgijOiaWdQ3a+rXTXmA95Y62aRAur3WcY96VSA@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div>
                <div>
                  <div>I have a proxy that works fine with UDP handling
                    mid-registrar and mediaproxy duties in front of my
                    Asterisk Servers.<br>
                    <br>
                  </div>
                  I'd like to enable TLS on my proxy and switch my
                  phones to registering via TLS.<br>
                  <br>
                </div>
                I've got my TLS keys working now and I see my phone
                sending requests to OpenSIPS where they are being
                processed.<br>
                <br>
              </div>
              However when OpenSIPS is sending the traffic to my
              Asterisk boxes it's sending SIP traffic to port 5061
              instead of sending TLS.<br>
              <br>
              U 2019/03/14 15:54:33.985636 <Proxy>:5060 ->
              <Asterisk>:5061 #32<br>
              REGISTER sip:<pbx>:5061 SIP/2.0.<br>
              Via: SIP/2.0/UDP
              Proxy:5060;branch=z9hG4bKffdc.94c66575.0;i=a64b8973.<br>
              Via: SIP/2.0/TLS
172.16.52.69:12332;received=64.119.40.170;branch=z9hG4bK3157565843;rport=12332.<br>
              From: "Test"
              <<a class="moz-txt-link-freetext" href="sip:7004@">sip:7004@</a><pbx>:5061>;tag=1087298031.<br>
              To: "Test" <<a class="moz-txt-link-freetext" href="sip:7004@">sip:7004@</a><pbx>:5061>.<br>
              Call-ID: <a href="mailto:0_425741679@172.16.52.69"
                moz-do-not-send="true">0_425741679@172.16.52.69</a>.<br>
              CSeq: 1 REGISTER.<br>
              Contact: <a class="moz-txt-link-rfc2396E" href="sip:7004@Proxy:5060"><sip:7004@Proxy:5060></a>.<br>
              Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS,
              NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE,
              MESSAGE.<br>
              Max-Forwards: 69.<br>
              User-Agent: Yealink SIP-T42G 29.83.0.50<br>
              Expires: 3600.<br>
              Allow-Events: talk,hold,conference,refer,check-sync.<br>
              Mac: 00:15:65:72:e5:f3.<br>
              Line: 1.<br>
              Content-Length: 0.<br>
              <br>
            </div>
            <div>I believe this is because the initial request opensips
              is recieving from the phone has 'sip' in the register?<br>
              <br>
                 REGISTER sip:<pbx>:5061 SIP/2.0  <br>
                  Via: SIP/2.0/TLS
              172.16.52.69:12122;branch=z9hG4bK2625059359;rport  <br>
                  From: "Test" <a class="moz-txt-link-rfc2396E" href="sip:7004@pbx:5061"><sip:7004@pbx:5061></a>;tag=1299551992 
              <br>
                  To: "Test" <a class="moz-txt-link-rfc2396E" href="sip:7004@pbx:5061"><sip:7004@pbx:5061></a>  <br>
                  Call-ID: <a href="mailto:0_292898054@172.16.52.69"
                moz-do-not-send="true">0_292898054@172.16.52.69</a>  <br>
                  CSeq: 1 REGISTER  <br>
                  Contact:
              <a class="moz-txt-link-rfc2396E" href="sip:7004@172.16.52.69:12122;transport=TLS"><sip:7004@172.16.52.69:12122;transport=TLS></a>  <br>
                  Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS,
              NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE,
              MESSAGE  <br>
                  Max-Forwards: 70  <br>
                  User-Agent: Yealink SIP-T42G 29.83.0.50<br>
                  Expires: 3600  <br>
                  Allow-Events: talk,hold,conference,refer,check-sync  <br>
                  Mac: 00:15:65:72:e5:f3  <br>
                  Line: 1  <br>
                  Content-Length: 0  <br>
            </div>
            <div dir="ltr"><br clear="all">
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div><br>
                        </div>
                        <div>What can I do here? I've tried playing with
                          rewriting $du and $fs but that doesn't seem to
                          be working.<br>
                        </div>
                        <div>-- <br>
                          <div dir="ltr" class="gmail_signature">A human
                            being should be able to change a diaper,
                            plan an invasion, butcher a hog, conn a
                            ship, design a building, write a sonnet,
                            balance accounts, build a wall, set a bone,
                            comfort the dying, take orders, give orders,
                            cooperate, act alone, solve equations,
                            analyze a new problem, pitch manure, program
                            a computer, cook a tasty meal, fight
                            efficiently, die gallantly. Specialization
                            is for insects.<br>
                            ---Heinlein</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </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>