How to Install Asterisk 1.4 and Asterisk GUI in Ubuntu 6.06 LTS Server and Debian Etch

1. Preparing your system

Update your Ubuntu 6.06 LTS or Debian Etch necessary packages to be able to install Asterisk 1.4 from source.

2. Updating your system

Before downloading the update, make sure your apt source list is updated.

Download the following packages:

apt-get install linux-headers-$(uname -r) build-essential automake autoconf bison flex libtool libncurses5-dev libssl-dev subversion
This procedure is tested and working in Debian Etch. Ubuntu 6.06 and Debian Etch packages is similar because Ubuntu is a Debian based distribution, check http://www.debian.org/misc/children-distros for more info about debian based distro.

3. Downloading Asterisk and Zaptel

Download the latest asterisk-1.4, libpri-1.4 and zaptel-1.4 source from the Digium's download site: http://downloads.digium.com

wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.18.tar.gz
wget http://downloads.digium.com/pub/zaptel/releases/zaptel-1.4.9.1.tar.gz
wget http://downloads.digium.com/pub/libpri/releases/libpri-1.4.3.tar.gz

Untar the Asterisk-1.4 and zaptel-1.4 source to /usr/src/

tar -zxvf zaptel-1.4.9.1.tar.gz -C /usr/src/
tar -zxvf libpri-1.4.3.tar.gz -C /usr/src/
tar -zxvf asterisk-1.4.18.tar.gz -C /usr/src/

4. Compiling and Installing

Installing Zaptel

After extracting the source, you can start now the installation of Asterisk, zaptel should be install first.

You go to the zaptel-1.4.xx directory in /usr/src/zaptel-1.4.xx and do the command:

./configure
You will notice that the ./configure command was not used in installing Zaptel 1.2 and Asterisk 1.2.

Then continue the installation using the following commands.

make
make install

Libpri installation

The libpri libraries do not make use of the autoconf build environment, the installation of lipri 1.4 is same as installing libpri 1.2.
cd ..
cd libpri-1.2.3/
make
make install

Asterisk installation

cd ..
cd asterisk-1.4.18/
./configure
make
make install
make samples

5. Getting Asterisk GUI

Alright, lets download the Asterisk GUI from Digium svn repository, to download the Asterisk GUI, go to the /usr/src/ directory and type this command:

svn checkout http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui

6. Compiling Asterisk GUI

The source of Asterisk GUI is now downloaded in /usr/src/asterisk-gui/. Lets install Asterisk GUI.

./configure
make
make install
make samples

7. Configuration

There are two files you must configure in order for Asterisk GUI to run. These files are manager.conf and http.conf located in /etc/asterisk/. Lets start at manager.conf.

[general]
displaysystemname = yes
enabled = no
webenabled = no

This is the default configuration of your manager.conf, to configure you must change the last two lines with = no with = yes.

[general]
displaylastsystemname = yes
enabled = yes
webenabled =yes

The output must be like this.
Next we will add a new user to manager.conf

[username]
secret = password
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Lets configure the http.conf files, remember that this is the last configuration file we need to edit to be able to run the Asterisk GUI. Your http.conf should look exactly like this and you're done...

enabled=yes
enablestatic=yes
bindaddr=0.0.0.0

After that run "make checkconfig" in your asterisk-gui directory. This script will check if your GUI is correctly configured.

Procedure of Asterisk installation from source in CentOS is same in Ubuntu 6.06 and Debian Etch, the only difference among them is the package format.

8. Loading Asterisk GUI and zaptel modules

After the installation of Asterisk 1.4 and Asterisk GUI, load your ztdummy module, type the following command in the console:

modprobe zaptel
modprobe ztdummy

And to add ztdummy and Asterisk in startup scripts, edit the file /etc/rc.local and add the following line:

modprobe zaptel
modprobe ztdummy
asterisk –g 

To load your Asterisk GUI, run the command "asterisk -g" in the console and point your browser to http://your-server-ip:8088/asterisk/static/config/cfgbasic.html

After you logon, you can now configure your Asterisk PBX using a nice GUI interface.