The old adage "When it rains, it pours" is as applicable to technology as it is to salt. At least it seems that way to me. In one month's time, I had three similar requests, from three widely disparate companies, for help with phone-based applications. One was setting up a new office and wanted a complete phone system for its business. Another already had a phone system but wanted to add voice mail capabilities to it. The third had a full-function PBX and wanted to add an IVR application, with the caveat that the application required interaction with the back-end database. It was fortunate for me that there is a top-notch open-source project that made it easy to satisfy all three requests. This month, I'll look at the asterisk@home project, which is a fascinating amalgam of other open-source projects.
A Computer by Any Other Name
For many, the company phone system is that black box tucked away in some unknown closet somewhere. Few realize or consider that a modern PBX system is just a specialized computer. Each PBX has one or more CPUs. Each has RAM and ROM. Each has an operating system and one or more applications that it runs. Many have a mass storage device (for storing voice mail). In fact, the only major difference between a PBX and a desktop computer is the interface to the outside world. We use keypads to communicate with our PBX instead of keyboards, and our ears and mouth instead of our eyes to convey information. No matter how you interface with it, a computer by any other name is still a computer. And once you start thinking about a PBX in these terms, the prospect of rolling your own phone system becomes much less daunting. I'll get into why you might want to do so later.
The most important consideration you need to address when designing your own PBX is how you're going to connect to the public switched network. Are you going to use conventional phone lines? Perhaps you are going to use a T1. Now matter which way you ultimately choose, you will need an interface card for your computer that will do it. The company I use to provide my interface cards is called Digium, whose products offer the means to connect to virtually any telco connection. Their cards are designed to plug into a standard PCI 2.2-compliant slot, which any modern PC provides. (If you are only going to deploy Asterisk for VOIP applications, then you'll be able to dispense with the Digium cards and, instead, route everything over the network card.)
What makes the do-it-yourself proposition attractive is the incredible deals you can garner from the PC manufacturers. I happened to be looking over someone's shoulder as she was surfing a very popular manufacturer's Web site, and I spied a deal on a Celeron D desktop machine for the grand sum of $375, shipped. It included 1GB of RAM, a 160 MB EIDE drive, a DVD burner, and a 17" LCD monitor. I can't buy the parts and assemble one myself for that kind of money. So for $375, and another $250 for Digium's "developer's package," I was on my way to assembling my first home-brew PBX.
The Premiere Open-Source PBX
Of course, no computer, whether PBX or PC, is of any value if it lacks application software. For a PBX, the premiere open-source application is Asterisk. Asterisk provides the functionality of a phone system that, feature for feature, compares favorably with proprietary systems. You can visit the project Web site for a detailed feature list. Not only does Asterisk fare well against commercial solutions in features, but it also does well in the scalability department; you simply network Asterisk servers together if you need a larger system or if your users are in geographically separated offices.
The Asterisk software is delivered in the form of a tar ball (the UNIX equivalent of a "zip" file) that contains the base system in source form. Five additional tar balls are available to provide you with source code for hardware drivers and added functionality. Whether you need them depends on how you intend to connect to the public switched network (PSN), whether you plan to have IVR capabilities, and whether you intend to network your Asterisk servers. Notice that I keep mentioning that the Asterisk software is delivered to you in source form. You will need to compile the software before actually installing it. The instructions are straightforward and simple. To make things really simple though, I'd recommend doing your compilation on the machine that will end up being your Asterisk server.
I've read that some people have installed Asterisk on *BSD-based machines (OpenBSD, NetBSD, and FreeBSD), but most installations are done on a Linux machines. Unless you are a BSD guru, I'd suggest that you stick with Linux (almost any distribution will suffice), since the greatest community support is available there.
Open and Fully Extensible
What makes Asterisk superior to its commercial cousins is, in my opinion, the fact that it was designed to be open and fully extensible. Sure, Asterisk can do IVR like its commercial brethren (press 1 for billing, press 2 for AR...press 9 if you've forgotten why you called). But unlike its commercial brethren, the target for a selection can be a script provided by you. Thus, you are not limited by your phone switch's capabilities. Whatever esoteric or innovative application you can think up, you can create—without having to cough up additional cash for more functionality.
Once you've overcome the first hurdle and you have Asterisk compiled and installed, the next hurdle is configuration. Asterisk, like all properly designed software, uses plain-text files to store its configuration, storing them in the directory /etc/asterisk. (The /etc directory is the standard place to store configuration data. If a program has more than one configuration file, then the standard is to create a subdirectory under /etc with the same name as the program, to contain the files).
As a long-time user of UNIX-like systems, I am not intimidated by programs having more than one configuration file, but I have to admit I was stunned to find no fewer than 47 configuration files in the Asterisk directory. Yikes! Having read the excellent treatise Asterisk: The Future of Telephony, I found the files to be logical and well-named. Nonetheless, who wants to wallow through that many files just to set up a phone system? The potential for errors is just too great. Fortunately, another open-source project addresses this problem: FreePBX.
FreePBX uses a friendly browser-based face to hide the complexity of all of those files, greatly easing administrative functions. Consider this list of features from the project site:
Add or change extension and voice mail accounts in seconds.
Create Interactive Digital Receptionist menus.
Design sophisticated call groups.
Manage callers with queues.
Upload custom on-hold music.
Back up and restore your system.
In addition to configuring your system, you can also monitor it.
View call detail reporting with asterisk-stat.
View extension and trunk status with Flash Operator Panel.
I was quite surprised by the ease with which I got my first Asterisk configuration completed. In about an hour, I had a single POTS line, princess phone, and SIP (VOIP) phone connected, configured, and working. An hour after that found my system configured with minimalist IVR applications, voice mail, pager notification, and email forwarding of voice mail. In short, armed with a basic idea of what I wanted to accomplish, I was able to "make it so" in an extremely short time, all thanks to FreePBX.
One other thing: Some of the aforementioned 47 configuration files are actually provided by FreePBX, so I can't blame the Asterisk project for that. And frankly, given a choice, I'd rather have a large number of small, well-named, single-purpose files to edit than one huge, monolithic ones (like the RPG programs of old).
Let's assume that you are interested in Asterisk, that you can see some potential places where it might be useful to you, but that you are uninterested in getting your hands too dirty. Are you out of luck? Not at all. You have at your disposal the Asterisk@Home project, the ultimate solution to the Asterisk box-building blues. That was the route I took when I started my first installation, and it couldn't be any easier. I simply downloaded the bootable-ISO CD image from the project Web site, burned it to a CD, put said CD into the machine, and let 'er rip.
Asterisk@home uses the CentOS 4 distribution as its base. For those unaware, Red Hat provides source packages for its Enterprise Linux distribution. CentOS is a project in which those source packages are used to build a distinct, but compatible, distribution. Upon booting, I was asked if I wanted to install Asterisk@home, with the admonition that the contents of the hard drive would be wiped clean. Since there was nothing of value on the drive (it contained the factory-installed WinXP image), I was more than willing to allow that to occur.
Once I answered a couple of questions concerning my connection to the network and my desired root user password, the software loaded the OS, then Asterisk (doing all of the necessary compilations for me), then FreePBX and SugarCRM (a CRM application some of you might find interesting). All of the dependencies were provided, and I literally had to do nothing more than sit and watch while the heavy lifting was done for me. When the system rebooted, I was able to use a browser on another machine to access the FreePBX instance and start configuring my server. I was truly impressed by the way the gang at Asterisk@home put this thing together. It eliminated most of the headaches and tedium that would put off many from attempting this project.
But why? You may still be wondering why you'd want to create your own PBX. That's a fair question, particularly if you aren't currently involved with your existing switch.
My biggest reason for doing this (besides having clients asking for it) is for the same reason that I like open-source software so well: I really tire of dealing with licensing issues. How many of you have had a catastrophic failure of some piece of computer hardware and discovered that you had misplaced your license information? Did you enjoy the hoops you had to go through to replace the information? Please don't lecture me about taking better care of my license keys, either. Anyone who can tell me that they haven't had to scramble once or twice in their career to get license keys is either untruthful or too new at the profession to have needed to. I don't mind paying for software, but I despise having to prove that I did so time and again.
Another of my reasons is to extend the functionality of an existing PBX without having to replace equipment (the aforementioned IVR application). An Asterisk server can sit in front of your existing PBX providing new services, while passing off everything else to the existing switch. Alternatively, it's possible to connect Asterisk to the existing system, adding VOIP connectivity to a system devoid of that possibility. Asterisk has been designed to integrate into an existing system or to stand alone as a full-featured PBX.
I know that many companies are still squeamish about implementing software that doesn't have some company standing behind it. Linux started taking off in the business community only after the IBMs and Red Hats of the world starting providing sources of commercial support. I suspect that Asterisk is no different. If that's the only thing holding you back, then be assured that commercial support is available for it, too. As a matter of fact, Digium provides a commercial version of Asterisk, complete with support. Given that Digium is also a supplier of telephony hardware, you can be assured that the company has a vested interest in the success of the product.
Personally, I find products like this fascinating. I've always been interested in electronics, having inhaled my share of solder fumes. My love of software grew from the ability to make changes quickly, something that can be tedious with electronics projects. Asterisk gives me an opportunity to do some interesting things that meld both hardware and software, with a powerful and useful product as a result. I think that you, too, might get hooked if you give it a try. Your business might just benefit as a result!
R.I.P. Asterisk@Home , Long Live TrixBox
Between the time that I submitted my article for editing and the time it was returned to me for clarifications, the Asterisk@Home project came to a close. In its place is Trixbox. Victoria Mack (the editor) discovered this as she was verifying the links in the article. Clicking on the Asterisk@Home links redirected her to the TrixBox project's Web site. Her question was simply "What effect does this have on the article?" Good question!
After some investigation, I have concluded that basically we're looking at a name change and some architectural changes in the project. My guess is that the name change was initiated so as to lose the connotation that "@home" gives to the original project, that somehow this project is only useful "at home." On the TrixBox Web site, I found a sentence that in essence says to think of TrixBox as Asterisk@Home version 3 (the currently released version is 2.x), so I don't think that we're looking at a major overhaul. On the other hand, one nicety added to the TrixBox site is the ability to upgrade the software instead of having to reload the box every time Asterix@Home released a new version. While the latter is not as bad as it sounds, an upgrade procedure is a welcome addition to this fine project.
The bottom line is this: Feel free to use the well-tested Asterisk@Home project software. It's still available for download from the TrixBox site, so you can put it into production if you wish. If you're slightly more adventurous and don't mind a few gremlins while TrixBox goes through teething pains, then give it a shot. In either case, you won't be disappointed and the cost for the software is the same: free. You'll get much more than you paid for with either product.