VoIP basics

Translation of the original in Catalan. Read it in: CatalàCastellano

For a couple of years now talking about Voice over IP (VoIP) has become very fashionable, but often we put the cart before the horse and sometimes it is worth having a reference to turn to in order to see how all this works from the bottom up, so with this article I hope to explain a bit what is behind this magic. After this article I have another one prepared which is much more applied and specific, not so theoretical, talking more in depth about the technical aspects of VoIP.

As is already becoming usual, to write articles of this kind I take inspiration from articles written in Network Systems Design Line, specifically I have taken inspiration from Voice over IP (VoIP)--The basics (local).

When we talk about VoIP we are referring to a set of services that aim to offer a telephone service both to residential users and to companies. Besides, VoIP is used by service providers to transport calls between themselves. Furthermore, companies both small and large can use it to communicate their offices. VoIP can also be used as a substitute for or complement to conventional telephony.

Telephone operators often use VoIP services transparently for the users in order to connect calls between users. That way they can reuse their infrastructures to transport both voice and data simultaneously. The main difference between traditional telephone services and VoIP is that the former is based on circuit switching and the latter on packet switching. So when we connect two conventional voice calls, deep down what we are doing is connecting a cable from one end of the call to the other. That means having the network resources reserved for as long as the call lasts. Therefore, a very inefficient use is made of the bandwidth available in that cable/circuit which is connected permanently during the whole duration of the call. This problem is solved in packet switching since calls are multiplexed in time and the same circuit can transport more than one call simultaneously.

EFigure1.gif

At this point we are already clear that the use of packet switching networks is more efficient if the density of calls to be transported simultaneously increases. To give us an idea, transoceanic optical fibres can transport more than 100 million calls each.

Basic components of a telephone service

Basically in order to get a telephone service up and running the following 4 components are needed:

  • Signalling refers to the communication between the telephone and the telephone service. It reports that we have picked up/hung up the phone, which number we have dialled, that a call is coming in, etc.
  • Conversation the voice that is transmitted through the network.
  • Features call waiting, call forwarding, voicemail, etc.
  • Power how we send electricity to the telephone so that it works. In conventional telephone services this power is provided by the line itself.

Signalling in VoIP

Signalling refers basically to how the telephone communicates with the telephone exchange. But the intermediate network switches also have to forward these control signals until they reach the user's telephone. So we need to understand some basic types of signalling.

How does a telephone know that we want to make a call? In the following diagram we can see an outline of the process. When we pick up the telephone, the exchange sends us the dial tone. Then we dial the number we want to talk to, when that happens a series of frequencies (or pulses) are exchanged between our telephone and the exchange in order to tell it which is the telephone we want to dial. Then the exchange determines the route of the call we want to make and notifies the destination that we want to talk to it, that is, the destination telephone starts ringing.

EFigure2.gif

Notice that in these simple steps that we all take for granted there are already quite a few signalling events that have travelled along the line and we have not even started the conversation. From all this there is an important detail, the part of the telephone system that is inside our house has not changed for 20 or 30 years. So all the changes have been made in the network and completely transparently for the users.

If one of the ends of the call uses VoIP the outline could be, for example, like this:

EFigure3.gif

In this case, the telephone terminal is connected to an adapter that connects it to the internet. This adapter acts as a translator, it converts our voice into IP type packets that are sent through the internet. In this case the signalling is the same as in the previous case, but the adapter is in charge of translating the analogue signals into packets that travel over IP. Afterwards our VoIP service provider will convert these packets back into signals compatible with the conventional telephone network. So that the destination can understand the call. All this will be completely transparent for the users, who must not notice any difference.

Finally if we imagine the signalling between two VoIP calls, the outline would be like this:

EFigure4.gif

The first thing that stands out is that we no longer need the conventional telephone wiring. So the digital signalling generated by one end can travel through the IP network until it reaches the destination. So we have just turned the conventional telephone system into a completely IP data system. Where we need no other elements than the ones already known from our data networks.

How VoIP manages to transport a conversation

The human voice is made up of analogue sound waves. Traditional telephone systems transport the voice as a succession of voltage changes through a pair of wires (they are called carrier signals). When these signals reach the other end what they do is get amplified through a loudspeaker, this produces a sound very similar to the original sound. In digital telephony systems (VoIP included), we do not have a circuit dedicated to transferring the voice. The human voice is converted into a digital stream (or series of 1s and 0s) that reaches the recipient where an attempt is made to regenerate the sounds that were emitted by the sender. The analogue-to-digital conversion at the origin is called sampling, basically it consists of taking a series of measurements of the frequencies emitted by the voice at fixed time intervals. Afterwards what is done is to transport these measurements and not the frequencies emitted by the voice.

EFigure5.gif

Outline of the voice sampling processes:

EFigure6.gif

The trick for the source signal to resemble the destination one as much as possible lies in taking the maximum possible number of measurements. But bear in mind that the more measurements are taken, the more measurements will have to be sent and the faster the data line will have to be. So we have to look for a compromise between the quality of the samples taken and the space they occupy, in order to be able to send them fast enough.

To give four real figures, the lowest frequency the human voice emits is about 100Hz and the highest one 1700Hz. Between the noises and the harmonic frequencies we emit we need about 4000Hz at most for the high end. About 8000 samples are taken every second, that is, the sampling frequency is about 8KHz. These captured units of measurement are put inside the packets and are sent to the recipient where the frequencies are generated according to the data indicated by the measurements received.

Powering VoIP networks

In conventional telephone networks, as I said, the electrical power of the telephone is taken from the line, so we do not have to worry about plugging the telephone into the mains at home. That, which seems silly, allows, for example, making telephone calls when the power goes out. In a digital system that would be a serious problem because the line does not carry the power of the telephone terminal.

EFigure8.gif

Therefore, when the power goes out with a digital system we cannot make calls if the power fails. That is a big problem since in an emergency we cannot communicate. So we need to think about some alternative power system for when in an emergency we have to use the telephone or we will be left isolated.

Summing up

Essentially the way of calling has not changed for the user. But the technical processes that make up the process of making a call have changed enormously internally and technologically speaking a conventional telephony system no longer has anything to do with the new VoIP telephony systems. So what used to be a problem for telecommunications engineers is now a problem for network engineers.

2 comments

Comments from the old blog, as they were written. Comments are closed.

  1. carles

    Molt interessant i molt didàctic, he trobat que està escrit utilitzant paraules molt "planeres" que permeten que ho entengui tothom.

    només una cosa: converça --> conversa

    http://ec.grec.net/lexicx.jsp?GECART=0035372...

    Gràcies

  2. —

    [1]

    Gràcies per la correcció. Ja em sonava raro a mi, però no m'acabava de decidir. Per altre banda, m'alegro que hagi quedat en llenguatge planer perquè el següent article que tinc preparat no ho gaire de planer i volia intentar posar unes bases senzilles per tal de que el següent article fos el més comprensible possible.

    Si aquesta tarda va tot com tinc planejat escriuré el següent article on parlaré de temes molt més específics de la VoIP.