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

asteriskasterisknowport-forwarding

We currently have a school-project going in which we need to set up an PBX with Asterisk. Thus we have installed asteriskNow in a virtual environment (with virtualBox) on ubuntu 12.10. We tried the configuration by registering some SIP-Phones via X-Lite in the local network, and it worked. But now, we would like to be able to access the server also from the internet – this is what we're strugglin with … Here's what we have done so far:

  • In X-Lite we specified the IP of the modem of the local network in which the asterisk server resides.

  • On the modem we forwarded all incoming requests on port 5060 to the local router and this router forwards all requests to the local IP of our asterisk-server.

  • We configured the IP of the asterisk server as static.

  • We dissabled the ubuntu-firewall

Now, I know it's a very vague description of our problem and the error could be anywhere – but we don't even know where to start to look for the error. Do you have any suggestions what we could do? Would may be wireshark be of any help? Any information, help or suggestion is much appreciated (also if you know good tutorials how to set up asterisk with freepbx)!

Best Answer

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.)

Related Topic