How to access "fixed_nated_contact" in a REQUEST_ROUTE?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to access "fixed_nated_contact" in a REQUEST_ROUTE?

Chris Maciejewski
Hi,

In a REQUEST_ROUTE I am calling fix_nated_contact(); before handling
REGISTER packets and I can see in a 'location' table
<sip:10000@192.168.5.50> is correctly changed to
<sip:10000@{public_ip}:{port}>.

However when I call xlog(" CONTACT: $ct"); is still shows original
contact <sip:10000@192.168.5.50>.

How can I access rewritten (with the public IP) contact in a REQUEST_ROUTE?

Thanks for help.
Chris

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to access "fixed_nated_contact" in a REQUEST_ROUTE?

Iñaki Baz Castillo
2009/4/30 Chris Maciejewski <[hidden email]>:

> Hi,
>
> In a REQUEST_ROUTE I am calling fix_nated_contact(); before handling
> REGISTER packets and I can see in a 'location' table
> <sip:10000@192.168.5.50> is correctly changed to
> <sip:10000@{public_ip}:{port}>.
>
> However when I call xlog(" CONTACT: $ct"); is still shows original
> contact <sip:10000@192.168.5.50>.
>
> How can I access rewritten (with the public IP) contact in a REQUEST_ROUTE?

Most probably it's not possible. but you already know that the new
Contact will be:

  "sip(s):ORIGINAL_CONTACT_USER@$si:$sp"

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users