<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    From you ul show output, you don't have to do anything special for
    this to work - OpenSIPS will automatically relay the call to the
    Received:: value that's displayed in the ul show output, setting it
    as $du, while the actual Request-URI of the message will contain the
    private Contact that the client registered.<br>
    <br>
    Best Regards,<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS 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 14.04.2015 18:09, Satish Patel
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPgF-fovCgybpeB2KwkCxuWOXMM0cVy7RQqG=oevQ6ujyHs17Q@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div>
          <div>Hi, </div>
        </div>
        <div><br>
        </div>
        <div>I have following User registred over public IP but that
          client doesn't support STUN so contact info showing private IP
          "192.168.1.6"  </div>
        <div><br>
        </div>
        <div>lookup function default extract "Contact:: <a
            moz-do-not-send="true"
            href="http://sip:1001@192.168.1.6:27098">sip:1001@192.168.1.6:27098</a>"
           </div>
        <div><br>
        </div>
        <div>Is there a way i can extract  "Received::
          sip:173.XX.XX.215:27098"  so i can create new URI and send
          call to that? </div>
        <div><br>
        </div>
        <div>if (lookup("location")) {<br>
        </div>
        <div>    ..</div>
        <div>    ..</div>
        <div>}</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div>[root@sip ~]# opensipsctl ul show</div>
          <div>Domain:: location table=512 records=1</div>
          <div>        AOR:: <a moz-do-not-send="true"
              href="mailto:1001@sip.example.com">1001@sip.example.com</a></div>
          <div>                Contact::
            <a class="moz-txt-link-abbreviated" href="mailto:sip:1001@192.168.1.6:27098;rinstance=e223da1c59d774db">sip:1001@192.168.1.6:27098;rinstance=e223da1c59d774db</a> Q=</div>
          <div>                        Expires:: 3585</div>
          <div>                        Callid::
            NjIyYzg5NzU0NGNlYjFhZTEyMDZlNDk2NTgzMDUzYjY</div>
          <div>                        Cseq:: 2</div>
          <div>                        User-agent:: X-Lite 4.7.1
            74247-44615bc7-W6.1</div>
          <div>                        Received::
            sip:173.XX.XX.215:27098</div>
          <div>                        State:: CS_SYNC</div>
          <div>                        Flags:: 0</div>
          <div>                        Cflags:: NAT</div>
          <div>                        Socket:: udp:182.XX.XX.164:5060</div>
          <div>                        Methods:: 5951</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>