This page is intended to provide a rapid method of installing Asterisk, the zaptel drivers, libpri library, and FreePBX on Ubuntu Hardy server (LTS, 8.04).

Although there are many written recipes for performing this or similar installations on the web, I could not get any of them to work properly. I believe this was mostly due to dependencies on packages installed and not mentioned, or minor typos, or changes in the packages installed between writing of the recipe and the current time.

In any case, I figured that since I was going to have to debug the installation steps, that it might be easier to do so with a script in a standardized way and then the script might be useful to others.

This script is designed to install the zaptel drivers, Asterisk, its add-ons, and the FreePBX system. Please note that it doesn't install the newer framework and versions of the drivers, the dahdi system. It doesn't appear now that the zaptel drivers will work with the current 1.6.x versions of asterisk, despite what has been shown in some recipes. Thus, this script installs the latest asterisk 1.4 tree and the zaptel drivers.

The original version of the script can be downloaded here. You might also like to change the line './install_amp' to './install_amp --username=root --password={MYSQL_ROOT_PW} '. The freePBX has moved, so the following script will take care of that and also attempts to use the latest current builds (untested), download here. For a guaranteed build use the FreePBX file location (for wget) of the new script in the original script.

It is designed to be run on a new installation of Ubuntu hardy server, possibly with the openssh server installed. You will likely need to customize the export declarations at the start of the script, particularly the IP_ADDRESS, which should correspond to that of your server. It must be run as root or with sudo.

The script will bring the package repository up-to-date, then download and install the required packages.

After running this script, a few steps are necessary.

  1. Point your web browser at the freepbx installation, for example,

  2. Go to the 'Module Admin' pages, link on left. Then click 'Check for updates on line'. On this page, click 'Upgrade All' at the top of the table, and then the 'Process' button to the right. Press 'Confirm' when given the list of upgrades. Scroll to the bottom of the pop-up window and click 'Return' when available.

3. Click 'Apply Configuration Changes' at the top of the page, and then 'Continue with Reload'.

You should now have a working Asterisk/FreePBX system. The System Status page should show that Asterisk, the Op Panel, MySQL, Web Server are all working 'OK' and appear in green.

For testing the system with a pair of softphones, please see AsteriskFreePBXTestingWithSoftphones

If you want to improve prompt sound quality, please see AsteriskSoundQuality

If you run this script more than once you'll need to edit /etc/asterisk/asterisk.conf to say 'astrundir => /var/run/asterisk' otherwise you'll get the dreaded Unable to connect to remote asterisk (does /var/run/asterisk/asterisk/asterisk.ctl exist?) error. If you do, try 'asterisk -c' and follow the log, also try 'tail /var/log/asterisk/messages'.


Asterisk homepage

FreePBX homepage and its Administration Guide

Undertoes's recipe from Oct 2008, from which much of the current script was derived.

Recipe on FreePBX another major source of ideas for the current script.

AsteriskScriptOnHardy (last edited 2011-06-15 03:50:51 by mikep2)