Registering SIP phone (X-Lite) to asterisk server (asteriskNow)

A few general points --

  • Asterisk does very poorly in virtual machines.
    I don't know if they have specific guidance on this, but my experience is even in high-end VMWare environments you can get into all sorts of odd trouble with virtualized VoIP servers.
    I would strongly advise troubleshooting on dedicated physical hardware.

  • SIP (the VoIP protocol behind Asterisk) HATES NAT
    SIP was never really designed to work with network address translation.
    Again, try getting things working on the same subnet, with no NAT or routing involved, before moving on to more difficult tasks.
    NAT-related issues usually affect calls more than registration, and there is lots of info on how to deal with it if you google around.

  • A good packet sniffer is your friend when troubleshooting VoIP
    If you watch the data going back and forth you'll probably come up with a reasonable idea of where the problem is.


So basically - start by getting things working inside your firewall. Then slowly work your way up to dealing with traversing firewalls and NAT.

In terms of Asterisk tutorials, these abound on the net (and Server Fault is not really a resource for "Find me a tutorial" -- Google stays up to date on this stuff better than we ever could).
I would definitely recommend using a prepackaged Asterisk distribution if you're new to VoIP stuff -- AsteriskNOW should be fine, but I personally use the FreePBX distro in production and have had excellent results with it (and it's good at auto-configuring for NAT-related issues which saves me some headaches.)


But now, we would like to be able to access the server also from the internet - this is what we're strugglin with

Things to check:

  1. Verify the correct ports that you require "open". If it is just 5060, fine...but verify.
  2. Verify that the external IP of the modem is responding on the right ports by using something like http://www.t1shopper.com/tools/port-scan or similar
  3. Verify the routing between modem, internal router, and PBX in both directions, looking for NATing issues, routing issues, etc. using ping, tracert, and other tools.
  4. Make sure you are testing the IP phone from outside the modem/firewall and that it doesn't have a firewall blocking outbound to those ports.

Hope that helps you out...not trying to be draconian with the rules.


I'd just like to add that since this asterisk has a public IP address, you might want to consider how to secure it as there are bots scanning for open 5060 ports, trying to gain access to VoIP servers/phones/etc. You might want to use Fail2ban and choose good passwords for your asterisk peers.