Build Your Own PBX With Asterisk and Linux

Setting up your own Asterisk installation isn't for the faint of heart, but the savings you can reap from combining the powerful, open source PBX with Linux are worth the effort. Here's a quick guide to getting your own Asterisk install up and running.

By Paul Rubens | Posted Sep 8, 2009
Page 1 of 2
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Building your own corporate phone system using the Asterisk open source telephony suite could result in massive cost savings for your company, but it's not for the faint-hearted: Asterisk is a complex system, and if you mess up the phone system it could end up costing you your job.

Personally I'd recommend taking an Asterisk Fast Start course to get you up and running, but if you fancy trying out Asterisk in the lab to see if it might be suitable for your organization here's what you need to know to start.

Firstly you'll need a Linux box to install Asterisk onto – the one I have is running Ubuntu Jaunty, but you can run Asterisk on pretty much any Linux distro with a kernel version 2.6 or later.

You’ll also need the GCC version 3.x or later for compiling, and the following system libraries and applications:

  • openSSL and its development libraries

  • ncurses and ncurses-devel (for the CLI)

  • zlib (compression library)

  • newt and newt-devel libraries (for DAHDI utilities)

  • curl (to allow Asterisk to interact with web sites)

  • sendmail or postfix (for sending voicemail to your email)

Once you have a suitable rig set up, head over to www.asterisk.org/downloads and download four tarballs, for Asterisk (the asterisk code itself), libpri (which handles ISDN telephony), dahdi-linux (a package formerly known as zaptel, which handles analog and digital telephony interfaces), and dahdi-tools, which has some dahdi-related utilities.

It's a good idea at this stage to copy them to /usr/src/.

Now open a terminal window, and cd to /usr/src/

A quick ls -l in that directory will list the versions of the tarballs you have, which will probably be something like:

libpri-1.4.10.tar.gz
dahdi-linux-2.2.0.tar.gz
dahdi-tools-2.0.0.tar.gz
asterisk-1.6.1.1.tar.gz

Don't worry if the versions aren't exactly the same as the ones above. Now, with root privileges, extract the tarballs, using

# tar –zxvf libpri-1.4.10.tar.gz
# tar –zxvf dahdi-linux-2.2.0.tar.gz
# tar –zxvf dahdi-tools-2.0.0.tar.gz
# tar –zxvf asterisk-1.6.1.1.tar.gz

Again, do an ls –l to ensure you have four directories in /usr/src/ :

libpri-1.4.10
dadhdi-linux-2.2.0
dahdi-tools-2.0.0
asterisk-1.6.1.1

Continued on Page Two: Building the Source and Installing Asterisk

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter