Many years ago it was discovered that sending a signal to a remote destination could be done in a digital fashion: before sending it we have to digitalize it with an ADC (analog to digital converter), transmit it, and at the end transform it again in analog format with DAC (digital to analog converter) to use it. VoIP services work in a similar fashion: by digitizing voice into data packets, sending them via an internet connection, and then converting them back into voice at their intended destination. One of the bigger advantages is that digital format can be better controlled: it can be compressed, routed, converted to a better format, and more. Also, we saw that a digital signal is more noise tolerant than an analog signal.
TCP/IP networks are made of IP packets containing a header (to control communication) and a payload to transport data. VoIP uses the header to navigate the network to its destination. The payload carries bits of the conversation.
So what are the advantages to using VoIP rather than the PSTN-Public Switched Telephone Network (the phone company)?
When you are using a PSTN line, you typically pay a line manager company for the time used. The more time you talk, the more you'll pay. In addition, you will probably not have the option of speaking with more that one person at a time. In contrast, VoIP Services allow you to talk as long as you would like with multiple people (other people may also need to be connected to the Internet) as far away as you want for free or for a fraction of the PSTN cost. You can also browse the Internet at the same time; sending images, graphs, and videos to the people you are talking with.
The Steps in VoIP communication:
- The ADC converts analog voice to digital signals (also known as bits)
- The bits are compressed into a format for transmission. There are a number of protocols, SIP being the most common for VoIP.
- The voice packets are compressed even further into data packets using a real-time protocol (typically RTP over UDP over IP).
- A signaling protocol calls the users: ITU-T H323 is the standard signaling protocol.
- Upon arrival at the destination the packets are disassembled, data is extracted, and converted analog voice signals are sent to the sound card (or phone).
All of the steps must occur in real-time to avoid waiting too long for a vocal answer! (See QoS section)
Analog to Digital Conversion
This process occurs inside computer hardware, typically an integrated card in your PC or an external telephone adaptor.
Today every sound card allows 16 bit conversion from a band of 22050 Hz (for sampling you need a freq of 44100 Hz according to the Nyquist Principle) obtaining a throughput of 2 bytes * 44100 (samples per second) = 88200 Bytes/s, 176.4 Kbytes/s for a stereo stream.
For VoIP, we needn't such a throughput (176kBytes/s) to send voice packets.
Now that we have digital data it can be converted to a standard format that can be quickly transmitted.
PCM, Pulse Code Modulation, Standard ITU-T G.711
- Voice bandwidth is 4 kHz, so sampling bandwidth has to be 8 kHz (for Nyquist).
- We represent each sample with 8 bit (having 256 possible values).
- Throughput is 8000 Hz *8 bit = 64 kbit/s, as a typical digital phone line.
In real application mu-law (North America) and a-law (Europe) variants are used which code analog signal in a logarithmic scale using 12 or 13 bits instead of 8 bits.
Quality of Service (QoS)
VoIP applications require real-time data streaming to support an interactive data voice exchange.
Unfortunately, TCP/IP cannot guarantee this kind of purpose; it just makes a "best effort" to do so. So we need to introduce tricks and policies that can manage the packet flow in EVERY router we cross. If you subscribe to one of the broadband phone company providers their technical support can help you setup your router to optimize voice transmission. Technical support can be a distinguishing factor in determining which of the VoIP providers you choose.