Showing posts with label voip codecs. Show all posts
Showing posts with label voip codecs. Show all posts

Tuesday, August 5, 2008

VoIP Codecs

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) 555-1212

    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:

    192.158.10.7
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




AddThis Feed Button

Disadvantages of VoIP

The current Public Switched Telephone Network is a robust and fairly bulletproof system for delivering phone calls. Phones just work, and we've all come to depend on that. On the other hand, computers, e-mail and other related devices are still kind of flaky. Let's face it -- few people really panic when their e-mail goes down for 30 minutes. It's expected from time to time. On the other hand, a half hour of no dial tone can easily send people into a panic. So what the PSTN may lack in efficiency it more than makes up for in reliability. But the network that makes up the Internet is far more complex and therefore functions within a far greater margin of error. What this all adds up to is one of the major flaws in VoIP: reliability.
  • First of all, VoIP is dependant on wall power. Your current phone runs on phantom power that is provided over the line from the central office. Even if your power goes out, your phone (unless it is a cordless) still works. With VoIP, no power means no phone. A stable power source must be created for VoIP.

  • Another consideration is that many other systems in your home may be integrated into the phone line. Digital video recorders, digital subscription TV services and home security systems all use a standard phone line to do their thing. There's currently no way to integrate these products with VoIP. The related industries are going to have to get together to make this work.

  • Emergency 911 calls also become a challenge with VoIP. As stated before, VoIP uses IP-addressed phone numbers, not NANP phone numbers. There's no way to associate a geographic location with an IP address. So if the caller can't tell the 911 operator where he is located, then there's no way to know which call center to route the emergency call to and which EMS should respond. To fix this, perhaps geographical information could somehow be integrated into the packets.
  • Because VoIP uses an Internet connection, it's susceptible to all the hiccups normally associated with home broadband services. All of these factors affect call quality:
    • Latency
    • Jitter
    • Packet loss

    Phone conversations can become distorted, garbled or lost because of transmission errors. Some kind of stability in Internet data transfer needs to be guaranteed before VoIP could truly replace traditional phones.

  • VoIP is susceptible to worms, viruses and hacking, although this is very rare and VoIP developers are working on VoIP encryption to counter this.

  • Another issue associated with VoIP is having a phone system dependant on individual PCs of varying specifications and power. A call can be affected by processor drain. Let's say you are chatting away on your softphone, and you decide to open a program that saps your processor. Quality loss will become immediately evident. In a worst case scenario, your system could crash in the middle of an important call. In VoIP, all phone calls are subject to the limitations of normal computer issues.

One of the hurdles that was overcome some time ago was the conversion of the analog audio signal your phone receives into packets of data. How it is that analog audio is turned into packets for VoIP transmission? The answer is codecs.





AddThis Feed Button