Under The Hood: Using VOIP At Home
By Mancill, Tony
This is no longer rocket science-but there are still plenty of pitfalls for the do-it-yourselfer.
If you rank the success of a technology by how recognizable it is to the layperson, then 2005 appears to be the year of VOIP-at least in my circle of family and friends. I’m guessing much of this awareness stems from their exposure to lots of advertising, especially the full-on primetime and banner ad onslaught by Vonage.
Because I’m employed in the computer field, people often expect me to know all about VOIP technology-just as I am expected to have answers when it comes to recovering hard drives, eradicating viruses, wiring up home networks and getting programs X and Y (written in different languages and centuries), to work together. Until recently, I had plenty of opinions to offer about VOIP (voice over IP), based on years of reading trade press coverage, plus some lab work on Asterisk and SIP gateways at the office-but when it came to hands-on use at home, my advice was purely theoretical.
Not wanting to lose my “go-to technogeek” status, and well aware that VOIP was about to be forced into my repertoire, I decided to roll up my sleeves and satisfy my technological curiosity. Actually, the immediate catalyst was more basic: A family member was going to be in Germany for an extended period of time, and I was hoping to save some serious scratch on international long distance calls.
While I planned eventually to subscribe to a commercial VOIP service, I was skeptical about signing up for a service requiring a commitment, without taking the technology for a spin first. I was also in a hurry, and wanted to quickly learn more about the innards of a home VOIP setup than I would get if I just signed up for a Vonage-type Internet telephony service provider (ITSP), so I opted to do it myself.
A Is For Asterisk
My first step was to locate the “Asterisk Developer Lite” kit that I purchased about a year ago from Digium. The kit included a pair of PCI add-on cards and a two-page quick-start explaining how to go online to retrieve and compile the source code for Asterisk, the open source PBX software.
I opted to install Asterisk on a PC connected via standard Ethernet to my home network. Like my other PCs, it accesses the Internet via my broadband cable modem service. I downloaded the Asterisk software and installed the two cards, as follows:
* The FXO card goes on the PSTN (Public Switched Telephone Network) side and connects to a POTS line, so in terms of signaling, it looks, to your local exchange carrier (LEC), just like a telephone. Electrically, it can detect ring voltage; it can detect caller ID signaling, go off-hook to complete the local loop and answer the call, and then later go back on-hook to hang up the line.
The FXO card can also go off-hook and dial a phone number. In short, it is indistinguishable, except for its drivers, from any other PC fax/modem card.
* The FXS card is a bit more unusual for a PC, because it emulates the POTS line to the analog phones on the station side of the Asterisk PBX. It produces ringing voltage and detects analog telephone devices going on-hook, off-hook, flashhook, etc. The FXS card can be connected directly to your home’s inside wiring, assuming you have first moved your LEC-provided analog line to terminate on the FXO card. (Not difficult, just be careful-ring voltage can sting a bit, and you most certainly don’t want to tie the FXS board to your POTS line).
With this setup-broadband Internet access, plus the two cards and the Asterisk software running on my PC-I had essentially inserted a switching node, a PBX, between my Internet access, my POTS line and the telephones connected to my home’s internal wiring. Now I had the option of making and receiving calls over the PSTN or the Internet, and my dial tone was coming from the Asterisk PBX, not the phone company (Figure 1).
FIGURE 1 Home PBX With Asterisk
You may be wondering, why on earth would anyone want a home PBX? There are dozens of reasons-some of them geekier than others-but they all come down to customizing how your phone works:
* Start with security. Imagine full logging of caller ID, date, time and duration of all inbound and outbound calls. Recording of all inbound calls. Rejecting calls from certain numbers.
* Handle calls from different callers differently. Send your sister-in-law’s calls to a separate mailbox that automatically emails the message to your wife’s email account. Force all unknown numbers to leave a message without ever ringing the inside line. Leave a custom voice mail greeting for calls from well-known numbers, or even a different greeting for each such number.
* Configure find-me, follow-me type services.
Pretty much anything you can imagine and are willing to take a bit of time to configure in Asterisk is fair game. In my case, it wasn’t the features that interested me as much as the prospect of making inexpensive, good-sounding calls-especially international long distance calls-using my existing phones. (No one I know wants to sit in front of their computer for a phone call, and neither do I, so a softphone was out of the question.)
As for VOIP sound quality, I knew that was largely beyond my control (except to abandon poorly-performing service providers, hence my “no commitment” approach). Therefore, I hedged my bets with the configuration I set up: It let me keep my existing telephone number and PSTN connection while experimenting with VOIP services for outbound calls using my existing phones.
No LNP, Just Outbound For Me
With Local Number Portability (LNP), the VOIP service provider “ports” your existing phone number from your LEC to their control. I opted not to do this, as I didn’t want to change the way calls come into my home phone number until I could be assured that there would be no service outage or adverse side-effects (who wants a three- week “temporary” number change?). And I didn’t need LNP in order to meet my primary objective of using a VOIP long distance provider as an alternative to the usual suspects for outgoing long distance (e.g., my traditional interexchange carrier, a calling card, or one of those 10-10-XXX services).
To use the telephony jargon, I only needed a VOIP termination service, meaning the ability to make outgoing calls, not an origination service, meaning the ability to receive inbound calls.
A bit of Googling turned up a pretty good list of both IAX- and SIP-signaling VOIP service providers on the site www.voip-info.org/ . (This site also offers a wealth of information about configuring the features of Asterisk.)
My Asterisk PBX supports both IAX and SIP, the two most popular VOIP protocols used for session control; that is, setting up and tearing down phone calls, transmitting caller ID information, and indicating ringing (also known as “alerting”), etc. Both are open protocols, but the Session Initiation Protocol (SIP) enjoys broad industry support and is documented in RFC standard documents by the IETF, while the Inter-Asterisk eXchange protocol (IAX) has grown out of the popularity of Asterisk and is becoming a de facto standard of sorts. Some of the other major differences between the two signaling protocols are as follows:
* IAX handles both signaling and media transport-i.e. the session control functions described above plus the voice packets for the call. SIP is only for session control and depends on another protocol like Real-Time Protocol (RTP) for the media stream.
* IAX has facilities for trunking multiple calls between IAX switching nodes in a single stream. Related to this, IAX is known to be more frugal with bandwidth.
* SIP uses text commands, much like SMTP, making it easier to document and troubleshoot. IAX packets are binary (hence the bandwidth savings), and during troubleshooting must be decoded by a packet sniffer to view the packet contents.
I opted for an IAX termination-only provider named VoIPJet.com. Remember: Terminationonly means that the provider was not issuing a phone number to me, only a mechanism for me to make outbound calls using the IAX protocol, and then billing me based on usage. There was no recurring monthly fee, no minimum usage charge, and no contract or commitment.
The advantages of using this provider for my purposes included:
* Small, low-risk outlay-Prepaid time could be purchased via PayPal in increments as small as $10, which is the maximum I could lose.
* Low international long-distance rates-1.3 cents per minute to much of Europe (in my particular case, Germany), with a minimum charge of one minute. For some terminations within the U.S., the minimum connect time was as low as 6 seconds, or just over 2/10 of a cent.
* “Unlocked” support for Bring Your Own Device (BYOD), as opposed to “locked,” in which you can only use the provider’s device with their service. In this case, the provider not only allowed BYOD but also included detailed instructions on configuring Asterisk to use with the service.
* An initial free trial of 25 cents’ worth of calls (about 19 minutes of international long distance) simply for registering with the site.
* Call detail records (CDRs) available for download for all calls switched through the service.
* The ability to specify the calling number to be displayed on the receiving party’s caller ID. This is \a great feature because I configured all my calls to appear to originate from my POTS number. (However, the fact that this is so easily configurable gives one pause to consider potential abuse in less responsible hands.)
Using the instructions from the VoIPJet.com site, I configured the Asterisk dial plan to point to VoIPJet.com for all 1+ and 011+ calls. This “pointing” is done via a mechanism in Asterisk known as contexts, which allow you to configure very explicitly how and by whom a service or trunk can be used.
Now it was time to try it out…
Sounds Better, Costs Less
So, how did my analog telephone[arrow right]FXS board[arrow right] Asterisk[arrow right]the Internet via IAX[arrow right]VoIPJet call termination service work? In a word, fantastic. The voice quality during many hours of calling to Germany was indiscernible from that of a traditional domestic landline call. Seriously.
Call me cheap, but the experience was liberating, and I believe the idea of paying 78 cents per hour for international calls from the U.S. to Europe just might catch on. Domestic long distance calls also had high quality, although ironically not as consistently good as the international calls. For example, on a couple occasions I did detect a faint echo, but nothing that impeded communication (and better quality than all but the best of cell phone conversations).
The called parties didn’t have any complaints either (as long as you don’t include their grousing about my frequent and nagging queries about quality). I should mention that my broadband ISP offers a healthy dose of bandwidth-about 3 Mbps down and 384 kbps up- so the standard “your-mileage-may-vary” disclaimer applies. Still, as hard as I tried to disrupt conversations (e.g. by downloading large files while talking on the phone), I was unable to diminish the voice quality of the connection.
The catch with VoIPJet, or any other termination-only service, is that the per-minute usage fee applies to all phone calls, including those to local and toll-free call numbers. This makes sense, since all your outbound calls use their resources, and the concept of “local” is rather arbitrary when calls are riding halfway across the country and back over data networks before they’re delivered to your next-door neighbor.
Conclusion
Now, call me cheaper still-or just appreciate this as an exercise in optimization-but I saw no point in paying for local and toll- free calls, especially with that FXO and POTS line sitting there connected to the Asterisk box. A quick modification to the Asterisk dial plan and my outbound local and toll-free calls were given preference to route over the POTS line instead of the VoIPJet service. If the POTS line was not available, then the call would route over IAX.
You could extend this idea for as long as it’s worth your time, configuring multiple termination VOIP services and then manipulating the Asterisk dial plan to use least cost routing (LCR) for each number dialed. All this cost savings and controland you don’t even have to dial 9 to get an outside line.
To extend my home VOIP experiment longerterm, it made sense for me to shop for a commercial VOIP provider. In next month’s issue, I’ll discuss that experience in more detail
Companies Mentioned In This Article
Asterisk (www.asterisk.org)
Digium (www.digium.com)
PayPal (www.paypal.com)
VoipInfo (www.voip-info.org)
VoIPJet (www.voipjet.com)
Vonage (ww.vonage.com)
The called parties didn’t have any complaints either-if you don’t count their grousing at me about my frequent quality queries
All this cost savings and control-and you don’t even have to dial 9 to get an outside line
Tony Mancill is an application software engineer with VoiceGenie Technologies Inc., a provider of VoiceXML platforms and open communications solutions for customer care. He has been doing production Linux support since 1996 and has been a volunteer developer for the Debian GNU/Linux distribution since 1998. He has written articles on Linux and OpenSource and is the author of “Linux Routers, 2/e” (2002, Prentice Hall). He may be reached via email at tony@mancill.com.
Copyright Business Communications Review Oct 2005
