This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
122
|
Chapter 6: Replacing the Voice Circuit with VoIP
Ethernet isn’t the only data link suitable for carrying VoIP packets—ATM, frame-
relay, point-to-point circuits, and other technologies can be used, and each intro-
duces its own overhead factors.
Decoding and Playback
When a VoIP packet is received, it is decoded according to the codec employed to
encode it. It is then played back on the analog hardware of the receiving endpoint—a
speaker—while undergoing DAC, or digital-to-analog conversion. Decoding
generally takes about as much processing power as encoding, depending on the
codec employed.
Figure 6-4. An Ethernet-encapsulated 20 ms VoIP packet
Table 6-2. VoIP codec bandwidth consumption
Codec Encoded sound bandwidth Ethernet overhead bandwidth Total bandwidth
G.711 64 kbps 31.2 kbps 95.2 kbps
G.726 32 kbps 31.2 kbps 63.2 kbps
G.728 16 kbps 31.2 kbps 78.4 kbps
a
a
G.728 uses four voice frames at 16 kbps per packet. This accounts for the deviation in overhead bandwidth.
G.729A 8 kbps 31.2 kbps 39.2 kbps
GSM 13 kbps 31.2 kbps 44.2 kbps
IP
Header
IP
Payload
UDP
Header
UDP
Payload
RTP
Header
RTP
Payload
G.711
Payload
160 bits
64 bits
96 bits
1,280 bits
Ethernet
Header
Ethernet
Header
128 bits
Ethernet CRC and Bumper
176 bits
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Voice Channels
|
123
Most IP phones and ATAs support several codecs, as shown in Table 6-3. All sup-
port G.711 using both the
µlaw and Alaw scales, and a majority support G.729A,
though with variance in quality and completeness of their implementation. It’s fair to
say that G.711 and G.729A are the two most popular VoIP codecs in use today.
Things that degrade playback quality
Several factors can degrade the quality of audio transmitted over the network:
Jitter
This effect occurs when gaps between packets occur at durations greater than
the packet interval. The effect is missing or garbled speech. Jitter can be caused
by network congestion or processing overloads on the encoding or decoding
endpoints (this usually doesn’t happen on dedicated devices, only on soft-
phones). Some IP phones and softPBXs offer a jitter buffer to compensate for
packets arriving out of sequence or at odd intervals, but jitter buffers introduce
lag—and lag is bad.
G.729A and Asterisk
Digium’s implementation of the G.729A codec for Asterisk is a licensed commercial
version made by Voice Age (http://www.voiceage.com). The codec is patent-protected,
so if you want to use G.729A endpoints with the Asterisk server, you must pay for a
commercial license. Digium sells the licensed, and GPL-friendly, version of G.729A at
the price of around $10 per simultaneous call. Using unlicensed versions of G.729A
(which do exist) violates the GPL under which Asterisk is distributed, because the GPL
requires end users to adhere to local patent law, by which G.792A is governed in sev-
eral nations.
Table 6-3. Codecs supported by some leading VoIP endpoint devices
Phone / ATA G.711 G.726 G.728 GSM Speex G.729A
Cisco 7960 IP Phone Yes No No No No Yes
Avaya 4602 IP Phone Yes No No No No Yes
Grandstream Budgetone 101 IP Phone Yes Yes Yes No No Yes
Digium IAXy i100 ATA Yes Yes No No No No
Grandstream Handytone ATA Yes Yes Yes No No Yes
Cisco ATA-186 ATA Yes No No No No Yes
3com 3102 IP Phone Yes Yes No No No Yes
SNOM 220 IP Phone Yes No No Yes No Yes
X-Lite Softphone Yes No No Yes Yes No

Get Switching to VoIP 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.