[SR-Users] how to extract the ip address in the via header received paramter

Ajay Sabat Ajay.Sabat at panasonic.aero
Tue Mar 12 19:22:24 CET 2013


Hi,

I want to extract the IP address in the received parameter of the top most via header of a response and use that in a custom header while sending response back to the caller. Can somebody please tell how to implement that in the Kamailio configuration file?

I need to handle a NAT traversal scenario without enabling NAT in Kamailio which is used as the proxy server. The caller which is in the same network as Kamailio first sends a OPTIONS request to the callee before sending the INVITE. It uses the public IP address returned in the custom header of the OPTIONS response to build the contact header and SDP of the INVITE request. In fact, it first looks for the IP address in the received parameter of the via header to do that. But Kamailio removes the top most via with received parameter and then sends the OPTIONS response back to the caller. So we are using a custom header for that purpose.
I would appreciate other suggestions to achieve this in Kamailio, may be by enabling NAT or some other alternative.

Thanks,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130312/fc260427/attachment.htm>


More information about the sr-users mailing list