NOTE: For a more current article on setting up an IVR application with Asterisk®, see this Nerd Vittles article.
Summer vacation is over for us so today we hit the ground running. No home or office is complete without your very own free PBX. So we kick off our fall season with a series of HOW TO articles which will tell you everything you ever wanted to know about deploying the world’s best and most powerful open-source PBX, Asterisk. You might be asking, "What is Asterisk?" We like to think of Asterisk as the world’s finest telephony toolkit. Just about anything you’ve ever heard on a telephone can be built with Asterisk. It provides a rich collection of building blocks which allow people to call you using virtually any telephony platform including POTS (plain old telephone system) and VoIP (voice over IP). Hardware interfaces are available to connect your Asterisk PBX to T1 and PRI circuits, ISDN lines, POTS lines, and IP networks. And the beauty of the Asterisk design is that you build your system identically regardless of the telephony hardware interfaces you choose. When a call is received, Asterisk provides the tools to design an auto-attendant, an interactive voice response (IVR) system, a call routing system, a voicemail system including email or pager notification and delivery of messages, a fax server, and a teleconferencing system. Asterisk scales from one user to thousands on hundreds of interconnected systems. You can even put extensions at your remote getaways and make and receive calls through Asterisk at your home base. You also can mix and match hardware and call features to your heart’s content while adding sophisticated touches such as call queueing, music on hold, and even wakeup calls. There’s a terrific web interface to walk you through configuring your Asterisk server and another web application lets you listen to your voice mail messages with any browser. You won’t master Asterisk overnight, but you’ll be glad you invested the time learning it.
Our objective, as with all of our tutorials, was to identify a best-of-breed approach to Asterisk deployment which minimized the cost and learning curve while maximizing the functionality available. Our other Golden Rule applies in spades to Asterisk: Start Small and master the basics. Then grow your system. You don’t need to buy anything to start using Asterisk if you have an old clunker PC lying around your home or office. Out of the box, Asterisk supports VoIP telephony and a number of free softphones including X-Lite that work with Mac OS X, Linux or Windows PCs are available for the taking. Of course there are thousands of Asterisk developers around the world (even us) who will be more than happy to charge you $150 an hour to build any type of Asterisk PBX you can imagine, but we’re assuming your budget is more limited. Before we get to actual installation of Asterisk, let’s address briefly what types of systems are possible and what the relative costs would be.
Asterisk Hardware Costs. To reduce your anxiety level about Asterisk, let’s first talk about costs. Asterisk can be run on virtually any modern PC (3 years old or less) or a Mac. While we always lean toward the Mac platform because of the ease of installation and use as well as the open source flexibility that Mac OS X provides, Asterisk is an exception primarily because the simple tools are not yet available for the Mac and because Asterisk consumes all the computing resources it can get its hands on. Stated another way, your Asterisk server ought to be built on a machine dedicated to Asterisk and its tools. So don’t waste your Mac when PCs are a dime a dozen these days. And the very best implementation (today) is built around Linux running on any garden-variety PC. Yes, a $188 WalMart special (see inset below) will probably suffice for home or home office use. And, no, you won’t have to learn Linux to use Asterisk effectively.
Asterisk is extremely processor-intensive because of the digitizing and compression of incoming and outgoing human speech so the more simultaneous calls and tasks you wish to handle, the beefier the machine needs to be. Having said that, an under $1,000 AMD Athlon 64-based system with a gig of RAM and a 200GB drive could probably handle several hundred simultaneous calls and many more users without breaking a sweat. The Nortel solution for an equivalent system with consulting fees would be in the hundreds of thousands of dollars. For more sizing information, go here.
Editor’s Note: This version of Asterisk@Home has been superceded. For the latest tutorial on or after February 3, click here.
Choosing a Telephony Provider. Assuming you want to make calls out through your Asterisk PBX, you have two issues to consider. First, you need a telephony provider to route your calls to their destinations unless you only want to talk to other individuals in your home or office. And second, you need telephone equipment for each of your users. Our recommendation on telephony providers is to ditch Ma Bell and her offspring and choose a VoIP provider that gives you unlimited local and long distance calls to the places you frequently call. We’ve already explained in a previous article why our VoIP provider of choice is BroadVoice, and the balance of these tutorials assume you will go that route. Before you go the VoIP route, read our article and get a good handle on not only the advantages but also the risks and tradeoffs of VoIP technology. We think BroadVoice gives you the best VoIP bang for the buck: unlimited incoming and outgoing calls to 21 countries for only $19.95 a month plus a $2.50 service charge including a phone number in your choice of most area codes. There are, of course, other applications where outgoing calls may not be that important. For example, if you wanted to build an Asterisk IVR application to provide movie reviews and schedules or real estate listings or Little League baseball scores, then all you really care about is having a local phone number and free incoming calls. BroadVoice can meet those requirements with their Bring-Your-Own-Device (BYOD-Lite) Plan using Asterisk for $8.45 a month. Add unlimited outgoing calls within a single state for only $4 more a month. And, for businesses, unlimited calls within the U.S. and Canada are only $29.95 a month plus a $2.50 a month service charge. If you’re dead set on keeping your Baby Bell phone line, then you’ll need a Digium Wildcard X100P FXO PCI Card to connect your POTS line to your Asterisk PBX. You can find OEM versions for under $10. Just search for X100P on eBay. Software installation instructions are available here. Note: This card allows your Asterisk PBX to place and receive calls from a POTS line. It does not allow you to connect a telephone instrument. We’re getting to that.
Choosing Telephones. As with most technology decisions, choosing telephone instruments depends upon your requirements. If your VoIP PBX will be used in your home or home office by mostly your family where one person talks on the phone at a time, our recommendation would be to pick up one of the new 5.8GHz cordless phone sets. Many can support up to 8 wireless extensions which you can scatter around the house as desired. All that’s required is an electric outlet for each unit’s AC adapter. They work great throughout large homes and won’t interfere with your home wireless network. Visit Best Buy, Staples, Office Depot, or Office Max and have a look at the incredible selection which has become available in just the last year. Then go to PriceGrabber.com and save yourself 20 per cent. Sam’s Club and Costco also run specials on these phones almost weekly. If you go this route, then you’ll also need a Sipura VoIP adapter to connect your analog phones to your Asterisk digital PBX. If all you want to connect is a single cordless phone set with up to 8 wireless extensions, then the SPA-1001 will suffice. It’s the size and weight of a pack of cigarettes and costs about $60. For two lines, choose the SPA-2002 or choose the SPA-2100 for a cordless phone set and a fax machine. If you’re looking down the road to the day of multiple VoIP providers, then you’ll want to spring for the Big Kahuna, the SPA-3000, which still costs less than $100 (see inset below).
If you have a home office or a business and want a true business telephone instrument with speakerphone, multiple line support, and intercom paging, then IP telephone instruments are the way to go. We personally favor the GrandStream GXP-2000 (inset above) which is under $100 at the Voxilla Store. Sipura also makes a phone, but there have been problems reported with the rubberized buttons sticking. For $200, you can move up to the Polycom IP501 with a state-of-the-art speakerphone. With either of these phones, the same BroadVoice coupon described above is included. We’d recommend you steer clear of Cisco-branded IP phones (they also own Sipura now) unless you like burning money and enjoy water torture. Trying to obtain software updates from Cisco is next to impossible unless you purchase the phones directly from Cisco and subscribe to a maintenance contract (also expensive).
Homework. We’re going to give you until next week to get all of your hardware lined up, and then we’ll be ready to load Asterisk. We’ve chosen a bundled Asterisk product called Asterisk@Home that provides Linux, Asterisk, Apache, MySQL, and PHP all rolled into a single CD. You simply insert the CD into your PC, turn it on, and it will reformat your drive (aka "erase everything") and load a turnkey system for you. It doesn’t get much easier than that. You’ll be up and running in less than an hour. If you want to get a head start, you can download the ISO image, handbook, and user’s guide from here. There’s a great Asterisk tutorial from an Australian user that’s worth a look: Asterisk@Home for Dumb-Me. You may also want to review the Asterisk User Documentation Project including The Hitchhiker’s Guide to Asterisk which was written by some of the best in the business. It’s available in both HTML and PDF formats. Finally, there’s a new commercial offering, Asterisk: The Future of Telephony, at Amazon.com. For future reference, here’s the place to go when you get stumped down the road.
Some Recent Nerd Vittles Articles of Interest…
Thanks for making this article so clear and easy to understand.
I have read a lot of similar articles, and they have all seemed to go reall heavy into the telphony lingo speak without really explaining it.
These instructions were, by far, the most successful of any I used during my setup. There were, however, two issues that I encountered that were not covered by the instructions and I wanted to post them here so that others may benefit. First, from http://chayden.net/Asterisk/SeUpAsteriskAtHome.htm it is important to follow the instructions under Edit extensions.conf. Second, following the instructions to update the system using yum, I did so. After I rebooted, I noticed that the zaptel module would no longer load. Following instructions from help-aah, I did a rebuild-zaptel and then rebooted again. This time the zaptel module loaded. However, I lost the ability to hear any sound when trying to record messages for the digital receptionist or hear any of the default recordings built into AsteriskAtHome. From my experimentation and several reinstalls, I discovered that it was the new zaptel module loading that caused the problem. I am running Asterisk 1.0.9 and I do not have a zaptel card. Others who need this capability may have different results. But I searched online for a solution to this sound problem with no success. So I wanted to put it out there in case someone else runs into it.
I think you’re articles are great. Thanks for providing the information. I am looking into setting up Asterisk at home but have a question regarding the TDM cards from Digium. I want to eliminate my phone service completely. Will I be able to connect a home alarm system to an FXS port? Is a dial tone provided through the hardware and software?
Great work , even newbies can follow complex telecom system by follwoing your configuration. this is what great teachers do. making what is complex easy to understand. what about doing something on misterhouse and asterisk@home for home automation. most people use PC. thanks in advance
After I have setup my pbx & voip phone – do people receiving my calls need to pay extra or buy any device? Or they dont have to do anything?
[WM: That depends upon your country, but usually the answer is no to both questions.]