[OpenSIPS-Users] RTPProxy Problem

Răzvan Crainea razvan at opensips.org
Wed Nov 14 18:30:36 CET 2012


Hi, Ignacio!

So you are trying to use RTPProxy in bridge mode (between a private and 
a public network). This means that for INVITE you should have a public 
IP, and for 200OK a private IP (or the other way around, depending on 
your scenario). You have three possible solutions to achieve this:

1. For INVITE, call rtpproxy_offer("flags", "PUBLIC_IP") and for 200OK, 
rtpproxy_answer("flags", "PRIVATE_IP") (or reverse the IPs in case of a 
different scenario). I am not sure this works, as RTPProxy will have no 
idea about where exactly is your UAC/UAS - therefore it might use wrong 
sockets to send data (for example, it might use a PRIVATE_IP socket to 
send RTP to a public ip).
2. Enable the autobridge mode, by setting the 'rtpproxy_autobrige' 
parameter [1]. I've never used this, so I can't confirm whether it works 
properly or not.
3. Call the rtpproxy_offer/answer functions with the 'E' or 'I' 
flags[2]. This is the most reliable method I've used I can confirm it works.

[1] http://www.opensips.org/html/docs/modules/1.8.x/rtpproxy#id250154
[2] http://www.opensips.org/html/docs/modules/1.8.x/rtpproxy#id292744

Regards,

Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 11/14/2012 05:14 PM, Ignacio Gonzalez wrote:
> Ok i will check the flags, I set the domain parameter of 
> rtpproxy_offer to PUBLIC_IP, i create the rules in my router to bind 
> the ports 35000 to 35200 of the public_ip to the ports 35000 to 35200 
> in the PRIVATE_IP of rtpproxy 192.168.1.220, I'm not sure if this is 
> correct.
>
> If i don't put the domain parameter in the rtpproxy_offer the SDP 
> message contains the private ip of the RTPPROXY (192.168.1.220) and my 
> clients are outside this nat.
>
> Thanks
>
>
> 2012/11/14 Răzvan Crainea <razvan at opensips.org 
> <mailto:razvan at opensips.org>>
>
>     Hi, Ignacio!
>
>     The ports you have listed in the SDP snippet belong to a single
>     rtp stream - Callee-RTPProxy-Caller. You should also check the
>     ports in the 200OK.
>     The "nortpproxy_str" parameter you are specifying is used by
>     RTPProxy to determine if the SDP has to be changed, or somebody
>     else already changed in the path.
>     I noticed that you call rtpproxy_offer() function with two parameters:
>     1. "ro" - if the SDP has a private IP, you shouldn't use the "r"
>     flag. This flag is used to specify that RTPProxy should accept
>     packages only from that IP, whereas in your case he will receive
>     the packets from a public IP.
>     2. "domain" - you shouldn't use this parameter unless you really
>     know what you are doing. This overwrites the domain specified by
>     RTPProxy, which is not always such a good idea.
>
>     I hope these remarks will help you fix your problem.
>
>     Regards,
>
>     Razvan Crainea
>     OpenSIPS Core Developer
>     http://www.opensips-solutions.com
>
>     On 11/14/2012 01:11 AM, Ignacio Gonzalez wrote:
>>     I change the attribute using adding this to the opensips
>>     configuration file
>>
>>     modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n")
>>
>>
>>     a=nortpproxy:yes
>>
>>
>>     But there is no audio, i check the traffic using wireshark and i
>>     see that a lot of packets are sent to another port not the one
>>     that i send in the first message, example:
>>
>>     First SDP
>>
>>     v=0
>>     o=- 465641 0 IN IP4 10.168.123.201
>>     s=-
>>     c=IN IP4 10.168.123.201
>>     t=0 0
>>     m=audio 11670 RTP/AVP 0
>>     a=rtpmap:0 PCMU/8000
>>     a=sendrecv
>>
>>
>>
>>     Changed by opensips and rtpproxy to look like
>>
>>
>>     v=0
>>     o=- 465641 0 IN IP4 IP_PUBLIC
>>     s=-
>>     c=IN IP4 IP_PUBLIC
>>     t=0 0
>>     m=audio 35000 RTP/AVP 0
>>     a=rtpmap:0 PCMU/8000
>>     a=sendrecv
>>
>>
>>     And packets are being recived on the udp:10.168.123.201:45708
>>     <http://10.168.123.201:45708>
>>
>>
>>     Thanks for your help
>>
>>
>>
>>     2012/11/13 Ignacio Gonzalez <mylaneza at gmail.com
>>     <mailto:mylaneza at gmail.com>>
>>
>>         Hello, I change the command line to run rtpproxy and change
>>         my configuration file:
>>
>>         ./rtpproxy -l timewarnercable.dyndns.org
>>         <http://timewarnercable.dyndns.org> -s
>>         udp:192.168.1.220:12333 <http://192.168.1.220:12333> -n
>>         tcp:192.168.1.220:12333 <http://192.168.1.220:12333> -u
>>         syrium -m 35000 -M 35200
>>
>>         rtpproxy_offer("ro" , "timewarnercable.dyndns.org
>>         <http://timewarnercable.dyndns.org>");
>>
>>         And now the SDP message looks like this:
>>
>>         v=0
>>         o=- 0 0 IN IP4 PUBLICIP
>>         s=-
>>         c=IN IP4 PUBLICIP
>>         t=0 0
>>         m=audio 35134 RTP/AVP 0
>>         a=rtpmap:0 PCMU/8000
>>         a=sendrecv
>>         a=nortpproxy:yes
>>
>>         But there is no audio, and I don't know what is the meaning
>>         of the a=nortpproxy:yes
>>
>>
>>         Thanks for your help.
>>
>>
>>
>>
>>
>>         2012/11/12 Ignacio Gonzalez <mylaneza at gmail.com
>>         <mailto:mylaneza at gmail.com>>
>>
>>             I use the same port but tcp because in the post the
>>             answer is that. I Attach the debug file
>>
>>
>>
>>
>>
>>             2012/11/12 spady <spady77 at gmail.com
>>             <mailto:spady77 at gmail.com>>
>>
>>                 Please, post entire opensips log ( set debug to 6 ).
>>
>>                 Why are you using same port for sock and notify_sock
>>                 ??? Have you tried with
>>                 different ports?
>>
>>                 Bye
>>
>>
>>
>>                 --
>>                 View this message in context:
>>                 http://opensips-open-sip-server.1449251.n2.nabble.com/RTPProxy-Problem-tp7582930p7582974.html
>>                 Sent from the OpenSIPS - Users mailing list archive
>>                 at Nabble.com.
>>
>>                 _______________________________________________
>>                 Users mailing list
>>                 Users at lists.opensips.org
>>                 <mailto:Users at lists.opensips.org>
>>                 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> 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/20121114/64e13073/attachment-0001.htm>


More information about the Users mailing list