[SR-Users] Modify IP address in SDP

Olle E. Johansson oej at edvina.net
Tue Jan 22 14:12:26 CET 2013


22 jan 2013 kl. 14:07 skrev Austin Einter <austin.einter at gmail.com>:

> Dear All
> When 200 OK to INVITE passes through Kamailio proxy , I want to change the IP address in SDP to a specific IP address.
> 
> Can this be done by just modifying configuration files or do I need to modify in source code.
> 
> In case I need to modify source code, which files I need to look at.
> 
> Kindly provide pointers for said problem.

You can modify ANYTHING in a text based attachment like an SDP in the configuration script.
To make it a bit simple for you, we have two modules that work with specific parts:

- SDPops http://kamailio.org/docs/modules/devel/modules/sdpops.html 
- MANGLER http://kamailio.org/docs/modules/devel/modules/mangler.html

In the Mangler module there's a function called "sdp_mangle_ip()" that will make you happy.

You can always copy the whole SDP into an AVP with SDP_GET, use the transformations to read one line at a time and modify it.

/O

----
Update yourself to Kamailio 4 and new things in SIP - http://edvina.net/training/sip-update-2013/
New training class - three days in Stockholm - march 6-8! Register today!


More information about the sr-users mailing list