[Serusers] How to mangle SDP with result of shellscript

Alexander Philipp Lintenhofer lintenhofer at aon.at
Tue Feb 15 23:37:17 CET 2005


Hi there,
I have a question concerning the following situation:
One client makes a call to another client in the same (private) LAN over 
a SER located in the public network. It is easy to check if both clients 
are behind the same NAT. So one can avoid using the mediaproxy and 
therefore the mediastream stays in the local LAN.

But there is a problem if one client uses STUN to detect the outbound IP 
of the NAT-Box and changes the IP-Address of his SDP body to the 
outbound IP-address of the NAT-Box. The original local IP-Address ist 
lost. This value must be recovered by SER - otherwise the RTP-stream of 
this local connection is relayed over the public internet. I managed 
getting the original IP-Address (external script which extracts the 
IP-Addr from the Call-ID header, if it is there...) and store it 
persistant in the Location Database.

My question: How is it possible to mangle the SDP-body by SER with the 
sdp_mangle_ip() - function and a non static argument. I have to use this 
function with an argument given by an external script. Is it possible or 
does anybody know another possibility to get rid of this mess?
regards,
Philipp




More information about the sr-users mailing list