There is a lot of information on t’interweb about installing Asterisk on lot’s of different distributions of linux. However quite often they contradict each other and it seemed that most were written about version 1.4 rather than the lastest stable release 1.6. I don’t think I could have got to where I am now without this guide so fair play to Riccardo. So this is what I have done, it may not be the best way to do it, it may not be right, but it seems to work … or at least install anyway!
I am using Ubuntu Server 9.04 and as such everything is done on the command line. As it happens this server is running within MS Virtual PC 2007 as it is only a proof of concept. Most, if not all, of the commands I have used require administrator priviledges and I use sudo -i to achieve this.
Preparing Ubuntu Server
There are quite afew packages that are required to be able to build Asterisk. These can be installed using apt-get and all come from the standard repositories.
apt-get install linux-headers-$(uname -r) build-essential automake autoconf bison flex libtool libncurses5-dev libssl-dev subversion svn-buildpackage
Postfix requires some configuration on install, however I just selected all the default values … this seems to work!
Getting Asterisk
I put all the source into ‘/usr/src/asterisk/’ which doesn’t exists by default. It is easilly created as follows: mkdir /usr/src/asterisk cd /usr/src/asterisk Then using wget I get the asterisk packages. Note I am not using the version in the Ubuntu repositories as they are out of date. The following packages are the ones I used, please note these may also be out of date by the time you read this!
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.6.tar.gzwget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.2.0.2.tar.gzwget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.2.0.tar.gzwget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.1.tar.gzwget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.1.tar.gzCheck the Asterisk GUI out of SVN
svn co http://svn.digium.com/svn/asterisk-gui/branches/2.0 asterisk-gui
Finally uncompress all the tar.gz’s using:
tar -xvf filename.tar.gz
Installing Asterisk
Starting with libpri
cd libpri-1.4.10.1make cleanmakemake installThen Dahdi-Linux
cd dahdi-linux-2.2.0.2make cleanmakemake installThen Dahdi-Linux
cd dahdi-tools-2.2.0make clean./configuremakemake installmake configThen Asterisk
cd asterisk-1.6.1.1make clean ./configure make make install make samplesThen Asterisk Addons
cd asterisk-addons-1.6.1.1 make clean ./configure make make install make samplesThen Asterisk GUI
cd asterisk-guimake clean ./configuremake make install Configuring the Web Client
Modify ‘/etc/asterisk/http.conf’
[general]
enabled=yes
enablestatic=yes
bindaddr=0.0.0.0
bindport=8088
prefix=guiModify ‘/etc/asterisk/manager.conf’
[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 0.0.0.0
[yourusername]
secret = yourpassword
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,configCreate ‘/etc/default/asterisk’
RUNASTERISK=YESIt is then possible to check that the configuration for the web client is correct (it will also confirm the url you should use to access the web client) by running:
make checkconfigAll that is left to do is configure Asterisk to do what you want / need it to do, which is probably a harder task than installing it! I will post up my configurations once I get something working how I want it too!
All good – Enjoy