<A HREF="http://as.cmpnet.com/event.ng/Type=click&FlightID=61031&AdID=101791&TargetID=4307&Segments=1411,3108,3448,5402&Targets=2625,2878,4307&Values=34,46,51,63,77,81,93,100,140,203,304,309,442,646,1184,1255,1388,1405,1766,1785,1925,2172,2299,2325,2408,2678,2727,2920,3763&RawValues=&Redirect=http://www.amcc.com/MyAMCC/jsp/public/productDetail/product_detail.jsp?productID=nP3665" target="_top"><IMG SRC="http://i.cmpnet.com/ads/graphics/as5/kh/amcc/AMCC_Leaderboard_nP3665_alt_image_062206.jpg" WIDTH=728 HEIGHT=90 BORDER=0></A>

June 21, 2006

Voice over IP (VoIP)--The basics

If you've ever wondered anything about VoIP at the basic level, here's an excerpt from Chapter 2 of Internet Phone Services Simplified. The chapter, Voice Over IP, presents the very basics of what VoIP is and how it works.

Voice over IP (VoIP)
The term Voice over IP (VoIP) does not refer to a single service but encompasses an entire collection of services that can fill the phone service needs of many different residential and business customers. VoIP can be used by a service provider to optimize its capability to carry many calls. VoIP can be used by small and large businesses for their office phone systems. VoIP can also be used as a good alternative (or supplement) to the public phone system for residential phone service, which is the focus of this book.

You might already be using VoIP and not even know or realize it. Many telephone service providers are starting to use some form of VoIP (transparently to you) inside their networks because of the cost efficiencies it can afford them. Many online voice chat services, such as Xbox Live voice chat, Skype, and so on, rely on VoIP. You might find it worthwhile to spend a few minutes to understand how VoIP works. Don't worry, you don't need to know how it works to use it, but it might help to understand the advantages and limitations we discuss later. Circuit Switching and Packet Switching

The main difference between traditional phone systems and VoIP systems is circuit switching versus packet switching. The public switched telephone network (PSTN) uses circuit switching to carry your voice from your phone to the person you are calling (See Figure 2-1). This means that while you are on the phone, a connection is made end-to-end through the phone system. This requires resources (in this case, a series of wires, switches, and connections) in the phone network that are dedicated for the duration of your call. While you are using them, no one else can use them. The end-to-end circuit is reserved for your conversation.

