|
VoIP expands into Voice Over IP here IP means Internet
Protocol used in computer networks to communicate. In
the early times of internet communication is only in text
format. Now as the technology has evolved so rapidly that we
are now able to see a video on demand online. Here in this
tutorial we are concerned about communicating over internet in
real-time voice format. By this we simply mean that two
persons are able to communicate vocally over a computer
network in real-time. This may seem easy in this era of
satellite phones where telecommunication has reached to higher
peaks. But this VoIP entirely a different thing having its own
aspects which trouble us when we really start to work on it.
Why should we really want to use VoIP ? First thing is its
free (assuming that your internet connection is already paid
for). Free in the sense that you can call any person for free, who owns
a computer & an internet connection. But if you want
to call a normal landline or mobile of BSNL or Telco you have
to pay some thing which when compared to normal phone cost is
very cheap.There are two types of phones available to do this.
One is entirely a hardware realization which is called as hard
phone. And the other one is computer hardware like sound card,
microphone & speakers in additon to the program we use
to control these thing which is called as soft-phone. Here we
are concerned about making a soft-phone
Now let us see that how we can really achieve this. As we have
already mentioned that its a communication over computer
network. We can use pre-existing protocols for this. But if we
are not satisfied with the performance preexisting frame works
of protocols we are using. We can design one for our selves.
Performance arises from the aspect that is already mentioned
as 'real-time' . which we will discuss later. Now the first thing
we need to do is, to sample the our voice using microphone
connected to our computer. In order that our sampled voice to
be a good one we have to follow the Nyquist rule here, which
says that sampling must be done at a rate greater than or
equal to twice the maximum frequency of the signal being
sampled. Observe in the following figures normal voice wave
which is continuous in nature. And the sampled data is
discrete as it is sampled at only certain time intervals. So
the smaller the interval between the two samples the better
the data will be.

Fig 1 Continuous sine wave

Fig 2 Sampled sine wave
After doing this we have to compress the audio data
for the reason that low sized data will trvel fast over
network when compared to large amount of data. We use
different compression techniques to do this. But before
making any such compressions we should keep in mind that our
program should be compatible with rest of the worlds networks.
For example in United States telephone companies use mue-law
to compress the audio data & in Europe A-law is used both are
analog compression techniques. So after compressing the so
sampled audio data, we have to send it to the another computer
which is our destination. This whole process has to be
repeated as long as call is in progress ( i mean connected &
talking to other party) Say for example you are sampling
20ms or 1second of audio data & compressing it & sending it to
other machine. Where at the receiver the reverse process has
to be done. That is the audio data received must first be
decompressed & the played back so that other party your are
talking with knows that what you have spoken here. As these
packets travel & reach the destination our aspect of real-time
comes into play. That is, there should no intolerable delay between
packets that you are sending or receiving. Why because the ear
is surprisingly sensitive to sound variations lasting only a
few milliseconds. That means any jitter of a few milliseconds
during audio data transmission will affect the perceived sound
quality.
As per the requirement of above things we have to choose such
a compression technique & a protocol for sending audio data
over network which will not waste time. When it comes to a
protocol we simply will not employ a TCP thing when a call is
going on,as TCP is a heavy protocol which employs handshakes
for acknowledgement of data being sent, it costs a lot of
time. More over from the careful observation of above things
suggests us that in VoIP we are concerned more with fastness
of the system rather than its reliability. So we can simply use a
datagram protocol like UDP which uses no acknowledgements.
These are the basic things behind making a soft-phone or
simply call it as a VoIP application. To see them practically
implemented read the next tutorial in the VoIP section of my
site. Hope this tutorial made sense.
Happy Hacking,
Godson Gera
|