A codec, which stands for coder-decoder, converts an audio signal into compressed digital form for transmission and then back into an uncompressed audio signal for replay. It's the essence of VoIP.
Codecs accomplish the conversion by sampling the audio signal several thousand times per second. For instance, a G.711 codec samples the audio at 64,000 times a second. It converts each tiny sample into digitized data and compresses it for transmission. When the 64,000 samples are reassembled, the pieces of audio missing between each sample are so small that to the human ear, it sounds like one continuous second of audio signal. There are different sampling rates in VoIP depending on the codec being used:
- 64,000 times per second
- 32,000 times per second
- 8,000 times per second
A G.729A codec has a sampling rate of 8,000 times per second and is the most commonly used codec in VoIP.
Codecs use advanced algorithms to help sample, sort, compress and packetize audio data. The CS-ACELP algorithm (CS-ACELP = conjugate-structure algebraic-code-excited linear prediction) is one of the most prevalent algorithms in VoIP. CS-ACELP organizes and streamlines the available bandwidth. Annex B is an aspect of CS-ACELP that creates the transmission rule, which basically states "if no one is talking, don't send any data." The efficiency created by this rule is one of the greatest ways in which packet switching is superior to circuit switching. It's Annex B in the CS-ACELP algorithm that's responsible for that aspect of the VoIP call.
The codec works with the algorithm to convert and sort everything out, but it's not any good without knowing where to send the data. In VoIP, that task is handled by soft switches.
E.164 is the name given to the standard for the North American Numbering Plan (NANP). This is the numbering system that phone networks use to know where to route a call based on the dialed numbers. A phone number is like an address:
313 = State
555 = City
1212 = Street address
The switches use "313" to route the phone call to the area code's region. The "555" prefix sends the call to a central office, and the network routes the call using the last four digits, which are associated with a specific location. Based on that system, no matter where you're in the world, the number combination "(313) 555" always puts you in the same central office, which has a switch that knows which phone is associated with "1212."
The challenge with VoIP is that IP-based networks don't read phone numbers based on NANP. They look for IP addresses, which look like this:
IP addresses correspond to a particular device on the network like a computer, a router, a switch, a gateway or a telephone. However, IP addresses are not always static. They're assigned by a DHCP server on the network and change with each new connection. VoIP's challenge is translating NANP phone numbers to IP addresses and then finding out the current IP address of the requested number. This mapping process is handled by a central call processor running a soft switch.
The central call processor is hardware that runs a specialized database/mapping program called a soft switch. Think of the user and the phone or computer as one package -- man and machine. That package is called the endpoint. The soft switch connects endpoints.
Soft switches know:
- Where the network's endpoint is
- What phone number is associated with that endpoint
- The endpoint's current IP address
We'll talk more about soft switches and protocols on the next page.