This article demonstrates how to build your own IP PBX in about an hour . Provided that the instructions herein are followed carefully, you too should be able to set up your very own IP PBX system and all for the cost of the target hardware of your choice.
1) . What is a PBX ?
A PBX (Private Branch Exchange) is a switch station for telephone systems. It consists mainly of several branches of telephone systems and it switches connections to and from them, thereby linking phone lines.
Companies use a PBX for connecting all the internal phones to an external line. This way, they can lease only one line and have many people using it together, with each one having a phone at the desk with different number. Inside a PBX, you only need to dial three-digit numbers to make a call to another phone in the network. We often refer to this number as an extension.
Most people are familiar with PBXs because they've used them in an office environment, but what if you wanted to use one in small office or your house? Enter Asterisk , which is free and offers all this functionality right out of the box.
Asterisk is a software implementation of a hardware PBX and can run on a variety of hardware platforms. The features and benefits of owning an Asterisk PBX are numerous, and seemingly only limited by the imagination of the person who sets up and uses an Asterisk PBX. (Click to see the features of Asterisk ).
2). Build your Asterisk PBX
There are many ways of setting up an Asterisk PBX, with some being easier than others. The easiest amanner in which to set up a fully functional Asterisk PBX is to download and install aprecompiled/tuned distribution such as Trixbox, Asterisk NOW, etc. Just take your pick of those. These are great if you don't care to learn about how your PBX operates or need to do a mindless "click and drool" install. The problem with precompiled asterisk distributions is, while they are simple, they are not as flexible and extensible as a home-brewed Asterisk installation from the source code. When you install one of these "distros", it is quite often that important decisions are already made for you, and you must work within the framework of the distribution to keep the box "happy". When you roll your own Asterisk from the sources, you get more say in what goes into the build and how it is customized/extended at the expense of a slightly more complicated planning and installation process. However, it's not as hard as you might think and it's quite worth it in the end to "roll your own".
In this article I will cover the steps needed to install Asterisk for the Ubuntu Linux operating system. This article assumes you know how to do a minimal command line only base system install of Ubuntu Linux. You certainly don't want to run a GUI on your Asterisk box as it would consume unnecessary resources.
Step 1: prepare a minimal Ubuntu machine.
Step 2: download source packages
After you've prepared your minimal Ubuntu machine, you will need to download a few source packages from Asterisk.
Logged in the Linux OS as the root user we'll download the needed packages by running the following script in your terminal screen. If you are familiar with Putty, you can also do this remotely via a windows desktop or SSH into the box as root from any other Linux machine.

(NOTE: we will be using Asterisk 1.4)
Source packages needed list below:
asterisk-1.4.21.2
zaptel-1.4.11
libpri-1.4.5
asterisk-addons-1.4.7
asterisk-gui
Copy and paste the following code into a new file in a terminal window and save the file as "astsetup.sh". Then when you save the file, make it executable by running this command: chmod +x astsetup.sh.
¡ª¡ª> BEGIN COPYING CODE TO NEW FILE
####### Prepare Build Environment
apt-get install build-essential speex libspeex-dev gsm-utils \
libgsm1-dev libgsmme-dev libgsm1 libgsm-tools \
libncurses5-dev ncurses-term linux-headers-2.6.24-19-generic \
libncurses5-dbg doxygen subversion
####### Download Asterisk Source Packages
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.21.2.tar.gz
wget http://downloads.digium.com/pub/zaptel/releases/zaptel-1.4.11.tar.gz
wget http://downloads.digium.com/pub/libpri/releases/libpri-1.4.5.tar.gz
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.4.7.tar.gz
svn co http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui
####### Extract all packages for building
tar -zxvf asterisk-1.4.21.2.tar.gz && tar -zxvf zaptel-1.4.11.tar.gz \
&& tar -zxvf asterisk-addons-1.4.7.tar.gz && tar -zxvf libpri-1.4.5.tar.gz
####### Begin Building and Installing Source Packages
cd libpri-1.4.5
make
make install
cd ../zaptel-1.4.11
make clean
./configure
make menuselect
make install
make config
cd ../asterisk-1.4.21.2
make clean
./configure
make menuselect
make install
make samples
make progdocs
cd ../asterisk-addons-1.4.7
make clean
./configure
make menuselect
make install
make samples
cd ../asterisk-gui
./configure
make
make install
make samples
cd /root
mkdir packages
mv *.gz /root/packages/.
echo INSTALLATION COMPLETE PLEASE CONFIGURE WEB GUI
¡ª¡ª¡ª-> END COPYING CODE TO NEW FILE
One final step remains in order to bring the GUI up and running. We must edit two files:
/etc/asterisk/http.conf and
etc/asterisk/manager.conf.
/etc/asterisk/http.conf:
[general]
enabled=yes
enablestatic=yes ; without this, you can only send AMI commands, not display
; html content
bindaddr=0.0.0.0 ; address you want the Asterisk HTTP server to respond on
bindport=9000 ; port you want the Asterisk HTTP server to respond on
prefix=asterisk ; will form part of the URI, similar to a directory name
/etc/asterisk/manager.conf:
[general]
enabled=yes ; you may already have AMI enabled if you are using it for other things
webenabled=yes ; this enables the interaction between the Asterisk web server and AMI
[admin] ; This is the manager username. You can name the user whatever you want
secret = password
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config
¡ª¡ª¡ª¨C
Restart your PBX server and point your browser to:
http://ip-of-pbx:9000/asterisk/static/config/cfgbasic.html (where IP of PBX is the IP address of your PBX box)
You should then see the web GUI and should be able to logon and start creating extensions (users).

Asterisk is very flexible, scalable, and limitless in its scope of use, so there is no way I can tell you everything that can be done with this amazing piece of software. It's use is not just limited to communication and phone management and there are thousands of hacks that can be applied to Asterisk. Some of them are:
Home Automation using X10 addressable switches
Remote home/office alarm/lock control
Remote environmental/audio monitoring
Conference Rooms
E-mail reader (text to speech access to any email account)
Remote Dictation
Voice Recognition
Ability to run system commands by phone - Remote Control
Phones and Extension Types
Asterisk supports any standards based SIP or IAX compatible voip phone, Softphones and VOIP ATAs are also another way to interface with your Asterisk system.
3) . Voip Service Providers/PSTN
Asterisk can connect with the world either directly with a voip service provider that allows a "byod" (Bring Your Own Device) plan, or directly with the PSTN (Public Switched Telephone Network) via an asterisk card.
|