Ok, so before you read this guide, I have to urge you to consider ditching Asterisk in favor of using RingRoost. If you are a business or VoIP reseller there is nothing that Asterisk can do that RingRoost can’t (except break), contact us or schedule a demo to see what I mean.
Here is a guide on how to install Asterisk 13 on Ubuntu 14. It’s pretty easy/straight forward except one slightly tricky part – which is installing “PJSIP”, so make sure you read along carefully.
apt-get update
We will install Asterisk in “/usr/src”:
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/certified-asterisk/certified-asterisk-13.1-current.tar.gz . tar -zxvf certified-asterisk-13.1-current.tar.gz cd cd certified-asterisk-13.1-cert2/
Install some dependencies:
apt-get install build-essential apt-get install libxml2-dev apt-get install libncurses5-dev libreadline-dev libreadline6-dev apt-get install libssl-dev apt-get install uuid-dev apt-get install libjansson-dev apt-get install libsqlite3-dev apt-get install pkg-config
At this point we need to select the SIP library we are going to use in Asterisk. SIP is basically VoIP protocol that we MUST have in asterisk. Version 13 of Asterisk is a little awkward because it can use either “PJSIP” (a 3rd party library) or it’s native built in SIP library. The Asterisk team is encouraging people to use “PJSIP” instead of the native SIP library, so in Asterisk 13 PJSIP is the default library, but on Ubuntu 14 PJSIP must be installed and compiled from source.
So we can do things the quick and easy way (use the old Asterisk SIP library) or the right way (install PJSIP). I will outline both approaches below. If you are new to this I would just do the quick/easy way and then maybe switch to PJSIP later.
1. Use native SIP library in asterisk (quick and easy way)
./configure make menuselect
Under channel drivers –> select chan_sip (press enter then save by pressing back then “s”). Then continue to compile & install instructions.
2. Install PJSIP (the right way)
cd /usr/src/ wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2 tar -xjvf pjproject-2.4.tar.bz2 cd pjproject-2.4 ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr CFLAGS='-O2 -DNDEBUG' make dep && make && make install ldconfig
Go back to your asterisk directory and “./configure” then continue to then continue to compile & install instructions.
cd ../certified-asterisk-13.1-cert2/ ./configure
Compile and Install Asterisk
make make install makes samples make config
Crank asterisk up:
/etc/init.d/asterisk start
Then connect to Asterisk Cli:
asterisk -rvvvvvvvv
Congrats you have at this point successfully installed Asterisk, if your not sure where to go from here you could start by setting up an interactive voice response system on Asterisk which I show how to do step by step in this article: https://www.ringroost.com/ivr-setup-asterisk.php.
Here are some common errors & fixes when you are installing asterisk 13 on ubuntu 14.04.
Hi, Good tutos. I have also read https://www.ringroost.com/ivr-setup-asterisk.php. But nothing is working for me. Linphone says “Not Found 00::00::00″ when i tried to call the ivr. So I need your help
Hellou, great post. But i found one big problem after “Compile and Install Asterisk “. Command “make” not finish (finish with error). Is important dont use command “./configure”, but command ‘./configure LDFLAGS=”-z muldefs” ‘. It is bug in asterisk – source: https://issues.asterisk.org/jira/browse/ASTERISK-25503
hey when I use make it said at end
chans_iax2.so Error 1
channels error 2 and recipe for target channels failed please help
When I do the make command I get an error saying
”
make[1]: *** [chan_iax2.so] Error 1
Makefile:386: recipe for target ‘channels’ failed
make: *** [channels] Error 2
“