A little while ago we mentioned that we had PBX box running trixbox, and that we should probably run the PBX on Ubuntu sooner or later. Well, that time has come. Not only is Ubuntu more familiar and friendly, but I managed to do something bad in the command line with our trixbox. It’s time to bring our PBX a little closer to home.
I’m happy to say that FreePBX and Asterisk are running smoothly on Ubuntu Server 11.04 as I type. The installation is a bit more challenging than trixbox ever was, but hopefully we can reduce some of the sighable moments in this post.
Installing FreePBX/Asterisk on Ubuntu Server 11.04
- Start with this guide from NotANumber. I know it says 10.10, but I followed these instructions EXACTLY on 11.04 and it worked mostly. If things fail, then you probably missed a step (note: you can skip that whole dahdi section if you don’t have the hardware). This may require you to completely re-install Ubuntu Server (I did it about 10 times until I read more carefully).
- Even with the system running and being accessible via the webgui, you will probably notice some errors:
- sip_notify.conf symlink error
- Other errors…
The problem should go away once you do the following:
cd /etc/asterisk sudo mv sip_notify.conf sip_notify.conf.old sudo/var/lib/asterisk/bin/retrieve_conf
These should help:
sudo chown www-data:asterisk /etc/amportal.conf
sudo chmod 640 /etc/amportal.conf
sudo amportal chown
Fix the permissions from amportal, add these lines to the end of /etc/amportal.conf:
AMPASTERISKUSER=www-data AMPASTERISKGROUP=asterisk AMPASTERISKWEBUSER=www-data AMPASTERISKWEBGROUP=asterisk
Based on our past research we recommend (but do not accept responsibility) that you open these ports on your router:
* This covers the standard Asterisk ports 5060 and 5061
** I edited our /etc/asterisk/rtp.conf so that
Edit /etc/asterisk/sip_general_custom.conf and add:
nat=yes externip=yourdns.dns.org localnet=192.168.0.0/255.255.255.0
externip is your WAN IP address or static DNS address
localnet is your LAN network “base” and subnetmask. Commonly 192.168.1.0 or 192.168.0.0 .