Connect external VOIP client to Trixbox Asterisk via NAT

Trixbox Asterisk

Background

  • Tixbox Asterisk VOIP server on company’s LAN network.
  • Remote client with Linksys SPA 942 VOIP phone trying to connect to Asterisk VOIP server via WAN (no VPN).
  • Remote client has a static external IP address 82.67.44.44
  • SonicWall firewall on company’s network is configured as follows:
    • The firewall has a range of 8 external IP addresses, and one IP address (195.54.99.99) is dedicated to the VOIP service.
    • All incoming traffic from 82.67.44.44 to 195.54.99.99 is allowed and routed to the VOIP server.
    • All outgoing traffic from the VOIP server is allowed and routed via 195.54.99.99.
  • Draytek Vigor firewall on client’s side doesn’t have any special setup. All outgoing traffic is allowed, and all incoming traffic is blocked by NAT.

Issue

The remote VOIP client can successfully connect and register with the VOIP server. During incoming and outgoing calls, VOIP phones ring, but when answered, no voice is heard by either party.

Resolution

The issue was resolved by adding following text to /etc/asterisk/sip_nat.conf on the Trixbox VOIP server and rebooting Asterisk.

nat=yes
externip=195.54.99.99
localnet=10.1.0.0/255.255.0.0

where:
195.54.99.99 – external IP  address dedicated the VOIP service.
10.1.0.0/255.255.0.0 – local office network subnet.

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *