Asterisk on Ubuntu
AsteriskNOW and Trixbox are very mature to be implemented in a real world environment, and I always used AsteriskNOW for my VoIP implementations. But I wanted to compile and install asterisk on a regular distribution to get more familiar with asterisk installation.
My choice was ubuntu server 9.10 because the libraries are regularly updated, and I wanted for my test a reliable updated system.
I proceeded with the installation and I only installed OpenSSH during the installation process. Once the installation finished, I configured the server with a static IP, unplugged the keyboard and the monitor, and ssh-ed into ubuntu.
The installation processes could be divided into two steps; installing the required packages required by asterisk, then installing asterisk.
1. Installing the required packages...
# apt-get install make gcc libtool flex bison build-essential libncurses5 libncurses5-dev libnewt-dev zlib1g-dev autotools-dev binutils libpri-dev libpri1.4 dahdi dahdi-dkms dahdi-linux dahdi-source libtonezone-dev libtonezone1 libtonezone2.0 zlibc zlib1g-dev libspeex-dev libspeexdsp-dev libvorbis-dev libteem1-dev libncurses5-dev libltdl-dev liblua50-dev liblua5.1-0-dev portaudio19-dev libopenh323-dev libasound2-dev liblua5.1-curl-dev libcurl4-openssl-dev snmp snmpd libsnmp-dev libnet-snmp-perl libssl-dev openssl libavcodec-dev bluez-hcidump bluez bluetooth libbluetooth-dev libusb-dev libgsm1-dev libavdevice-dev libavdevice52 libavformat-dev libavformat52 libdc1394-22 libportaudio2 libraw1394-11 libsamplerate0 resample apache2 php5 mysql-server libmysqlclient-dev php5-mcrypt php5-cli php5-common php5-curl php5-gd php5-mhash php5-mysql php-db sox
Notice: you will find me installing a lot of packages which aren't necessary for asterisk, but I wanted to have my system usable without further doing apt-get's
2. Installing asterisk...
2a. Download asterisk and asterisk-addons, I chose to use asterisk-1.6.1.9 and asterisk-addons-1.6.1.1:
# cd /usr/src && wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.9.tar.gz && tar xzvf asterisk-1.6.1.9.tar.gz && wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.1.tar.gz && tar xzvf asterisk-addons-1.6.1.1.tar.gz
2b. Compile and install asterisk:
# cd asterisk-1.6.1.9; ./configure --with-asound --with-curl --with-crypto --with-dahdi --with-gsm --with-ltdl --with-lua --with-ncurses --with-netsnmp --with-newt --with-ogg --with-oss --with-pri --with-h323 --with-speex --with-speexdsp --with-termcap --with-tonezone --with-usb --with-vorbis --with-z
After this step finishes successfully, you will see the cute logo of asterisk in ascii-art, the next step is used to select some options to be installed along with asterisk
# make menuselect
When done, save and exit. Now it is time to install asterisk
# make && make install && make samples && make config
make samples: This will install the standard sample configuration files in the directory /etc/asterisk
make config: This will install startup script, /etc/init.d/asterisk, so Asterisk will automatically start up at boot
After each make, you will get the cute logo of asterisk which means the make was successful. Now it is time for asterisk-addons which contains additional modules for Asterisk which are, for one reason or another, not included in the normal base distribution.
2c. Compile and install asterisk-addons:
# cd .. && cd asterisk-addons-1.6.1.1 && ./configure --with-bluetooth --with-ncurses --with-mysqlclient --with-asterisk
Notice: that I have --with-bluetooth set for channel_mobile
Again, menuselect is used for extra configuration
# make menuselect
When done save, exit and install asterisk-addons
# make && make install
At this point, asterisk is fully installed and ready to be used, but it needs a lot of configuration to be usable. Now it is time to launch asterisk:
# /etc/init.d/asterisk start
Connect to asterisk:
# asterisk -rvvvvvvvvvvvvvvvvvvvv