How To Compile Asterisk 1.8 on Ubuntu 10.04 LTS x86

During a recent project I found out; that Ubuntu does not have the latest package for Asterisk PBX server. So the only way to get Asterisk 1.8 is to compile it from scratch. So I am going to show you how to compile and install Asterisk 1.8 properly from source.

The following worked flawlessly on Ubuntu 10.04 LTS x86:

The first step is to login as root or su as root, whichever you choose. You will need to install a few things before you install.

apt-get install cvs build-essential automake autoconf bison flex libtool libncurses5-dev libssl-dev libgsm1 libgsm1-dev libxml2-dev build-essential linux-headers-`uname -r`

Then you will need to download the Asterisk 1.8 tar.gz

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.10.0.tar.gz

Unzip and untar it:

tar -zxvf asterisk-1.8.10.0.tar.gz

Let’s make something:

cd asterisk-1.8.10.0
./configure

Wait then:

make all

Wait more and then:

make install
make config

Start it up:

/etc/init.d/asterisk start

If you did it correctly everything should just work! You can confirm this by doing:

root@asterisk:/usr/src/asterisk-1.8.10.0# asterisk -r
asterisk*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
asterisk*CLI>