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