19
Fri, Apr
5 New Articles

The Linux Letter: Open Source Meets the Phone System

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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.

Hardware

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.

Configuration

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).

Asterisk@Home

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.

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms for over 23 years. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He co-authored the book Understanding Linux Web Hosting with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

Barry Kline 0

Barry L. Kline is a consultant and has been developing software on various DEC and IBM midrange platforms since the early 1980s. Barry discovered Linux back in the days when it was necessary to download diskette images and source code from the Internet. Since then, he has installed Linux on hundreds of machines, where it functions as servers and workstations in iSeries and Windows networks. He co-authored the book Understanding Web Hosting on Linux with Don Denoncourt. Barry can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: