Skip to main content

SOHO Networking Example

This article was created by MediaWiki user "Politick" on 25 February, 2011

FreeSwitch, Networking, and NAT

I have elected to resolve the problem with SipXecs It includes CentOS + FreeSwitch + NAT traversal plugins. It might not please everyone, as this solution creates a dedicated PBX computer, i.e. it's NOT designed to run on YOUR linux installation.

Also note that I was not able to get SipXecs to work with the 3CX client outside the LAN either, but the X-Lite client from CounterPath does work.
So if you want to stick with a standalone FreeSWITCH install, I suggest to try using the X-Lite softphone. I hate the interface, but it gets across the NATs.

References internal to this site:

Use Case 1

SOHO Network Diagram Use Case 1

Problem Statement

I'm trying to use my Linux-FreeSwitch box behind my home NAT router and it does not work (yet!). With a vanilla installation of FreeSwitch, I was able to get the 3CX soft phones to work inside my network but I had mixed results when the 3CX soft phone was behind another NAT router (my brother's). I had the remote 3CX phone configured to be a client to my Freeswitch using extension 1019. In the configuration used, this should make his phone part of "My PBX". The SIP signaling worked fine, the phones were connecting, authenticating and ringing, but no voice. I read that the voice is trying to go peer-to-peer using RTP so then using router configs we forwarded the RTP ports (40000-40049) to the PCs with the soft phones on both ends. The voice from my network would reach the remote softphone behind the NAT, but I would not receive any voice stream from my brother's phone.

The Quest for Knowledge

I figured that if I could understand the networking behind VoIP, I could figure out a way to make it work. I don't even know if FreeSwitch acts or does not act as a proxy for the 'Voice stream' when the connection is from internal to external. This could simplify my port forwarding and allow connections to multiple softphones behind my NAT. One thing I just thought about, I don't know if my brother has UPnP enabled on his router, mine is enabled. But I have no idea if the 3CX phones take advantage of UPnP.

This is what is happening at the console (but from a different location and the external extension was 1000 this time):
FreeSWITCH console

I know I could create a simple solution by providing VPN access to my network, but I wanted to provide VoIP to my close family without granting them full access to my network. But also I've also heard that VoIP can crap out on VPN, but I've not tried or experienced it.

This is the description of my network infrastructure, probably similar to many of you:
Politick SOHO network

Then I have configured my router to do port forwarding as described in the FreeSwitch Firewall and NAT:

Attachments:

UseCaseNo1.jpg (image/jpeg)
Console.jpg (image/jpeg)
NetworkPolitick.jpg (image/jpeg)
BelkinPortForwarding.jpg (image/jpeg)