Monday, November 12, 2012

7911G behind NAT

I can happily report that I have been able to run VoIP phones across a HSMM-MESH link.  I was surprised at how easy it was, once I was able to reproduce the results.


First off, I set the VoIP phones to static IP addresses.  I chose 172.27.0.51 since it was outside the range of  the router's DHCP (and I have been using the 172.27.0.5x space as VoIP experiments anyway).  

On the router that has the server on it, I forwarded UDP ports 5060 and 10000-20000 to the server by adding a line to the /etc/config/firewall file on the router.  This line will looks like:
forward:wifi:dport=5060,10000-20000 proto=udp dest=routerWiFiaddress:serverIPaddress
Replace the bolded fields with the appropriate IP addresses for your equipment; note there is a colon between the two IP addresses.



The router with just the phone attached, do the same thing but instead of the server IP address, put in the IP address of the phone:
forward:wifi:dport=5060,10000-20000 proto=udp dest=routerWiFiaddress:phoneIPaddress
For me, this was all that was needed.  The phones started working as if they were connected to the same LAN.



Here is a photo of a demonstration I set up at the November 2012 CVARC club meeting:

The Trixbox server running on the laptop and one phone connected to the left router (hiding behind the phone) and the other phone connected to the router on the right.

Helpful links:
http://fonality.com/trixbox/forums/trixbox-forums/trixbox-endpoints/need-help-remote-sip-extension-using-cisco-7940-60

Future work:
Move the Asterisk server to a small nettop, Rasberry Pi, Beagleboard, etc.