EENG3010 -- VoIP

VoIP

VoIP is not the name of a standard. It is the name of a family of technologies and protocols. VoIP is also called Internet Telephony -- which is a misnomer. VoIP can be over intranets -- ie. private data lines. Speaking of private lines, you should know what a T1 line is.

When you use nothing but VoIP for your phone calls, you may still use regular analog phones. Use an ATA (Analog Telephone Adaptor) for that purpose. (A Cisco ATA with also a PC port costs up to $160.)

VoIP is especially beneficial in corporate world. If you have a company WAN, you might ask the question why not use the data network for phone calls. You may establish a WAN between different offices either through a VPN (Virual Private Network) over the Internet or through a true private line (ie. leased line). Many leased line plans offer unlimited bandwidth. In that case, you just pay for a VoIP gateway but do not have any incremental cost for phone calls between offices. Especially when the offices are in different countries, it really pays to have VoIP. In that case you do not only save when you place calls between your offices. Let's say you are in Istanbul office and your other office is in London. If you are calling an arbitrary number in London from Istanbul, you may enter the PSTN in your London office and turn your international call into a local phone call.

Traditional phone networks (ie. PSTN or also called circuit-switched network) dedicate a line between the caller and the callee. That line is unused by other traffic until the call is terminated whether the two parties are speaking or not. Packetization of voice allowed multiple calls to use the same line in a TDM fashion. Hence, there was packetization in PSTN even before VoIP was introduced. However, VoIP offers flexibility in routing of packets since IP is a very mature technology and also unifies voice and data networks. Telecom service providers use VoIP in their core networks w/o you noticing it. What I mean is, you may be calling a regular analog phone from a regular analog phone, and your voice may be turned into VoIP by Turk Telekom for example.

VoIP does not necessarily mean lower quality calls (ie. low quality sound). What makes VoIP low quality is when excessive compression is used, when little bandwidth is used, when too much latency (ie. delay) is introduced, when Internet is used to route the VoIP packets. When very little or no lossy compression is used, when the right bandwidth is used (ie. no dropped packets), when no excessive latency is introduced, when private networks are used, VoIP can be much higher quality than PSTN.

As mentioned above one of the key factors in a successful VoIP implementation is latency. Latency plays a key role in interactive applications over WAN and Internet. In web browsing, it is not critical. However, in terminal sessions, it is critical. However, in a terminal session we can afford a latency of maybe close to a second if we are only typing. If we are running a Remote Desktop and clicking the mouse very frequently, then the tolerable latency is small and similar to a VoIP phone call. If there is too much latency (more than 200-300ms), then the coinversation gets out of synchronization. What that means is, you assume that the other party heard what you said and even responded to it. However, the other person's response is to what you previously said because he/she did not yet hear what you said last.

There are two parts to a call, whether it is VoIP or not: 1. Call Establishment 2. Sending (ie. streaming) of speech audio.

As for sending speech audio, speech codecs are different from broadcast codecs (such as MP3) because of the issues of latency and audio characteristics of speech. Speech codecs (or voice codecs) are also called vocoder. Out of the popular speech codecs G.711, G.729, G.723.1 are worth a mention. These are all ITU standards. G.711 is a sort of lossless (depends on how you look at it) coding technique at 64kbps. It samples voice 8k times a second at 8b per sample. 8k samples per sec. implies we preserve frequencies up to 4kHz. Remember the best voice content is between 3-4kHz because we hear that range the best. G.729 is a high quality compressor. G.723.1 is lower quality and hence lower bandwidth.

One thing key to speech compression is silence suppression. However, a simple-minded suppression of silence becomes a nuisance for the callers. During dead-silent periods caused by silence suppression, they think the line is disconnected. To remedy this situation, smart VoIP equipment inserts white noise during silence-suppressed intervals.

Latency is most often larger in VoIP networks compared to PSTN. Echo gets more noticeable to a human as latency gets longer. There is always echo even in PSTN because the same wire is used to send and receive voice. Your voice reaches the other end and hits the other part's phone like a wall and reflects back. To alleviate the situation the operator companies use echo cancellation equipment. The equipment needs to be more sophisticated (ie. cancel echo in a longer interval) when latency is longer. Hence, VoIP networks need more sophisticated echo cancellation equipment and rely on this equipment more than PSTN networks. However, even in the case of VoIP the echo cancellation equipment is tuned to cancel only so much delay of an echo. If the echo gets delayed further, the equipment/software may not do the job. For ex. when you use Skype, echo cancellation works fine most of the time, but when the other caller switches to a desk microphone and speakers from a headset, echo starts. Also in PSTN, you would usually notice echo in international calls but hardly ever in nationwide calls. That is because latency is longer in international calls.

Another quality loss in VoIP comes from packet loss. Packet Loss Concealment algorithms in VoIP systems can compensate up to a loss of 20-30ms of talk at a given time and up to 20% of the total conversation.

To minimize latency and packet loss and hence to have the right voice quality, service providers use QoS schemes and MPLS networks. Since latency is important, TCP protocol is not used to transport VoIP packets. UDP is the protocol of choice. Because of the QoS (and exact timing) needs of VoIP, RTP/RTCP protocols are used within UDP. RTP is a streaming protocol and uitilizes timestamps instead of simple packet sequence numbers. VoIP systems use a jitter buffer to hide the irregular arrival times of the packet from the network and thus manage to feed the callers with a constant rate stream of voice.

Another issue we talked in class is, how to make modem and fax connections when calls routed thru VoIP. If the service provider (or your VoIP gateway equipment) uses heavy compression as in G.729 and G.723.1, then fax and modem connections would frequently fail. One solution for the service provider is to use special numbers for such equipment or detect such calls and route them using modem and fax over IP protocols.

In this lecture we also talked about the early telephone exchanges (also called central office -- santral in Turkish), then pulse dial (in rotary phones) versus tone dial (touch-tone).

Reading materials:
    See the class notes.
    My PPT presentation in class.
    Buzzwords you need to know: POTS, PBX.
    History of Telephone.
   
Skype: A free but solid VoIP implementation that works well over the Internet -- from the makers of peer-to-peer sw Kazaa.
    Argela: A Turkish high-tech start-up. Maker of wireless telephone network switching software and systems.