[OpenSIPS-Users] R: Media Proxy between LAN and WAN
Mauro Davi'
mauro.davi at acotel.com
Wed May 13 16:17:23 CEST 2009
Hi Brett,
below an extract of my opensips script file:
if the message is a INVITE:
use_media_proxy();
t_on_branch("1");
t_on_reply("1");
onreply_route[1]
{
if (t_check_status("200"))
{
fix_nated_sdp("3", "xxx.yyy.zzz.204"); #public IP address
}
}
branch_route[1]
{
if(has_body("application/sdp")) {
xlog("L_INFO","MESSAGE BODY <$mb>\n");
fix_nated_sdp("3", "172.30.0.205");
xlog("L_INFO","MESSAGE BODY <$mb>\n");
}
}
So I don't use the use_media_proxy twice... But I think that the problem is created by using the fix_nated_sdp and the use_media_proxy function.
But I don't understand why...
Thanks
MD
________________________________
Da: Brett Nemeroff [mailto:brett at nemeroff.com]
Inviato: mercoledì 13 maggio 2009 15:44
A: Mauro Davi'
Cc: users at lists.opensips.org
Oggetto: Re: [OpenSIPS-Users] Media Proxy between LAN and WAN
Mauro,
This effect:
c=IN IP4 0.0.0.0172.30.0.205
Where you get two ips shoved together, is usually the result of calling use_media_proxy (or whatever function you are using) more than once.
Of course, the 0.0.0.0 in there is a problem, you need a real IP
-Brett
On Wed, May 13, 2009 at 4:20 AM, Mauro Davi' <mauro.davi at acotel.com> wrote:
Hi All,
I have a Media Proxy installed in our VoIP platform. The Media Proxy machine have 2 Network card, one on a Private LAN the other on a WAN.
Now I configured the Media-Relay with the IP address 0.0.0.0 to listen to all the interfaces.
On opensips when then INVITE came from a UA directed to an internal network element (like PSTN Gateway or IVR) I want to manipulate the connection information in the SDP message content with the private IP address.
On the 200 OK I want to manipulate the connection information in the SDP message content with the public IP address.
In this way I hope that the Media Relay can work correctly...
But I have a problem, when I use the fix_nated_sdp (after the use_media_proxy function) on the INVITE sent to the Gateway I obtain the following SDP result:
v=0
o=- 0 2 IN IP4 192.168.193.54
s=CounterPath Bria
c=IN IP4 0.0.0.0172.30.0.205
t=0 0
m=audio 30058 RTP/AVP 0 101
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=x-rtp-session-id:EC003DF02E154A31AE923BD612B55FE7
a=direction:active
a=oldmediaip:192.168.193.54
the private IP address 172.30.0.205 is prefixed by the 0.0.0.0 inserted I think by the mediaproxy module.
There is a way to solve this problem?
Any suggestion?
Thanks in Advance
MD
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090513/1bfb1dd2/attachment.htm
More information about the Users
mailing list