Chapter 1. Broadband VoIP Services
Hacks 1–7: Introduction
Voice over IP (or VoIP for short) is a technology that allows Internet Protocol (IP) networks like the Internet to be used to enable voice communication, similar in some ways to a telephone. Some folks call VoIP IP telephony—and the technology comes in many forms, from desktop communication software to automated message recording and fax integration tools.
But in its simplest form, IP telephony enables you to place phone calls over the Internet rather than over a traditional phone line. This is a pretty big deal, since no long-distance charges or hefty federal access taxes are levied on Internet-based phone calls. Plus, IP telephony lets you integrate your desktop PC, your desk phone, and your cell phone in ways never before imagined. I’m anxious to share the details with you in this book.
In the tradition of O’Reilly’s Hacks book series, you’ll be using short hacks, like the basic ones in this chapter, to learn about Voice over IP and computer-based telephony. I, and a number of my peers in the telecommunications industry, have contributed some of the most useful, most educational, and coolest projects to VoIP Hacks. Hopefully, beginning right here in this chapter, you’ll be saying, “I didn’t know you could do that with VoIP!”
VoIP-Based Phone Service Providers
The Golden Age of broadband began with catchphrases like “surf the Web five times faster” and with promises of ultra-fast music downloads. But in the late 1990s, few would have predicted that VoIP-based telephony would be one of the biggest beneficiaries of once-hyped broadband technologies like cable Internet and DSL. Sure, web surfing at “the speed of light” and downloading music are great—but can they save you money? Legally?
VoIP telephony can—and does. For roughly half the cost of a traditional phone line, you can subscribe to a VoIP telephony service provider rather than to a phone company. You’ll get a standard phone number that people from the non-VoIP world can use to call you—and you won’t have to pay $5 a month extra for voicemail and caller ID.
This chapter has a handful of hacks that will show you how to maximize your broadband voice service. So, if you subscribe to a VoIP service provider, you’re ready to hack. If not, what are you waiting for? “Get Connected” [Hack #1] describes some VoIP-based phone providers that you should evaluate as you prepare to dive into VoIP Hacks.
Get Connected
If you’ve got broadband, you’re already using the Internet for data communication. Wouldn’t it be great to use it for telephone calls, too?
Internet telephony service providers (TSPs) get your voice onto the Net, allow you to make and receive phone calls just like traditional phone companies, and tend to shrink your phone bill to boot. Some of these service providers give you a basic, free service that enables you to call other users over the Internet. Others allow you to make toll-free calls free of charge, but charge for local and long-distance calls.
TSPs that allow you to call traditional telephone service subscribers do so by connecting your standard home phone to the Net. Some TSPs also let you use a special piece of software called a softphone to place calls with your PC. To get connected to a TSP, you need a broadband Internet router configured as a DHCP server, a spare Ethernet port either on your router or on a nearby switch, and a good old-fashioned analog telephone.
TSPs are data centers with telephony servers that route calls to and from your home network or broadband VoIP device. The real-time packets that carry each call’s sound over your broadband link use IP and User Datagram Protocol (UDP) protocols, and the TSP communicates key moments in the call—like dialing, connecting, and hanging up—using signaling protocols that are similar in some ways to the ones your browser uses to surf the Web.
The VoIP device that most TSPs provide to connect your home phone is known as an analog telephone adapter, or ATA. These little boxes allow you to connect a residential-style analog phone to your broadband Internet connection, and they are normally supplied by your VoIP TSP when you sign up for their service.
In addition to an ATA, some TSPs permit you to place VoIP calls using the following:
- An IP phone
These telephones connect directly to an Ethernet network using a patch cable or wireless link. They have an IP address as a PC would, and they communicate with the VoIP TSP’s data center over your Internet broadband link.
- A softphone
These are software programs that run on a PC and permit telephone-style communication using your broadband link. They appear on your Windows, Linux, or Mac desktop with graphical user interfaces that often resemble a telephone, and they require that your PC have a microphone and speakers.
For this hack, I’ll concentrate on connecting to a TSP that provides an ATA, allowing you to use an analog phone to place and receive calls via the Internet. Table 1-1 lists domestic (U.S. and Canada) TSPs that provide broadband VoIP calling.
“Bring your own device” means the TSP allows you to make phone calls across its VoIP network using your choice of equipment, such as an IP phone, a PC, or your own ATA. TSPs that don’t allow you to bring your own device will provide an ATA to make the connection.
Company |
Web site |
Bring your own device |
AT&T CallVantage |
No | |
BroadVoice |
Yes | |
Broadvox Direct |
No | |
Net2Phone |
No | |
nikotel |
No | |
Packet8 |
No | |
SOYO |
No | |
VoicePulse |
Yes | |
Vonage |
No |
Once you’ve subscribed to a VoIP TSP service (many allow you to subscribe on the Web) and you’ve received your ATA in the mail, you’ll probably be itching to hook it up and use it. Most of the time, setting up an ATA is straightforward. All ATAs have an Ethernet interface, for connecting to your network via an eight-wire CAT5 patch cable with two RJ45 connectors, and one analog telephone interface, for connecting to a residential-style, single-line phone using a four-wire patch cable with two RJ11 connectors. 8x8 Inc.’s DTA-310, standard equipment for Packet8 service, is such a device. So is the Sipura SPA-2000 [Hack #62] , pictured in Figure 1-1.
But other ATAs might offer additional capabilities. For instance, the Sipura SPA-2000, standard equipment for VoicePulse service, offers an extra analog phone connector, so you can easily connect two phones, or perhaps a phone and an answering machine. As shown in Figure 1-1, the SPA-200’s front panel has two phone connectors and a status LED, which indicates whether one of the analog phones is off the hook. The rear panel has an Ethernet connector, an Ethernet activity/link indicator LED, and a DC power connector.
More elaborate ATA devices integrate broadband routing and firewall functions, allowing you to consolidate your VoIP ATA and residential firewall into a single unit. The Zoom 5567 is one of these. It has a broadband IP router with a firewall, a four-port switch, an analog phone connector, and a pass-through connector for placing calls on a traditional Bell phone line in the event the Internet service fails.
So, depending on your service, setup could be a little more elaborate than just connecting the phone and the Ethernet to your ATA. However, in most cases, the ATA is a simple, no-frills device designed to accomplish one thing—get your analog phone connected to the world’s biggest VoIP carrier network, the trusty ol’ Internet.
After you’ve gotten the ATA out of the package, find a good place for it. It should be close to where you intend to use the analog phone, though a long-enough phone cord would afford you more distance.(In “Wire Your House Phones for VoIP” [Hack #3] , you’ll see how to use your house’s existing phone wiring to hook up several phones to a single ATA.) Your ATA also needs to be close enough to your Ethernet switch or broadband router to connect to it with a CAT5 patch cable.
Once connected, most ATAs will automatically register with your VoIP service provider’s server the first time they are powered up. Don’t interrupt this process. If the initial registration is interrupted, it could render your ATA useless, and the TSP might need to exchange it for a new one. Some ATAs will download firmware patches during the initial registration, too. Refer to your ATA’s instructions for indications on when this process is complete, making it safe to power off the ATA. Usually, if you can hear a dial tone on the connected phone, the process is complete and it’s safe to place a call or power down the ATA.
If you can’t hear a dial tone on the connected phone, check that it is connected to the appropriate port on the ATA. Make sure your broadband router is configured as a DHCP server. Without DHCP running on your network, the ATA will be unable to obtain an IP address, crippling it.
Tip
Many VoIP calling plans require that you dial the full 11-digit phone number, even if you’re just calling your next-door neighbor. So, if you make a lot of local calls, get used to dialing your own area code a lot!
Once you hear a dial tone, it’s probably best to investigate any features that are included with your calling plan—voicemail especially. Then, try calling a buddy to see if you can hear any difference between a traditional call and a VoIP one. Chances are that the person on the other end won’t notice the difference unless you tell him you’re on a VoIP call. Then, he might say he suspected you were on a cell phone. The sound quality on a VoIP call is only as good as the network carrying it, and many unsuspecting participants mistake VoIP calls for cell phone calls.
Use Pure VoIP Dialing with Your TSP
By using dialing shortcuts, you can keep your phone calls on the Internet and avoid extra charges.
If you’re able to make a phone call to a regular phone company subscriber using your new VoIP service [Hack #1] , you’re ready to learn some cool TSP tricks.
Your VoIP phone bill is probably lower than that of your friends who still use traditional calling plans. But a lower phone bill isn’t the only luxury that comes with converting your service to VoIP. Because your call uses the Internet rather than the public telephone network to route your call, you have access to several cool dialing shortcuts when you call subscribers of other VoIP services. When an IP network alone provides the pathway between caller and receiver, it’s said to be pure (or native) Voice over IP.
This can actually save you money, especially if you make a lot of international calls. If you’re a Free World Dialup (FWD) subscriber and you talk frequently with your buddy in Mexico, who uses Vonage, using dialing shortcuts will keep your calls pure VoIP and allow you to circumvent any related long-distance calling charges that would be assessed if your calls were to traverse the Public Switched Telephone Network (PSTN).
To make pure VoIP calls using your TSP’s service, you have to be aware of the dialing shortcuts your TSP provides to route calls to other TSP networks using the Internet—instead of the PSTN—as the carrier network. Most VoIP TSPs will assume your call is destined for the PSTN—just because it’s an 11-digit phone number. So these shortcuts tell the TSP that you don’t want to route your call to the PSTN. Instead, you want to route it over the Internet to another VoIP TSP.
Why do this? If you have an unlimited calling plan, it won’t really save you any money. The call probably won’t sound any better either. But this technique does conserve your TSP’s public telephone network capacity when you use pure VoIP rather than VoIP-to-PSTN calling. If your VoIP TSP bills you by the minute, it might not charge for calls that don’t use its PSTN capacity. Plus, it’s just cool to let the Internet replace the Bell System for your phone calls. Here’s how.
VoIP services such as FWD, Vonage, IAXTel, VoicePulse, and Packet8 offer dialing shortcuts to allow calls between their customers. If you’re a Packet8 subscriber, you can reach any FWD subscriber by dialing 0451 and the six-digit FWD number assigned to that subscriber (FWD subscribers don’t have traditional 11-digit phone numbers because the service doesn’t provide PSTN calling).Consult Table 1-2 for a rundown of the VoIP dialing shortcuts that you can use to route calls between the various VoIP services.
Desired action |
Dialing shortcut |
Call an IAXTel user from FWD |
*-1-700 and the seven-digit IAXTel number |
Call a Vonage user from FWD |
**-2431 and the full 11-digit Vonage PSTN number |
Call an FWD user from Vonage |
0110393 and the six-digit or five-digit FWD number |
Call an FWD user from Packet8 |
0451 and the six-digit FWD number or five-digit FWD number |
Call a Packet8 user from FWD |
**898-1 and the full 11-digit Packet8 PSTN number |
Call a VoicePulse user from FWD |
1-700-900-0000 and the full 11-digit VoicePulse PSTN number |
Call an IAXTel user from VoicePulse |
1-700 and the seven-digit IAXTel number |
Call an FWD user from VoicePulse |
1-700-9 and the six-digit FWD number, or 1-700-99 and the five-digit FWD number |
Wire Your House Phones for VoIP
You can use your home phone wiring to connect all your home phones to your VoIP service.
If you’re happy with your VoIP service, you might want to consider replacing your existing land-line telephone service with that of your new VoIP TSP. This means you must provide a dial tone to all of your analog phones using the ATA instead of a connection from the phone company. Your problem is that most ATAs have only a single analog phone connector, limiting you to just one phone. Radio Shack sells two-wire phone splitters that you can use to connect two analog phones to the same jack—such as the one on your ATA—but this isn’t an ideal solution. Who wants telephone patch cables snaking across the floor, anyway?
Warning
Emergency 911 service is required on all VoIP lines sold in the U. S. But since VoIP TSPs handle emergency call routing differently than the old Bell system, it’s best to check with your TSP to determine how they handle 911 calls. This way, you’ll know what to expect should you need to dial 911.
Fortunately, you already have all the wiring you need throughout your house to share a single VoIP provider’s service with multiple analog phones. The phone wiring in most homes is a two-wire or four-wire cable that runs from the telephone company’s point of entry, called the demarc, to various rooms in the house. In these rooms, a standard modular phone jack provides a place to connect a phone using an RJ11-equipped telephone patch cable. Modular jacks can support up to two phone lines, since analog residential telephony requires only two wires per line. The vast majority of telephone company subscribers use only a single phone line, though.
The analog wiring in the home provides a single-loop parallel circuit, which means that you can piggyback modular jacks off each other. If you need to connect a phone in a new room, you just locate the nearest modular jack and run the wiring to it, instead of running the wiring from the new room all the way to the demarc. In the same way, you can connect the ATA to any modular jack in the house, and all of the analog phones connected to the other jacks will be able to use the service provided through the ATA.
Before you do this, however, it’s very important to disconnect the wires from the phone company at the demarc, because the electric current supplied over the phone-company lines could damage the ATA. It’s best to find the demarc while your phone company service is active—that way, you can hear the dial tone disappear when you’ve disconnected the right pair of wires at the demarc. Find your demarc, usually a gray or brown box mounted on the exterior of the building. Inside the box is a cross-connect terminal with screw taps. On one side of the terminal are the wires going into the building. On the other side are the wires from the phone company.
Carefully disconnect the wires from the phone company; the dial tone on the modular jacks inside the building should disappear.(You can take a cordless phone with you to the demarc to listen while you’re working.) Even if your phone company lines are dead—that is, you have no phone company service—it’s still a good idea to disconnect them. Disconnecting the wires from the phone company side of the demarc will prevent electrical damage to your ATA in the event the phone company turns the lines back on by mistake.
Warning
Don’t accidentally disconnect your DSL line! If you have DSL Internet access from the phone company, you might not be able to disconnect your phone company voice service without inadvertently severing the DSL connection, too. Sometimes DSL runs on the same pair of wires as a traditional analog phone service. If you have DSL, it must be on a separate pair of wires from your voice phone line, or this hack won’t work, and you will have disconnected your Internet service to boot! Cable Internet subscribers can hack without this worry.
If you’re attempting this hack in an apartment, it might be a little tougher. Your lease agreement might prohibit you from making wiring changes like this. In some jurisdictions, the phone company itself or building codes might prohibit this type of wiring hack. If you’re not sure, call the phone company and ask that a lineman come out to disconnect the wiring.
Once disconnected from the demarc, mark the pair of wires with a tag that reads, “Phone company: Do not reconnect.” This will prevent a well-meaning phone company service technician from reconnecting your line and frying your ATA.
Assuming your phone company disconnect was successful, you can now connect the ATA into any RJ11 modular jack on the premises. This will let you hear the dial tone generated by the ATA and make VoIP calls through any phones that are connected to the other modular jacks throughout your home.
Most ATAs are designed to handle the power requirements of only a phone or two, so check with the manufacturer of your ATA to see if you can reliably connect more. I have two analog phones and two cordless phones (which receive their power separately, anyway) connected to an 8x8 DTA-310, and I don’t experience any problems.
Use a Softphone with a VoIP TSP
Get started with prevalent and freely available SIP softphones.
Depending upon which TSP you choose for your broadband VoIP service, your service agreement might limit you to using only analog phones connected to an ATA. However, if you have a lenient Bring Your Own Device (BYOD) service agreement, your TSP will allow you to use your choice of IP telephony access devices. This might mean you can use an IP phone, a PC softphone, an ATA of your choosing, or even your own telephony server (Chapter 4 is dedicated to this proposition) with the TSP’s service. This hack will show you how to use Counterpath’s X-Lite softphone with your TSP. But first, a little background on telephone networks, both analog and VoIP.
When you subscribe to broadband VoIP service, what you’re really doing is buying a single pathway through the TSP’s network. Likewise, when you subscribe to traditional phone service, you’re really just leasing a telephone line. With that line, you can use cordless phones, corded analog phones, answering machines, fax machines, modems, and all kinds of other access devices. These different analog devices all use the same electrical access signaling to communicate with the phone company. You could think of this analog protocol as even more primitive than the Morse code. It’s simple, but it’s what allows analog phone devices to place and receive calls.
If legacy telephony devices are more primitive than the Morse code, Session Initiation Protocol (SIP), the predominant VoIP access signaling protocol, is light-years ahead of both. SIP is a suite of media-signaling software specs that define how streaming media devices (and applications) should interact.
The most significant of modern streaming media apps is IP telephony, of course, which brings me to my point.
Unlike old-fashioned telephone signaling, which is Plug and Play (PnP), using a softphone is a bit more involved. To understand how a softphone works (or an ATA or IP phone, for that matter), you must have a simple grasp of SIP. Although SIP is a sprawling specification with dozens of proposed spinoffs and major revisions, you need to know only a few things to get by with a SIP softphone.
SIP is a lot like Simple Mail Transfer Protocol (SMTP). If you’re comfortable with that, SIP will make a lot of sense to you. Like SMTP, SIP clients (the phones) send packet messages to SIP servers (such as proxies and telephone systems) or to other SIP clients (such as other SIP phones). In these packet messages are headers, strings of data that form requests for specific functionality from the device on the receiving end. The requests could be to establish a phone call, or merely to let a SIP server know that the phone making the request is available to receive calls. Another function of these requests is authentication. On many systems—like your broadband TSP’s VoIP network—the calling device must register and pass a username/password authentication to place or receive calls.
Different TSPs, Different Policies
SIP softphones, such as CounterPath’s X-Lite, have many, many built-in features. They can signal call transfers, place callers on hold, and even do conference calling so that three or more parties can talk together. But whether these features are enabled by your TSP is another issue. To conference-call, for example, you might need to pay for an extra “line.” Bear in mind that from one VoIP service provider to the next, even a feature-heavy softphone product could be impotent (and then there are those TSPs, such as Packet8, that don’t support softphones at all).
Install the Softphone
To get X-Lite, download it from http://www.counterpath.com/. X-Lite is, in fact, a scaled-down freeware version of X-PRO, but for the purposes of this hack, the feature disparity between versions makes no difference. Installation is straightforward. On Windows, run the installer package, and on the Mac, drag the X-Lite program icon into your Applications folder. Once installed, launch X-Lite, step through its Audio Tuning Wizard, and look at its user interface. By some strange coincidence, it resembles a nice-looking business phone. Imagine that.
Setting up the basics.
After you’ve gotten through X-Lite’s Audio Tuning Wizard, you’re ready to dive into the SIP configuration settings. These define how the softphone will authenticate and interact with your TSP’s SIP server. To access X-Lite’s configuration settings, click the button to the right of the CLEAR button on X-Lite’s main window, as shown in Figure 1-2.
When the configuration window appears, double-click System Settings, and then double-click Network This to bring up the network configurations (Figure 1-3). Find the Provider DNS Address setting and change its value to the DNS server provided by your VoIP TSP (not your Internet Service Provider, or ISP). Your VoIP TSP might require the use of its own DNS because its SIP resources might be on a private domain that cannot be resolved through the public DNS system. If your VoIP TSP didn’t provide a DNS address, you can leave this setting blank.
Click the Back button in the lower-left corner of the screen to get back to the prior window. Here, you’ll need to double-click SIP Proxy to open the SIP Proxy Settings window. Double-click Default, and you’ll be able to configure the softphone to use a SIP proxy server, which is located at your VoIP TSP and routes your softphone’s calls. The X-Lite softphone can use more than one SIP proxy, but in most situations, you’ll need to use only one. This list describes the settings you will need to configure:
- Display Name
Your name, or as much of it as you can fit.
- User Name
The SIP username provided by your TSP. This is likely to be your phone number, including the area code.
- Authorization User
This is normally the same as the SIP username provided by your TSP, though some TSPs might issue a distinct authorization username. In circumstances where multiple phones with their own phone numbers are authorized for the same subscriber, the two usernames might vary.
- Password
The password you and your TSP established when you set up your VoIP account.
- Domain/Realm
This tends to be the domain name associated with your SIP user URI, which is similar to an email address. For 4403281414@sip.broadvoice.com, your domain/realm would be sip.broadvoice.com. Your TSP will issue you an appropriate realm name if it supports the use of softphones.
- SIP Proxy
This is the address of the proxy server that will handle all your VoIP registration activity—things like authentication and notifying the server that you’re available to receive calls. Unlike a SIP URI, which always contains sip in the domain, the SIP proxy address can be any valid host-name. Again, your TSP will provide you the address to use when you sign up.
- Outbound Proxy
This address is used to handle SIP requests that are bound for other SIP domains. Since most VoIP TSPs don’t support calling other realms using SIP, and generally only support calls to and from the public telephone network, an outbound proxy isn’t necessary. But BroadVoice, for one, requires that you configure an outbound proxy address—and in its case, it’s the same address as that used for the SIP proxy setting.
- Use Outbound Proxy
This setting tells X-Lite whether you want to treat all SIP requests as though they are destined for another realm. This effectively circumvents the SIP proxy for any activity other than registration, though if the two proxies have the same address, as in BroadVoice’s configuration, it doesn’t matter what this setting is set to. The choices are Always and Never, in case you were wondering.
- Register
This setting tells X-Lite whether you want the SIP client to authenticate and register with the SIP proxy server. It’s very uncommon not to register, and you won’t get very far with your VoIP service if you don’t. So definitely set this one to Always.
For most TSPs, you can leave the rest of the settings unchanged. For a more detailed description of X-Lite’s settings, you can download a PDF user manual from CounterPath’s web site, http://www.counterpath.com/.
Make the Call
When the X-Lite phone has successfully registered with the TSP’s proxy, its main window will display a message like “Logged In—Enter a Phone Number.” Now, you should be able to type in a valid public telephone network number (try your cell phone for an easy test, if you have one). The service should function at least as well as it would via an ATA and analog phone, with one possible exception—echo. Echo is common with softphones if you’re using your PC speakers to listen to the person on the other end of the call. If you experience echo when you speak, use a pair of headphones to cancel the acoustic feedback loop.
Prioritize Packets to Improve Quality
Voice traffic competes for available bandwidth on your broadband connection. If there is not enough bandwidth, packets get dropped.
VoIP media streams require a constant, uninterrupted data flow. This data flow is composed of UDP packets that each carry between 10 and 30 milliseconds of sound information. Ideally, each packet in a media stream is evenly spaced and of the same size. In a perfect world, a packet never arrives out of sequence or gets dropped. Voice over IP media packets are framed in a highly precise, performance-sensitive way, described in more detail in Switching to VoIP (O’Reilly). Dropped packets and packet jitter (packets arriving out of order) cause problems—big problems—for an ongoing call. These problems can cause the voices on the call to sound robotic, to cut in and out, or to go silent altogether.
Most of the packet-drop problems you’ll encounter while VoIPing will be the fault of your bandwidth-limited ISP connection—the link from the ISP’s network to your broadband router. If you’re downloading songs to your iPod, surfing the O’Reilly Network, and patching your World of Warcraft client all at once, you won’t have enough bandwidth left over to support a VoIP call, but there’s a way to curb all those applications’ thirst for bandwidth so that you can still VoIP successfully. Read on.
To maximize call quality, the network connection carrying VoIP media packets must be as reliable and consistent as possible. The data link to the ISP should treat all voice media traffic with high priority. That is, a VoIP packet gets handled first, as it is more important than another packet—say, for your BitTorrent upload. If the data link is swamped and is out of capacity to carry any more data, less important packets are discarded before more important ones. The net result—for high-priority services like voice—is better Quality of Service, or QoS. Several standards exist to ensure that QoS can occur in a broadband VoIP setup, chief among them: Type of Service (ToS) and 802.1p.
If your broadband router is relatively new, it might support these standards—so enabling packet prioritization is just a matter of flipping some configuration switches.
Prioritize Packets on a Linksys Broadband Router
ToS is a feature of Ethernet switches that permits packets tagged as high priority to be handled first, maximizing their QoS. 802.1p is a similar concept, but tends to hang around on routers, not switches. The Linksys BEFSR81 broadband router is a device that supports 802.1p. It sells for less than $100 USD online, and you can probably find one secondhand on eBay for even less.
In fact, setting up priorities on this router is a snap, thanks to Linksys’s usual snazzy web-based interface. Once you get the router unboxed and hooked up, use the web interface to locate the QoS screen. (You’ll see it after you click on the Advanced Configuration button and the QoS tab.)
The QoS screen contains two sections: one that allows you to establish queuing priorities for packets depending on their TCP/UDP port numbers, and one that allows you to alter the queuing priority depending upon which Ethernet switch port the traffic originated from. That is, since this router has a built-in switch, you can prioritize some of its eight Ethernet ports using the lower half of the QoS screen.
Prioritize RTP traffic.
Most VoIP media streams are carried by Real-time Transport Protocol (RTP) packets. To raise the priority of RTP traffic, enter the port numbers 5004 and 5005, each on its own line, in the section labeled "Application-based QoS,” and click on the High Priority radio button for each. After restarting the router, all RTP traffic sent from the router will be handled before any other traffic. This technique is especially good if your LAN has multiple VoIP devices that send media streams through the router.
Prioritize all the traffic from your VoIP ATA.
If you have only a single VoIP device to support, like a TSP-provided ATA, it might be best if you tell the router to prioritize traffic by Ethernet port instead of by application, as in the preceding paragraph. Specifically, you want your router to prioritize traffic that comes from the Ethernet port where your ATA is connected. To do so, use the High Priority and Low Priority radio buttons for the numbered Ethernet ports. Set them up however you want and reset the router.
Prioritize all the traffic from an attached Ethernet switch.
By setting the priority of a particular Ethernet port, you are telling the router to prioritize anything from the device connected on this port, even if this device is another switch. So, an easy way to give priority to all your dedicated VoIP devices, like IP phones and ATAs, is to connect them all to the same switch and then connect that switch to a high-priority Ethernet port on the router.
Prioritize Traffic on a Standalone Switch
Many workgroup Ethernet switches offer QoS features that used to be found only on advanced “managed” switches. These days, inexpensive switches like the NETGEAR GS605 provide support for ToS and 802.1p. By placing such a switch between your broadband router and your VoIP device, with voice traffic prioritized, you can ensure that outbound voice streams get sent to your broadband router before anything else.
What Happens When VoIP Passes Your Router
Unfortunately, no matter how well prioritized and orderly your VoIP media traffic is when it’s forwarded by your broadband router, it still might get slowed down, ripped up, and otherwise tattered as it makes its way across the Internet. The same is true of media packets that come from the Internet to your router—the packets carrying the voice of the person speaking to you. Since you’re receiving—not transmitting—those packets, you can’t really prioritize them. That’s the responsibility of the routers that carried the packet to your router—and many routers on the Net these days are ignorant of QoS.
In short, you can control traffic sent from your network, but not traffic sent from other networks to yours. At first blush, this sounds like a threat to broadband VoIP, but over the last few years, many have discovered that the outbound traffic is all you really need to prioritize to have success with a broadband TSP. This is because most broadband ISPs limit the amount of outbound bandwidth available to each customer to discourage customers from hosting high-traffic services on their residential broadband connections.
So, there’s less available bandwidth to you for sending than for receiving. The VoIP media stream most likely to suffer as a result is the outbound stream, the one carrying your voice to the person on the other end of the call. As such, it’s appropriate to prioritize outbound traffic to overcome the limits many ISPs force on outbound bandwidth.
Got 911?
For a multitude of technical and political reasons, Internet TSPs have been slow to make reliable Emergency 911 dispatch dialing available for their customers. Here’s how to know if you’ve got it.
If you recently signed up for VoIP telephone service, the likelihood of you having 911 service is low, but some TSPs do offer it. The fastest way to find out if your TSP offers it is to contact them and ask. Vonage, for instance, supports 911 call routing to most public safety jurisdictions, but you’ve got to activate this “feature” first. Here’s a snippet from Vonage’s end-user agreement:
You acknowledge and understand that 911 dialing does not function unless you have successfully activated the 911dialing (sic) feature by following the instructions from the “Dial 911” link on your dashboard, and until such later date, that such activation has been confirmed to you through a confirming email. You acknowledge and understand that you cannot dial 911 from this line unless and until you have received a confirming email. |
2.5 Failure to Designate the Correct Physical Address When Activating 911 Dialing |
Failure to provide the current and correct physical address and location of your Vonage equipment by following the instructions from the “Dial 911” link on your dashboard will result in any 911 communication you may make being routed to the incorrect local emergency service provider. |
This is a heavy-handed contract item, but what it means is that you have to use Vonage’s prescribed, email-based activation routine to use its 911 call routing. Of course, I’m not a lawyer, and I can’t provide an attorney’s interpretation of this agreement, so contact Vonage if you’re unsure about it. Other providers might handle 911 call routing similarly, so make sure you ask before you sign up if 911 is a highly important feature.
The best way to deal with this intimidating contract is to know firsthand whether your TSP has you set up for 911 calling, or be ready for an emergency in case it doesn’t. That’s what you’re about to do.
The Problems with VoIP Emergency Dialing
With a traditional phone line, the power for the line and phone comes from a central power source at the phone company’s exchange switch. This means that even during isolated power outages, you can still make and receive calls—including 911 calls. With VoIP, your electric company and in-house electrical circuits provide the power. If a circuit blows or the electrical supply fails, you won’t be able to make any calls.
This would also be the case if your Internet connectivity failed or experienced a VoIP-prohibitive traffic jam. You wouldn’t be able to make calls, or you might not be able to hear or be heard. Neither would be acceptable in an emergency calling situation, yet broadband VoIP TSPs can’t prescribe a solution to this problem. This is because the TSP doesn’t control the traffic between your VoIP device, your ISP, and the rest of the Net that provides the data transport between your VoIP device and the TSP. Unfortunately, there aren’t many solutions to these issues.
Hack a Compromise Solution
In the event of an emergency, you’re going to want to know you can pick up the phone and reach help quickly. You can do a few things to ensure this.
Keep a Plain Old Telephone Service (POTS) line for 911 calls.
By keeping a traditional phone line hooked up, you ensure that you can reach 911 using “the old phone,” and you provide a line that your VoIP ATA might be able to use for 911 dialing. Many VoIP ATAs and VoIP-integrated broadband routers, such as the Zoom X5V and V3 routers, allow you to connect a standard POTS line that 911 calls can be routed to in case of an emergency. Check with your VoIP TSP to see if it supports this kind of connection.
Program your VoIP device with speed dial to mimic 911.
If you absolutely can’t keep a POTS line around (or you prefer not to bear the expense of one merely for 911 dialing), you might be able to get your VoIP equipment to somewhat mimic the real thing:
Program speed-dial buttons or key combinations on your IP phone or softphone that will auto-dial the local fire department or dispatch center via its regular, non-911 number. You should be able to obtain the local 10-digit phone number for the emergency dispatcher by contacting the administrative office of your local fire department. Ask them to give you the phone number of the line where 911 calls are answered. If you get lucky, the person you ask will know what VoIP is and will understand why you’re asking, but don’t count on it.
If that’s a dead end, you can program speed-dial buttons or key combinations (maybe even 9-1-1 itself) into your IP phone or softphone as a shortcut for calling a trusted neighbor or family member. This isn’t exactly emergency dispatching, but it’s better than nothing.
Use a cell phone for 911.
Like a POTS line, a cell phone can often be used effectively to reach the 911 dispatcher, but check with your cell phone carrier to make sure 911 service is available and reliable in your service area. Just because wireless 911 service has been mandated by the Federal Communications Commission doesn’t mean it works everywhere, so check with your carrier to be sure.
Use a good old-fashioned permanent marker.
If all else fails, using a felt-tip permanent marker, write the full 10-digit phone number of the local public safety dispatcher on every phone in your house that uses your VoIP service. Don’t write it on tape or sticky labels adhered to the phone, because they will eventually peel off, and you never know when you’ll need that important phone number.
Update Your VoIP ATA Firmware
An ATA with up-to-date firmware will have fewer problems.
“Yesterday, I made phone calls through my VoIP TSP all day long! But today, I don’t even hear a dial tone when I pick up the phone!” grumbled the frustrated consumer, regretting having replaced his local telephone service with a slickly advertised VoIP service from a California company called Ownage. This was the third or fourth time his VoIP service had quit working. So he grabbed his cell phone and frantically called the Support Department at Ownage.
The tech who answered wasn’t especially helpful. She listened to the customer describe his recurring problem and then told him the same thing Support had been telling him ever since the first time the dial tone disappeared: “Sir, can you reboot your analog telephony adapter by removing the power cord and then plugging the power cord back in again after a few seconds? That should take care of the problem.”
“But I do that every time. Ma’am, I bought this VoIP Hacks book that taught me how to wire my ATA into my home phone wiring so that I could replace my local phone service with Voice over IP, and now I’m very frustrated because every few weeks, I pick up the phone and the dial tone is gone. I have to run downstairs and reboot my ATA before I can place any calls, and I’m a little frustrated,” the exasperated customer said. “Why is this happening?”
“Well, it’s actually quite simple. The ATA receives an IP address from your DHCP server, which runs on your broadband router,” she explained. “And your broadband router receives an address from your Internet provider’s DHCP server. That IP address can change sometimes, when your DHCP lease expires, breaking the UDP socket that connects your ATA with our network here at Ownage.”
“In English, please?” the customer said.
“Well, the problem occurs because your ISP assigns you a dynamic address that periodically changes,” the support tech explained. “When it changes, the ATA loses communication with our VoIP server.”
“So, it’s my ISP’s problem?”
“No, not exactly. Most ISPs use dynamic addresses for residential broadband customers to prevent them from, say, hosting their own servers. So, they have their reasons for using dynamic addresses, and there’s little we can do about it,” she told him.
“Then what do I do to stop it from happening again?” the customer asked.
“I’m glad you asked,” she replied. “You can download the latest firmware patch for our ATA, which should make the ATA automatically reregister with our server whenever it loses communication. That would be the best thing to do.”
“Is there anything else I can do?”
“If you’d like to hack a solution, you could build a system that can perform a regular, timed reboot of your ATA. Or you could cron a shell script that dials into a Dataprobe AutoPAL—this is a really cool device that lets you remotely reboot things—or you could….”
But he cut her off. “OK, I think I’ll just download the firmware patch. Can I get it from your web site?” he asked.
“Of course. Is there anything else I can do for you today?”
“I don’t think so,” he said.
“Thanks for calling Ownage, sir. Have a good day,” she said, and they both hung up. Satisfied, the customer picked up a pen and jotted down the entire conversation in the hopes of someday publishing it in a book about VoIP.
Tip
You can find out more about the Dataprobe AutoPAL at http://www.dataprobe.com/power/auto_pal.html.
The Hack
Updating ATA firmware is a great way to stay on top of known performance issues—and it might allow you to take advantage of new telephony features introduced by your TSP. Most telephony hardware vendors tend to make their systems more stable with each release, so understanding your TSP’s prescribed method for installing firmware patches onto your ATA is important. I’ve chosen Packet8 for this example. Refer to your specific TSP’s support site for details on its update procedures.
Get the firmware update.
Packet8, for one, offers a Windows executable that you can download from its web site (http://web.packet8.net/download). This tool will automatically identify your Packet8-provided DTA-310 ATA, download the patch, and install it. If you prefer not to use the tool, you can install the patch using the Packet8 ATA’s web interface. Instead of downloading the executable installer tool, just download the firmware file. Save it and remember the path where you saved it.
Locate your ATA.
Next, if you don’t know your ATA’s IP address, use Packet8’s IP-address identification service to find out what it is. This will be helpful if you’ve forgotten it, or if your ATA is configured to get its IP address via DHCP. Simply pick up your phone and dial 0120003. This will play back a recorded greeting that includes your ATA’s IP address.
Next, go to that address with your web browser, using a URL like this: http://10.1.1.200, replacing 10.1.1.200
with your ATA’s actual address.
When the ATA welcome page appears, click the Upgrade Firmware link. Click the Browse button to locate the firmware image file you downloaded earlier. Then, click Start Firmware Upgrade. After your ATA has rebooted, the update will be finished.
Get VoIP Hacks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.