Monday, August 21, 2006

What is VoIP

What is it? VoIP,
abbreviation for Voice over Internet Protocol, allows you to make telephone calls using a computer network, over a data network like the Internet. VoIP converts the voice signal from your telephone into a digital signal that travels over the internet then converts it back at the other end so you can speak to anyone with a regular phone number. When placing a VoIP call using a phone with an adapter, you'll hear a dial tone and dial just as you always have. VoIP may also allow you to make a call directly from a computer using a conventional telephone or a microphone.
How does it work?

What is it? VoIP,
abbreviation for Voice over Internet Protocol, allows you to make telephone calls using a computer network, over a data network like the Internet. VoIP converts the voice signal from your telephone into a digital signal that travels over the internet then converts it back at the other end so you can speak to anyone with a regular phone number. When placing a VoIP call using a phone with an adapter, you'll hear a dial tone and dial just as you always have. VoIP may also allow you to make a call directly from a computer using a conventional telephone or a microphone.


How does it work?
Many years ago we discovered that sending a signal to a remote destination could have be done also 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 works like that, digitalizing voice in data packets, sending them and reconverting them in voice at destination. Digital format can be better controlled: we can compress it, route it, convert it to a new better format, and so on; also we saw that digital signal is more noise tolerant than the analog one TCP/IP networks are made of IP packets containing a header (to control communication) and a payload to transport data: VoIP use it to go across the network and come to destination.

What are the advantages using VoIP rather PSTN?
When you are using PSTN line, you typically pay for time used to a PSTN line manager company: more time you stay at phone and more you'll pay. In addition you couldn't talk with other that one person at a time. In opposite with VoIP mechanism you can talk all the time with every person you want (the needed is that other person is also connected to Internet at the same time), as far as you want (money independent) and, in addition, you can talk with many people at the same time. If you're still not persuaded you can consider that, at the same time, you can exchange data with people are you talking with, sending images, graphs and videos. Overview on a VoIP connection.To setup a VoIP communication we need: 1. First the ADC to convert analog voice to digital signals (bits). 2. Now the bits have to be compressed in a good format for transmission: there is a number of protocols we'll see after. 3. Here we have to insert our voice packets in data packets using a real-time protocol (typically RTP over UDP over IP) 4. We need a signaling protocol to call users: ITU-T H323 does that. 5. At RX we have to disassemble packets, extract datas, then convert them to analog voice signals and send them to sound card (or phone)Analog to Digital Conversion.Today every sound card allows you convert with 16 bit a band of 22050 Hz (for sampling it you need a freq of 44100 Hz for Nyquist Principle) obtaining a throughput of 2 bytes * 44100 (samples per second) = 88200 Bytes/s, 176.4 kBytes/s for stereo stream. For VoIP we needn't such a throughput (176kBytes/s) to send voice packet: next we'll see other coding used for it. Compression Algorithms.Now that we have digital data we may convert it to a standard format that could 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 a logarithmic scale using 12 or 13 bits instead of 8 bits (see Standard ITU-T G.711). ADPCM, Adaptive differential PCM, Standard ITU-T G.726 It converts only the difference between the actual and the previous voice packet requiring 32 kbps (see Standard ITU-T G.726). LD-CELP, Standard ITU-T G.728 CS-ACELP, Standard ITU-T G.729 and G.729a MP-MLQ, Standard ITU-T G.723.1, 6.3kbps, Truespeech ACELP, Standard ITU-T G.723.1, 5.3kbps, Truespeech LPC-10, able to reach 2.5 kbps!! This last protocols are the most important cause can guarantee a very low minimal band using source coding; also G.723.1 codecs have a very high MOS (Mean Opinion Score, used to measure voice fidelity) but attention to elaboration performance required by them, up to 26 MIPS!Real Time Transport Protocol. RTPVoIP data packets live in RTP (Real-Time Transport Protocol) packets which are inside UDP-IP packets. Firstly, VoIP doesn't use TCP because it is too heavy for real time applications, so instead a UDP (datagram) is used. Secondly, UDP has no control over the order in which packets arrive at the destination or how long it takes them to get there (datagram concept). Both of these are very important to overall voice quality (how well you can understand what the other person is saying) and conversation quality (how easy it is to carry out a conversation). RTP solves the problem enabling the receiver to put the packets back into the correct order and not wait too long for packets that have either lost their way or are taking too long to arrive (we don't need every single voice packet, but we need a continuous flow of many of them and ordered).H323 Signaling ProtocolH323 protocol is used, for example, by Microsoft Netmeeting to make VoIP calls. This protocol allow a variety of elements talking each other: 1. Terminals, clients that initialize VoIP connection. Although terminals could talk together without anyone else, we need some additional elements for a scalable vision. 2. Gatekeepers, that essentially operate: - address translation service, to use names instead IP addresses - admission control, to allow or deny some hosts or some users - bandwidth management 3. Gateways, points of reference for conversion TCP/IP - PSTN. 4. Multipoint Control Units (MCUs) to provide conference. 5. Proxies Server also are used. h323 allows not only VoIP but also video and data communications. Concerning VoIP, h 323 can carry audio codecs G.711, G.722, G.723, G.728 and G.729 while for video it supports h261 and h263.

No comments: