[Freeswitch-users] NAT issues and "best practices"

Chris Mylonas chris at opencsta.org
Fri Jun 1 03:16:34 MSD 2012

NAT and SIP do not play nicely together easily all the time.
From chapter 9 of "building telephone systems with opensips" (a few years old)

NAT breaks SIP because SIP is a session establishment protocol and thus, belongs to the session layer of the OSI model. However, it includes network layer addresses in their headers. The NAT present in most routers, process only network (layer 3) headers and leaves the SIP headers unchanged.

I'm returning to the VoIP scene after 3 years of web sysadmin-ing and boat refitting, but in years gone by for example, a snom phone played well with a double NAT  ( phone-with-private-addy<----NAT-router>----Internet--->-----<---router--->----<---PBX-with private addy) whilst a polycom would barf.

Let's just say there are 10 points of failure in a voip call.  each of them relying on a hardware/firmware/software stack.
There are recipes that work very well...and some like the polycom of years ago that didn't.  I do not know what the status of the double-NAT polycom is these days but I would presume that it works in 2012.

I'm a FS n00b so cannot offer any specific advice.
There are different types of NAT-ing though: "full cone", "restricted cone", 1:1 (symmetrical) - one is IP:Port, one is IP, and the other is port forwarding.  

On 01/06/2012, at 4:10 AM, Sean Devoy wrote:

> HI All,
> I have a customer location that has just been a nightmare to implement.  I am just learning that they “may” have multiple NAT routers in sequence at their location.  I think I fully understand what NAT is trying to accomplish. There seem to be different levels and approaches. 
> The most basic NAT setup (to me)  is a HOME LAN with multiple PCs where NAT allows multiple devices to share a single routable IP address on the WAN side from multiple local devices the LAN side.  Note I said OUTBOUND initiated connections.  Even FTP can have trouble with this level.  Almost all inbound traffic is blocked for security.
> Clearly for FS we need the switch to be able to punch through from the WAN to specific local IPs on the LAN to reach specific phones.  This is INBOUND NAT and brings up many security issues for people.  Even on devices where you get this “working” you may only be able to support one line per phone or a single inbound connection at a time.
> I understand NAT has PMP and UPnP protocols and FS “supports” both.  What I can’t find is where someone says “Here is a great setup that works with cheap, available “commodity” hardware from Cisco/Linksys that supports all the NAT you need for FS.”  I don’t care if it is PMP or UPnP and I might not even care why you pick one over the other, although it is probably a “good read”.
> Can someone just stand up say “FS works GREAT with the XYZ router in ABC mode from MY COMPANY using NAT to Cisco phones”?
> I have seen some articles about Freeware/Shareware firmware in this devices, but as a novice I want to limit the unknowns until I get more up to speed.
> My specific issue now is that I cannot get SCA to work at the NAT location.  I issued:
> sofia_contact 220 at mydomain.com
> sofia/external/sip:200@<ip address>:44234,sofia/external/sip:200@<same ip>:1024
> Only one phone rings on inbound and the line indicator light does not change when either is picked up.  Same configuration is working on our LAN with the switch.
> I am absolutely ready to by a router to fix these issues, I don’t want to lose this customer.
> Thanks for your thoughts,
> Sean
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> Join Us At ClueCon - Aug 7-9, 2012
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120601/4d33af16/attachment.html 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list