<div dir="ltr">Thanks Vlad,<div><br></div><div>$du   did magic, it is extracting Received:: value. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 14, 2015 at 11:34 AM, Vlad Paiu <span dir="ltr">&lt;<a href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@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">
    Hello,<br>
    <br>
    From you ul show output, you don&#39;t have to do anything special for
    this to work - OpenSIPS will automatically relay the call to the
    Received:: value that&#39;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 cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre><div><div class="h5">
    <div>On 14.04.2015 18:09, Satish Patel
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <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&#39;t support STUN so contact info showing private IP
          &quot;192.168.1.6&quot;  </div>
        <div><br>
        </div>
        <div>lookup function default extract &quot;Contact:: <a href="http://sip:1001@192.168.1.6:27098" target="_blank">sip:1001@192.168.1.6:27098</a>&quot;
           </div>
        <div><br>
        </div>
        <div>Is there a way i can extract  &quot;Received::
          sip:173.XX.XX.215:27098&quot;  so i can create new URI and send
          call to that? </div>
        <div><br>
        </div>
        <div>if (lookup(&quot;location&quot;)) {<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 href="mailto:1001@sip.example.com" target="_blank">1001@sip.example.com</a></div>
          <div>                Contact::
            <a href="mailto:sip:1001@192.168.1.6:27098;rinstance=e223da1c59d774db" target="_blank">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></fieldset>
      <br>
      </div></div><span class=""><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>
    </span></blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>