Hello,

the received parameter is constructed from source IP of the incoming request. You get it via $si script variable.

Cheers,
Daniel

On 3/12/13 7:22 PM, Ajay Sabat wrote:

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



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.com -