Setting up Asterisk

Recently I set up Asterisk 1.6 on Fedora Linux 11. Basically I am a complete newbie for Asterisk and have limited knowledge of Linux.Though there are abundant resources available on the internet for this but still setting up Asterisk was an uphill task for me. But finally when I got it working , there was a great sense of satisfaction. Then I though for putting together steps for setting up Asterisk so that it is easier for non-experts like me.

Firstly I must mention that the easiest route for setting up Asterisk is to download the AsteriskNow ISO from asterisk.org, burn it on a CD and either create a virtual machine or a physical machine using it as the boot disk. And you'll have an up and running Asterisk box on CentOS in no time.

That said, I wanted to a setup to be on Fedora 11 because I am more comfortable on it as it has a GUI and has related paraphernalia. So getting own to the real stuff:

I did this using Fedora 11 and Asterisk 1.6 but I guess it may apply as well to other flavours of Linux with minor changes( which is a safe statement to make :))

Groundwork:
1.Have a Fedora 11 system up and running. Insure that it has a working internet connection and you have root privileges.
2.I found it easier to download the source and compile it instead of searching for binaries. The source tarballs should be downloaded from here:
a.Asterisk 1.6 source tarball: http://www.asterisk.org/downloads/asterisk/releases/asterisk-1.6.2-current.tar.gz
b.Dahdi: http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.4.0+2.4.0.tar.gz
c.LibPRI: http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.11.4.tar.gz
d.LibSS7: http://downloads.asterisk.org/pub/telephony/libss7/releases/libss7-1.0.2.tar.gz

3.Extract the tarballs in /usr/src as follows:
a.tar zxf asterisk-1.6.2-current.tar.gz
b.tar zxf dahdi-linux-complete-2.4.0+2.4.0.tar.gz
c.tar zxf libpri-1.4.11.4.tar.gz
d.tar zxf libss7-1.0.2.tar.gz

Ensure that the tarballs get extracted in their individual folders

4.Build and compile DAHDI as follows:
a.Navigate to /usr/src/dahdi-linux-complete-2.4.0+2.4.0 on the shell prompt
b.Run the following on the shell prompt: make all
c.Run the following on the shell prompt: make install
d.Run the following on the shell prompt: make config
BTW, you may want to read the README in there know the significance of above steps. For me DAHDI was necessary as I had to use the MeetMe conferencing feature of Asterisk which required DAHDI.

5.Build and compile libPRI as follows:
a.Navigate to /usr/src/libpri-1.4.11.4/ on the shell prompt
b.Run the following on the shell prompt: make
c.Run the following on the shell prompt: make install

6.Build and compile libSS7 as follows:
a.Navigate to /usr/src//libss7-1.0.2 on the shell prompt
b.Run the following on the shell prompt: make
c.Run the following on the shell prompt: make install

7.Finally build and compile Asterisk follows:
a.Navigate to /usr/src/asterisk-1.6.2.13 on the shell prompt
b.Run the following on the shell prompt: ./configure
c.Run the following on the shell prompt: make
d.Run the following on the shell prompt: make install
e.Run the following on the shell prompt: make config
BTW, you may want to read the README in there know the significance of above steps. Asterisk installation as done as the last step on purpose to ensure that all its dependencies are take care of.

8.From within the Asterisk folder run the following on the shell prompt: make menuselect. This would show the channels/applications etc which have been setup. You can verify if your asterisk installation here and see what all is installed.

9.On the shell prompt type asterisk -gvvvc to start up As terisk. This may give an error is Asterisk is already started.
10.You would be at the CLI prompt if Asterisk started successfully. You may want to connect to already running instance of asterisk using 'asterisk -r' on the shell prompt.

Congratulations!! You have successfully installed Asterisk


Setting up the Asterisk GUI
1.Get the asterisk gui source code from here: svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ gui to the /usr/src/asterisk-gui folder
2.On the shell prompt navigate to the /usr/src/asterisk-gui folder and run on shell prompt: ./configure
3.On the shell prompt navigate to the /usr/src/asterisk-gui folder and run on shell prompt: make
4.On the shell prompt navigate to the /usr/src/asterisk-gui folder and run on shell prompt: make install
5.By now ,you have the asterisk GUI installed and you need to setup the asterisk configuration files for this.
6.To allow web configuration open /etc/asterisk/manager.conf with your favorite text editor.change to ‘enabled=yes’ and ‘webenabled=yes’.
7.At the bottom of the file create a username and password for the web login page.
8.Next edit the ‘/etc/asterisk/http.conf’. Over here set enabled = yes and bind address to 0.0.0.0 so that you can access the GUI for other machines as well. Set enablestatic = yes and specify the prot binding. Most of the settings in this file are explaned in the comments in this file.
9.

Some additional tips on setting up on AWS:
1.If needed you may have to do yum install gcc, yum install gcc-c++, yum install kernel, yum install kernel-devel, yum install libxml2-devel, yum install ncurses-devel

