Asterisk is an Open Source IP-based PBX software application which runs on Linux and other Unix-style systems. It's become extremely well known over the last few years, but has acquired something of a reputation for being a pig to install and configure. So we decided to take a look. Note that at the time of writing, version 1.4 is the current production version; 1.6 is available, but only in Beta, so we've steered clear of that for the time being.

We decided to install Asterisk on our spanky new 64-bit AMD server, with 2GB RAM and running Fedora 10. You can run the package as a standalone internal-only PBX, or you can connect it to the outside world either via IP-based mechanisms such as SIP (which you'll achieve via a standard Ethernet adaptor and an Internet connection) or via the PSTN. If you opt for the latter, you'll obviously need to buy the appropriate adaptor card(s) and slot them into your Asterisk server. Although you can download and install pre-compiled package files for easy installation, or even get the AsteriskNOW all-in-one Linux/Asterisk installer, being eternal optimists we decided to take the more involved route of downloading the source code, then compiling and installing from scratch.

To take the approach we used, you'll need to have selected the Software Development components during the Linux installation process (if you didn't, it's no problem to add them later). There are five files to download from the Asteriskwebsite:
• The main Asterisk source, plus a second bundle containing some add-ons.
• The DAHDI library (more about that later), plus a separate file of add-ons.
• The LibPRI library.

DAHDI and LibPRI are driver modules that Asterisk uses to interact with the adaptor cards that connect the A PSTN. DAHDI is the Digium Asterisk Hardware Device Interface, Digium being both the sponsor for the development of Asterisk and a vendor of adaptor hardware for providing PSTN connectivity. Unsurprisingly the various cards in the Digium range are supported by Asterisk, but other brands are also known to be compatible (the O'Reilly guidebook for Asterisk cites Rhino, Sangoma, Voicetronix and Pika, for example).

Although the software build process is manual and based on the Linux/Unix command line, it's nothing to be frightened of so long as you satisfy three basic requirements:
• You can do basic navigation on Unix or DOS (which basically means you can do not much more than cd to change directories.
• You can read a text file.
• You can do what the content of that text file tells you.

The compilation process is simple and fairly quick, though the build of the Asterisk executables themselves takes five minutes or so as there's a lot of it. Once you're done, just make install (to install the files) and make config (to install the scripts that deal with the startup and shutdown of Asterisk) and you're sorted.

There are two ways to configure Asterisk: by hacking the text-based config files manually, or by installing an extra package - the Asterisk GUI. The guide for how to do this is excellent and again the installation is command-line based but simple - though it should be noted that the download command in the docs is out-of-date, and should be svn.

To get a basic internal PBX configured, it's probably easiest to edit the appropriate text-based configuration files - although there are loads of files, you only have to edit two. For anything more complex - particularly if you're setting up PSTN hardware or external SIP trunks, and/or the vast pile of extra features such as call routing, ACD, voicemail and so on - the GUI comes into its own as it makes life nice and graphical and straightforward (and it also shows very clearly when one of the things you've configured can't work because you've not yet set up something it depends on). The GUI is very well done, with lots of nice client-side functionality and a sensible layout.

We've mentioned that the installation process is very easy, and that the guidance you get is pretty good, so what about the documentation for configuring the package? Sadly, documentation is the weak point of the product - and in fact we feel that much of Asterisk's reputation for being difficult to use is down to the documentation being a bit too complicated. In fact, if you go to the documentation page for Asterisk you're actually told that the docs are being updated and that a new site will appear sometime in 2009 - but that's not the end of the world because, in fact, it provides you with a link via which you can download for free the entire O'Reilly book about Asterisk!

So why, we hear you cry, are we criticising the docs when in fact you have the O'Reilly book immediately to hand? Simple: what's in there is nicely done, but it really needs to take a much more basic starting level than it does, or relative novices don't really stand a chance of getting going because although the tutorials work through what to do, they're not very forthcoming on why you're doing it and what the various keywords mean. The book is handy once you've got something basic working, but you'll probably end up Googling in places. If someone were to add some nice simple diagrams, along with a couple of lead-in chapters that hand-hold you through how the various config files relate to each other, it would be a godsend. In fact, the Asterisk book is in good company in this respect - Microsoft do just the same thing, so the MSDN documentation repository is full of useful examples and tutorials that are just great if you know the basics, but which aren't so helpful if you don't want to do precisely what the example leads you through.

Asterisk, then, is actually a bloody fantastic piece of kit. Yes, it probably makes sense to limit yourself Digium hardware, which perhaps isn't as "open" as you'd like, but hey, we're in a specialist area of technology (we're talking PSTN interfaces, not ten-a-penny Ethernet adaptors) so we don't mind, and anyway there are other Asterisk-supported hardware vendors should you wish to try them. And yes, there's a shedload of configuration operations, but that's because it's so darned powerful - you can't have bazillions of features without the requisite number of controls to configure them with. The only drawback is the too-advanced documentation, but at least you can get the O'Reilly book for free, and for the more basic stuff you have that nice Mr. Google (there are loads of micro-sites and forums relating to Asterisk, and they're generally pretty good).

We started this review with the preconception that it would be almost impossible to get Asterisk to work in less than a fortnight. In fact, getting to grips with the configuration mechanisms took about half a day of Google-tweak-RTFM-tweak-curse-tweak cycles, after which the penny dropped and things started to make sense. We're now firmly of the opinion that Asterisk's a cool piece of kit, and that the average techie, given a bit of patience and a few uninterrupted hours, should be able to master the basics and start to feel comfortable.

Pro
G

Supplier
Asterisk
http://www.asterisk.org/

OUR VERDICT

Although you can use others, common wisdom is to use Digium cards for PSTN connectivity. If you're planning to try Asterisk, set aside a day or two of uninterrupted time so you can concentrate on understanding it.