This approach works well, but imagine the resources that are required to carry millions of calls each day coast to coast. At first, each call required a separate set of copper wires. Technology got better, and now millions of calls can be carried over fiber-optic cables (and still circuits get overloaded on Mother's Day). But even though density improved, the basic principles of circuit switching still apply today—each call consumes a channel on the wire end to end for the duration of the call.

Figure 2-1. Circuit Switching versus Packet Switching

Transoceanic fiber cables can carry more than 100 million phone calls each. Even the more ordinary fiber cables have thousands of strands but can carry 1 million+ calls.

Packet switching works differently (See Figure 2-1). Instead of having a dedicated connection end-to-end, packet switching breaks the voice conversation into pieces, transmits the pieces, and then reassembles the pieces at the other side back into the voice conversation. You might be asking yourself: How does that save anything? Well, if you remember in circuit switching, you are consuming a dedicated resource end-to-end. But in packet switching, many people can share that same resource at the same time.

In the example shown in Figure 2-1, the word Hello spoken by the caller is broken into five packets, one per letter sound, and transmitted across the network with millions of other packets from other phone conversations. The receiving switch or phone knows how to reassemble these five packets into the sounds spoken by the caller, and the word Hello is played out the handset speaker.

Note Alas, we are intentionally oversimplifying again. In reality, it takes about 50 packets to transmit each second of speech. But we had a hard time finding a word in the dictionary with 50 letters that could be spoken within one second for use in our example.

The important difference to understand is that during a traditional phone call, you are using a dedicated circuit for the duration of your call. Transmission is constant. In packet switching, the pieces of the conversation find their own way through the network and are re-assembled on the other end, which allows many more conversation to take place than in curcuit switching. So, lots of other folks can use the same circuit at the same time you are.

How VoIP Works
Now that you understand a fundamental difference in the way VoIP compares to the PSTN, we look in more detail at how VoIP works. Any phone service has the following four primary components:

  • Signaling--Refers to the communications between your handset and the phone service, for example, how the system recognizes you want to make a call, how it receives the number you want to call, and so on.
  • Conversation--Sometimes referred to as the "bearer" component. This is the actual voice conversation being transmitted and received across the network.
  • Features--Phone services offer many features including call waiting, call forwarding, voice mail, and so on.
  • Power--How the handset in your home receives electric power for it to operate.
VoIP Signaling
Signaling refers to how a central office switch in the phone network communicates between itself and your phone, or to other switches in the network. You need to understand a few important signals.

First, how does the phone network know you want to place a call? As Figure 2-2 illustrates, when you lift the handset in your house, this signals the phone network that you want to make a call. You might not realize it, but when you lift the handset, the first thing the central office does is send you a dial tone sound. Then you happily dial your numbers, which is the next step in signaling. After you have dialed, the phone network sends and receives a flurry of digital messages across the rest of the phone system to determine how to route your call. The destination central office then notifies the person you are calling by ringing his handset.

Figure 2-2. PSTN-to-PSTN Call (No VoIP)

If the person you called answers, a conversation path is set up between you and the person you called for the duration of the call. When one of you hangs up, the central office is signaled to disconnect the call. Again, after some magic digital messages inside the phone network, the call is disconnected. An important thing to understand is that in the case of a call between two traditional phones on the PSTN, the part inside your house works pretty much the same way (analog) that it worked 20 or 30 years ago.

We now look at how this changes if the caller is using a broadband phone service (that is, VoIP) and calls the same person with a PSTN phone service, as shown (See Figure 2-3).

Figure 2-3. VoIP-to-PSTN Call

In this case, a terminal adapter now connects the handset in your house to your broadband Internet connection. The terminal adapter acts as a translator, converting the handset signals into VoIP signals (in other words, it takes the analog voice and converts it to a digital signal). For example, when you lift the handset, instead of the central office recognizing that your phone is off hook, the terminal adapter translates it to a message sent to the broadband phone provider that you want to place a call.

From that point, the signaling is similar to the PSTN example previously described, except at each step, the terminal adapter is translating your phone handset actions into digital messages that are being sent over your broadband Internet connection to the broadband phone service provider's softswitch. The softswitch takes care of routing your call, just like the central office would. Notice that in this case, the call is still routed through the PSTN to the person you are calling. This is done by a gateway between the broadband phone service and the PSTN. To you, it's totally transparent.

Note Softswitch refers to a central office switch, except instead of having a bunch of phone lines connected to it, it only receives digital messages. The "soft" part refers to the fact that it's a telephone switch without hard wires connected to it. While a central office needs to be in fairly close proximity to you, a softswitch could be thousands of miles away--anywhere the messages can reach it. Think of a softswitch as a fast computer that understands how to route telephone calls.

Finally, we take a look at how this changes if both the caller and the called party are using broadband phone services (not necessarily even the same one), as shown in Figure 2-4.

Figure 2-4. VoIP-to-VoIP Call (No PSTN)

In this case, a terminal adapter now connects both handsets to their broadband Internet connections. The caller goes off hook and dials the destination number. The softswitch that serves the caller routes the call to the softswitch that serves the called number. The destination terminal adapter gets a digital message for the incoming call and converts it to ring the handset.

When the called person picks up the phone, again a flurry of digital messages are exchanged between terminal adapters and softswitches on both ends, and voil', the call is connected.

Another important function to understand about the terminal adapter is that it converts your voice conversation into packets that can be sent over the Internet. The next section discusses how this is possible.

How VoIP Carries a Conversation
Human speech is made up of analog sound waves, which can be transmitted using straightforward techniques. A phone on the PSTN can represent your voice as a continuous stream of voltage changes on a copper wire (this is referred to as a carrier signal). When the carrier signal reaches the other end (the receiving phone), the electric signals excite a diaphragm (more commonly known as a speaker), which produces a good approximation, or "analogy," of your voice. For digital telephony (including VoIP), a dedicated circuit does not transmit the voice, so human speech must be converted to a digital stream (or a series of 1s and 0s) by the transmitter and then re-created on the receiving end. Analog-to-digital conversion is accomplished by sampling, which is the process of taking many instantaneous measurements of an analog signal.

If you were to look at human speech on a meter, it would look something like what Figure 2-5 illustrates.

Figure 2-5. Analog Waveform of Human Speech

To convert this waveform into a digital signal, the waveform is measured thousands of times per second. For every voltage level (which is what you are measuring), a corresponding combination of 1s and 0s exists, and that combination is sent across the digital network. This process of measuring and converting is called sampling. On the receiving end, the combination of 1s and 0s is read and the corresponding voltage is re-created.

If enough samples are taken, the original analog signal can be nearly exactly replicated by "connecting the dots" of the instantaneous measurements re-created on the receiving end (see Figure 2-6).

Figure 2-6. Packetizing Voice

The trick for "near exact" replication of the original signal is to take the right amount of samples, because too few samples can result in multiple waveforms that could possibly connect the dots (and remember, we are trying to exactly match the waveform). Too many samples can provide fantastic sound quality, but it can also require too much data transmission to be cost effective. The right amount turns out to be twice the rate of the highest frequency in the waveform. For the sake of simplicity, consider a pure tone of 1000 Hz. Figure 2-7 illustrates what the tone would look like on a meter.

Figure 2-7. Waveform of a Pure, 1000-Hz Tone

Hertz (Hz) is also referred to as cycles per second, and in this case, the pattern or cycle on the scope would repeat 1000 times per second. This signal can be nearly perfectly replicated going from analog (the tone) to digital and then back to analog by measuring the signal 2000 times per second. This rate (the rate required for good replication) is called the Nyquist rate, named after the clever fellow who figured it out.

Human speech is a jumble of many different tones, ranging from very low (bass) sounds of 100 Hz up to treble sounds of about 1700 Hz and higher. With harmonics and other "noises," speech includes tones of up to about 4000 Hz. Therefore, to replicate all the sounds, speech is usually sampled at about 8000 times per second.

What did they say? OK, sampling is a bit complicated. Think of it like this. If you wanted to paint a picture of a flower, you would probably look at the flower, paint a little, look at the flower again, paint a little, and so on until you completed the painting. Speech sampling is similar. The VoIP phone "looks at" your voice about 8000 times per second while it is preparing the information to transmit to the other phone about what sounds you are making.

After enough samples are taken, the data (in the form of bytes) is shoved into a packet and sent on its way to the other phone (see Figure 2-6). When the packet reaches the other phone, the sampled data re-creates the original waveform, which excites a diaphragm, which moves a speaker, producing your grandma's voice from the old country telling you about this year's bumper beet crop.

VoIP Features
With your traditional phone service, you have no doubt become accustomed to a bunch of features such as call waiting, call forwarding, caller ID, and so on. How do these change with a broadband phone service?

Simple—they don't. You still get the features you are used to as well as a few new cool ones that we talk about in the next chapter. The features work similarly to those you have become used to with the PSTN.

Power in VoIP Networks
You might be asking yourself why you need to know where a broadband phone gets its electric power. It's an important issue to understand.

With the public telephone system, your phone receives its power from the central office switch (See Figure 2-8). This means that even when your home has no power, your phone still does, as long as the central office itself has power. The same set of wires that carry your voice conversation also send power to your handset.

Figure 2-8. Where Does My Phone Get Its Power From?

In the case of a broadband phone service, electric powering is different. The broadband connection between your house and your broadband provider does not provide power, only a data communication path. In this case, the terminal adapter itself provides the power to your handset. Terminal adapters are plugged into the electric outlet in your house; therefore, if your house loses electricity, so does the terminal adapter, and more importantly, so does the handset.

Chapter 4, "Knowing Your Limits," covers some of the limitations with broadband phone services, such as loss of electricity, in more depth.

Many people routinely ditch their trusty old telephone handsets for new-fangled cordless phones. Interestingly enough, these phones require electricity in your house to power the base. This is why when you lose electricity, your cordless phone typically does not work. Most people haven't really thought about it, but if you are concerned, you should always keep one traditional handset plugged into a telephone use VoIP).

Putting It All Together
We've just looked at how broadband phone service works in comparison to traditional telephone service. As you can see, a lot of similarities and a few important distinctions exist. In general, how you use your handset to place and receive calls does not change. Even the handsets you now have in your home can still be used.

What does change is how your call is handled inside the network and how your voice is carried. Other than that, the providers have done a great job of integrating into the public telephone system to make it nearly painless to consumers. So that is what you need to know about the network and the technology for both the traditional phone network and the VoIP network. With this knowledge, we can now discuss the advantages and limitations of broadband phone services.

About the Authors
Jim Doherty is the director of marketing and programs with Symbol Technologies' industry solutions group. Before Symbol, Jim worked at Cisco Systems, where he led various marketing campaigns for IP telephony and routing switching solutions. Jim holds a B.S. degree in electrical engineering from N.C. State University and an M.B.A. from Duke University.

Neil Anderson is a senior manager in enterprise systems engineering at Cisco Systems and is currently responsible for enterprise wide-area networking, branch-office network, and teleworking systems architectures. Neil holds a bachelor's degree in computer science.

To contact either author, please email: reviews@ciscopress.com and use Internet Phone Services Simplified/post question as the subject line.

Title: Internet Phone Services Simplified
ISBN: 1-58720-162-3 Authors: Jim Doherty, Neil Anderson
Chapter 2: Voice Over IP (VoIP)
Published by Cisco Press

Reproduced from the book Internet Phone Service Simplified. CopyrightęŁ [2006], Cisco Systems, Inc. Reproduced by permission of Pearson Education, Inc., 800 East 96th Street, Indianapolis, IN 46240. Written permission from Pearson Education, Inc. is required for all other uses.

*Visit Cisco Press for a detailed description and to learn how to purchase this title.

Come back soon for other recently published book excerpts.

<A HREF="http://as.cmpnet.com/event.ng/Type=click&FlightID=61026&AdID=101786&TargetID=4311&Segments=1411,3108,3448,5403&Targets=2625,2878,4311&Values=34,46,51,63,77,81,93,100,140,204,304,309,442,646,1184,1255,1388,1405,1766,1785,1925,2172,2299,2325,2408,2678,2727,2920,3763&RawValues=&Redirect=http://www.amcc.com/MyAMCC/jsp/public/productDetail/product_detail.jsp?productID=nP3665" target="_top"><IMG SRC="http://i.cmpnet.com/ads/graphics/as5/kh/amcc/AMCC_Leaderboard_nP3665_alt_image_062206.jpg" WIDTH=728 HEIGHT=90 BORDER=0></A>