For gtalk:
yum install gnutls-dev
yum install gnutls
svn checkout http://iksemel.googlecode.com/svn/trunk/ iksemel-read-only
yum install libtool
./autogen.sh
./configure
wget http://ftp.gnu.org/gnu/make/make-3.82.tar.gz and follow the instructions in its install
yum install makeinfo
follow the install instructions of iksemel
ln -s /usr/local/lib/* /lib
yum install openssl-devel
ln -s /usr/lib/openssl /lib
For astersik: ./configure --with-ssl=/lib

Recently I set up Asterisk 1.6 on Fedora Linux 11. Basically I am a complete newbie for Asterisk and have limited knowledge of Linux.Though there are abundant resources available on the internet for this but still setting up Asterisk was an uphill task for me. But finally when I got it working , there was a great sense of satisfaction. Then I though for putting together steps for setting up Asterisk so that it is easier for non-experts like me.

Firstly I must mention that the easiest route for setting up Asterisk is to download the AsteriskNow ISO from asterisk.org, burn it on a CD and either create a virtual machine or a physical machine using it as the boot disk. And you'll have an up and running Asterisk box on CentOS in no time.

That said, I wanted to a setup to be on Fedora 11 because I am more comfortable on it as it has a GUI and has related paraphernalia. So getting own to the real stuff:

I did this using Fedora 11 and Asterisk 1.6 but I guess it may apply as well to other flavours of Linux with minor changes( which is a safe statement to make :))

Groundwork:
1.Have a Fedora 11 system up and running. Insure that it has a working internet connection and you have root privileges.
2.I found it easier to download the source and compile it instead of searching for binaries. The source tarballs should be downloaded from here:
a.Asterisk 1.6 source tarball: http://www.asterisk.org/downloads/asterisk/releases/asterisk-1.6.2-current.tar.gz
b.Dahdi: http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.4.0+2.4.0.tar.gz
c.LibPRI: http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.11.4.tar.gz
d.LibSS7: http://downloads.asterisk.org/pub/telephony/libss7/releases/libss7-1.0.2.tar.gz

3.Extract the tarballs in /usr/src as follows:
a.tar zxf asterisk-1.6.2-current.tar.gz
b.tar zxf dahdi-linux-complete-2.4.0+2.4.0.tar.gz
c.tar zxf libpri-1.4.11.4.tar.gz
d.tar zxf libss7-1.0.2.tar.gz

Ensure that the tarballs get extracted in their individual folders

4.Build and compile DAHDI as follows:
a.Navigate to /usr/src/dahdi-linux-complete-2.4.0+2.4.0 on the shell prompt
b.Run the following on the shell prompt: make all
c.Run the following on the shell prompt: make install
d.Run the following on the shell prompt: make config
BTW, you may want to read the README in there know the significance of above steps. For me DAHDI was necessary as I had to use the MeetMe conferencing feature of Asterisk which required DAHDI.

5.Build and compile libPRI as follows:
a.Navigate to /usr/src/libpri-1.4.11.4/ on the shell prompt
b.Run the following on the shell prompt: make
c.Run the following on the shell prompt: make install

6.Build and compile libSS7 as follows:
a.Navigate to /usr/src//libss7-1.0.2 on the shell prompt
b.Run the following on the shell prompt: make
c.Run the following on the shell prompt: make install

7.Finally build and compile Asterisk follows:
a.Navigate to /usr/src/asterisk-1.6.2.13 on the shell prompt
b.Run the following on the shell prompt: ./configure
c.Run the following on the shell prompt: make
d.Run the following on the shell prompt: make install
e.Run the following on the shell prompt: make config
BTW, you may want to read the README in there know the significance of above steps. Asterisk installation as done as the last step on purpose to ensure that all its dependencies are take care of.

8.From within the Asterisk folder run the following on the shell prompt: make menuselect. This would show the channels/applications etc which have been setup. You can verify if your asterisk installation here and see what all is installed.

9.On the shell prompt type asterisk -gvvvc to start up As terisk. This may give an error is Asterisk is already started.
10.You would be at the CLI prompt if Asterisk started successfully. You may want to connect to already running instance of asterisk using 'asterisk -r' on the shell prompt.

Congratulations!! You have successfully installed Asterisk


Setting up the Asterisk GUI
1.Get the asterisk gui source code from here: svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ gui to the /usr/src/asterisk-gui folder
2.On the shell prompt navigate to the /usr/src/asterisk-gui folder and run on shell prompt: ./configure
3.On the shell prompt navigate to the /usr/src/asterisk-gui folder and run on shell prompt: make
4.On the shell prompt navigate to the /usr/src/asterisk-gui folder and run on shell prompt: make install
5.By now ,you have the asterisk GUI installed and you need to setup the asterisk configuration files for this.
6.To allow web configuration open /etc/asterisk/manager.conf with your favorite text editor.change to ‘enabled=yes’ and ‘webenabled=yes’.
7.At the bottom of the file create a username and password for the web login page.
8.Next edit the ‘/etc/asterisk/http.conf’. Over here set enabled = yes and bind address to 0.0.0.0 so that you can access the GUI for other machines as well. Set enablestatic = yes and specify the prot binding. Most of the settings in this file are explaned in the comments in this file.
9.

Some additional tips on setting up on AWS:
1.If needed you may have to do yum install gcc, yum install gcc-c++, yum install kernel, yum install kernel-devel, yum install libxml2-devel, yum install ncurses-devel

For gtalk:
yum install gnutls-dev
yum install gnutls
svn checkout http://iksemel.googlecode.com/svn/trunk/ iksemel-read-only
yum install libtool
./autogen.sh
./configure
wget http://ftp.gnu.org/gnu/make/make-3.82.tar.gz and follow the instructions in its install
yum install makeinfo
follow the install instructions of iksemel
ln -s /usr/local/lib/* /lib
yum install openssl-devel
ln -s /usr/lib/openssl /lib
For astersik: ./configure --with-ssl=/lib

Created by: satyadeep, Last modification: Thu 31 of Mar, 2011 (23:11 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+