[OpenSIPS-Users] lookup("location") extract received field value

Vlad Paiu vladpaiu at opensips.org
Tue Apr 14 17:34:55 CEST 2015


Hello,

 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.

Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 14.04.2015 18:09, Satish Patel wrote:
>
> Hi,
>
> 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"
>
> lookup function default extract "Contact:: sip:1001 at 192.168.1.6:27098 
> <http://sip:1001@192.168.1.6:27098>"
>
> 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?
>
> if (lookup("location")) {
>     ..
>     ..
> }
>
>
> [root at sip ~]# opensipsctl ul show
> Domain:: location table=512 records=1
>         AOR:: 1001 at sip.example.com <mailto:1001 at sip.example.com>
>                 Contact:: 
> sip:1001 at 192.168.1.6:27098;rinstance=e223da1c59d774db Q=
>                         Expires:: 3585
>                         Callid:: 
> NjIyYzg5NzU0NGNlYjFhZTEyMDZlNDk2NTgzMDUzYjY
>                         Cseq:: 2
>                         User-agent:: X-Lite 4.7.1 74247-44615bc7-W6.1
>                         Received:: sip:173.XX.XX.215:27098
>                         State:: CS_SYNC
>                         Flags:: 0
>                         Cflags:: NAT
>                         Socket:: udp:182.XX.XX.164:5060
>                         Methods:: 5951
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150414/f3978de0/attachment.htm>


More information about the Users mailing list