Way to *always force* media relay across FreeSWITCH
Hi all, i am using FreeSWITCH with mobile phones and have problems in FS sometimes acting as a media relay, sometimes not. The mobile phones are behind operator's 3G/2G data networks that are "natted" . The FS just need to act as a SIP server handling: - Signaling (with SIP/TLS) - Media relay NO transcoding is done. (disabled) Mobile devices use an obfuscated RTP protocol (to bypass VoIP blocking by mobile operator) and in order to let FS relay it we use: inbound-proxy-media=true . That way FS does not even check the RTP header but just relay udp packets on agreed ports. I am having a strong problem, sometimes devices get one-way audio and doing debugging we found out that sometimes FS rewrite correctly the SDP header but sometimes it does not. We are using: <param name="apply-nat-acl" value="nat.auto"/> <param name="aggressive-nat-detection" value="true"/> I would like FS to act like Asterisk canreinvite=no that force the media to go trough it always rewriting SDP headers and to make the RTP flow goes across Asterisk. I also tried to add this in order to force the rewriting: <variable name="sip-force-contact" value="NDLB-connectile-dysfunction"/> However given 2 peers sometime i see the status of the peer (sofia status profile internal) shown as "Registered(AUTO-NAT)" and sometimes as "Registered(TLS)" . Some times the traffic between the peers is not correctly relayed and there is an asymmetric one-way audio situation: peer-A correctly send RTP traffic to FS that relay it to peer-B peer-B send RTP traffic directly to peer-B (because FS did not rewrote the SDP header related to the target IP of RTP). From our basic diagnosis it seems that FS sometimes detect devices as "behind NAT" but sometimes it does not. Is there a way to certainly and precisely force all connections to be relayed across the FS like we was doing with "canreinvite=yes" of asterisk? I just would like a static set of settings without the dynamic methods of NAT detection. Just everything (RTP relay) going trough FS. Is that possible? Fabio Pietrosanti
It does this by default... you shouldn't need anything to make it behave like that... wipe your configs out and start over... it should just work. /b On Mar 22, 2010, at 7:34 AM, Fabio Pietrosanti (naif) wrote:
I just would like a static set of settings without the dynamic methods of NAT detection. Just everything (RTP relay) going trough FS.
Is possible that the default settings, having some automatic mechanism to identify natted vs. non-natted situation (like users having a private IP that's not strictly RFC 192.168, 10. o 172.16 but just unallocated networkd), make FS does not always detect that a user is behind NAT but consider it like if it was outside NAT? Fabio On 22/03/10 14.05, Brian West wrote:
It does this by default... you shouldn't need anything to make it behave like that... wipe your configs out and start over... it should just work.
/b
Again all media all the time will proxy via FS doesn't matter if its natted or not. /b On Mar 22, 2010, at 8:55 AM, Fabio Pietrosanti (naif) wrote:
Is possible that the default settings, having some automatic mechanism to identify natted vs. non-natted situation (like users having a private IP that's not strictly RFC 192.168, 10. o 172.16 but just unallocated networkd), make FS does not always detect that a user is behind NAT but consider it like if it was outside NAT?
Fabio
That's a situation in the FS debug log when media relay is in action: [INFO] switch_rtp.c:2005 Auto Changing port from 10.220.24.40:4002 to 213.230.130.210:14166 [INFO] switch_rtp.c:2005 Auto Changing port from 192.168.11.207:4000 to 93.35.50.222:4000 That's a situation in the FS debug log when media relay activate only on one leg of the call: [INFO] switch_rtp.c:2005 Auto Changing port from 192.168.11.207:4001 to 93.35.50.222:4001 I will do deeply trying to dig into the code of auto-nat why sometimes it does not act as a media relay for one leg. I am really getting crazy (also with the default configuration) Fabio On 22/03/10 14.55, Fabio Pietrosanti (naif) wrote:
Is possible that the default settings, having some automatic mechanism to identify natted vs. non-natted situation (like users having a private IP that's not strictly RFC 192.168, 10. o 172.16 but just unallocated networkd), make FS does not always detect that a user is behind NAT but consider it like if it was outside NAT?
Fabio
On 22/03/10 14.05, Brian West wrote:
It does this by default... you shouldn't need anything to make it behave like that... wipe your configs out and start over... it should just work.
/b
participants (2)
-
Brian West
-
Fabio Pietrosanti (naif)