<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi, Denis!<br>
      <br>
      Can you please detail a bit what you are trying to achieve? In the
      trace attached, all I can see is that OpenSIPS doesn't
      authenticate the UA - I don't see why it should even try to send
      the INVITE anywhere.<br>
      However, if you are saying that you see both lines in the log, it
      means at a certain point the INVITE was authenticated and the
      topo-hiding was engaged. Did you try setting the port before
      calling b2b_init_request(), in route(1)?<br>
      <br>
      BR<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 11/07/2016 02:20 PM, Denis wrote:<br>
    </div>
    <blockquote cite="mid:595252113.20161107152005@ptl.ru" type="cite">
      <title>B2B top hiding</title>
      <span style=" font-family:'Times New Roman'; font-size: 12pt;">Hello!<br>
        <br>
        Opensips 2.2.2.<br>
        <br>
        I want to make an installation of Opensips which  will include
        auth and top hiding functionality.<br>
        <br>
        First of all, in the main route, i catch INVITE<br>
        "<span style=" font-family:'courier new'; font-size: 9pt;">if
           (is_method("INVITE") &amp;&amp; !has_totag()) {<br>
          route(1);<br>
          exit;<br>
          }<span style=" font-family:'Times New Roman'; font-size:
            12pt;">"<br>
            <br>
            then, in route [1], i make some auth procedure using "<span
              style=" font-family:'courier new'; font-size: 9pt;">pv_proxy_authorize<span
                style=" font-family:'Times New Roman'; font-size: 12pt;">"
                and "<span style=" font-family:'courier new'; font-size:
                  9pt;">proxy_authorize<span style=" font-family:'Times
                    New Roman'; font-size: 12pt;">" functions<br>
                    if auth procedure is successful i make <br>
                    "<span style=" font-family:'courier new'; font-size:
                      9pt;">xlog("L_INFO", "Route1:$rm was received with
                      auth (IP=$si, IPD=$rd, CALLID=$ci, FROMTAG=$ft,
                      TOTAG=$tt, AUTH=$au) AND B2B prepared");<br>
                      b2b_init_request("top hiding");<br>
                      exit;<span style=" font-family:'Times New Roman';
                        font-size: 12pt;">"<br>
                        <br>
                        In the local route i try to edit port of the
                        destination, using <br>
                        "<span style=" font-family:'courier new';
                          font-size: 9pt;">xlog("L_INFO", "Local:$rm was
                          received with auth (IP=$si, IPD=$rd,
                          CALLID=$ci, FROMTAG=$ft, TOTAG=$tt,
                          AUTH=$au)");<br>
                           rewritehostport("1.1.1.1:5065");<span style="
                            font-family:'Times New Roman'; font-size:
                            12pt;">" <br>
                            <br>
                            where 1.1.1.1 - ip address of Opensips.<br>
                            <br>
                            In attachment you can see debug of
                            unsuccessful call, where <br>
                            1.1.1.1 - ip address of Opensips.<br>
                            2.2.2.2 - caller SIP UA<br>
                            <br>
                            I can see in syslog both messages, in local
                            route and in route [1].<br>
                            <br>
                            As you can see from the debug Opensips
                            doesn`t try to send INVITE to 1.1.1.1:5065.<br>
                            <br>
                            Thank you for any help.<br>
                            <br>
                            <br>
                          </span></span></span></span></span></span></span></span></span></span></span><a
        moz-do-not-send="true" style=" font-family:'arial'; font-size:
        10pt;" href="mailto:denis7979@mail.ru">mailto:denis7979@mail.ru</a>
      <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>