IIITM-K How-to Knowledge Base/To set up Asterisk Server

From IIITM-k-wiki

Jump to: navigation, search

Contents

Authors

Asha Rose V

Introduction

Asterisk is an open source PBX (Private Branch Exchange) under dual license. As it is open source you can add new applications on it by modifying the code. A number of telephones can be attached to asterisk, both soft phones and hard phones. The software for soft phones can be downloaded from the websites and for attaching the hard phones you may need a card in your system. Also chat and file transfer interfaces are coming with some of the soft phones. Ans many built in features are there with asterisk. IVR(interactive voice response), conference calling, automatic call distribution are a few examples of the features. Also you can configure your asterisk server for voice mail options.

Three main protocols can be used in asterisk : IAX2, SIP and H323. I have cofigured my server to run between both IAX2 and SIP.

Installation can be done in two ways, either from the compiled files or from the source code. In the first method already compiled file will be available and you need only to install it from those files. And in the second method, first you have to get the source code and then compile it. After compilation you have to install it.


Installation On Debian

As I mentioned earlier Asterisk can be installed in two methods :

  • Compiled Files
  • Source Code

Installation from Compiled files :

In the case of Debian, you can install Asterisk using a command :

# sudo aptitude install asterisk

This will install all the required packages. After the installation you need to configure the server.

Installation from the source code :

For installing from the source code, first you have to get the source code from the digium website. You require three major packages for the installation.

  • zaptel
  • libpri
  • asterisk

You can download the three packages from the following sites :

zaptel     (zaptel 1.4 current)    -->  http://www.asteriskpbx.com/downloads 
libpri    (libpri 1.4 current)   -->  http://downloads.digium.com/pub/libpri
asterisk (asterisk 1.4.18)       -->  http://www.asteriskpbx.com/downloads

After getting the packages you need to compile them. You can compile it in the following order.

Also you will need to get some more pakages for teh compilation to be done. You can get it using either by copying the following commands and pasting it in you terminal or by typing the same.

 # sudo apt-get install linux-headers-`uname -r`  build-essential bison openssl libssl-dev libeditline0 libeditline-dev 
  libedit-dev gcc make g++ mc php5-cli mysql-common libmysqlclient15-dev libnewt-dev


Compilation of zaptel

Now move the packages to a folder where you like to have them. Then move to that folder. Then change directory to /zaptel-1.4.8 . Now do the build requirements.

1. Build requirements

You will need a matching kernel source tree and a working Linux build system. Some of the programs require some additional libraries.


The script install_prereq should help you install the required packages. To see what it suggests, run:


 ./install_prereq test


You can either copy/paste that code to a terminal to run it, or just run:


 ./install_prereq install


2. Installation


Note: If using `sudo` to build/install, you may need to add /sbin to your PATH.


# ./configure


Next is a optional step: select custom configuration:


# make menuconfig

Now you have to type copy and paste this :

# make
# make install

This is to install init scripts and config files:


# make config


For more details you can go through the README file coming with this package. You can find it in the same folder.

Compilation of Libpri

For the compilation of libpri package you need to do the following steps. First you need to change your directory into the libpri directory. Then type or copy and paste the following steps into your terminal :

# make
# make install

Compilation of Asterisk

For compiling and installing the asterisk you need to change your directory into the asterisk directory. After that type the following commands in your terminal.

# ./configure
# make
# make install
# make samples

Now you are done with your installation and you can see the server running using the command :

# asterisk -vvvc


So it will open a command line interpretter like this :

CLI >

If you type help in this CLI it will show you all the commands available that can be used to monitor the server.

Now we have to configure the server so that you can register new users and monitor them.

Configuration Details

Personal tools
<
May 2012
>
SMTWTFS
12345
6789101112
13141516171819
20212223242526
2728293031
Events Upcoming
More ยป