25
INTRODUCTION TO VoIP Elastix ® Certification © 2012, PALOSANTO SOLUTIONS All rights reserved. This documentation is confidential and its intellectual property belongs to PaloSanto Solutions. Any unauthorized use, reproduction, preparation of derivative works, performance, or display of this document, or software represented by this document, without the express written permission of PaloSanto Solutions is strictly prohibited. PaloSanto Solutions, Elastix and Elastix logo design, trademarks and/or service marks belongs to Megatelcon S.A. all other trademarks, service marks, and trade names are owned by their respective companies.

Introduction to VoIP

  • Upload
    elastix

  • View
    5.462

  • Download
    2

Embed Size (px)

DESCRIPTION

Introduction to VoIP, 2nd chapter of "Unified Communications with Elastix" Vol.1 We recommend to read the chapter along with the presentation. http://elx.ec/chapter2

Citation preview

Page 1: Introduction to VoIP

INTRODUCTION TO VoIP

Elastix® Certification

© 2012, PALOSANTO SOLUTIONS All rights reserved. This documentation is confidential and its intellectual property belongs to PaloSanto Solutions. Any unauthorized use, reproduction, preparation of derivative works, performance, or display of this document, or software represented by this document, without the express written permission of PaloSanto Solutions is strictly prohibited. PaloSanto Solutions, Elastix and Elastix logo design, trademarks and/or service marks belongs to Megatelcon S.A. all other trademarks, service marks, and trade names are owned by their respective companies.

Page 2: Introduction to VoIP

Voice over IP or VoIP consists in transmitting voice

over an IP protocol.

This is a very broad concept and there are many

protocol alternatives. It is truly a protocol soup.

Voice is packetized so it can be transmitted over an IP

network.

The IP protocol was not designed specifically for

transporting voice.

What is VoIP?

Page 3: Introduction to VoIP

VoIP: a protocol soup

Page 4: Introduction to VoIP

One of the most well-known protocols Its name comes from Internet Protocol. This protocol offers a service with ”no guarantees”

and is also referred to as ”best effort”. The packets can arrive out of order, and be reordered

at the destination. Some packets can even be lost on the way. This disorder and loss of packets can affect the quality

of the voice. Despite all of this, intelligent ways have been found to

solve these problems in the best way possible.

IP Protocol

Page 5: Introduction to VoIP

It's a unique number that identifies a host connected to an IP network.

It's made up of 32 bits, or 4 octets. In practice a notation is used in which each octet is translated into decimal, and separated with a period. An example of an IP address is 130.5.5.26.

An IP address is composed in two parts: One identifies the host, and the other identifies the network to which that host belongs.

To find these parts another parameter is used, called a network mask.

IP address (1)

Page 6: Introduction to VoIP

The network mask is a 32 bit binary number that is also represented in a notation that is similar to the IP address.

It begins with ones and continues this way until it reaches a number of ones equal to the portion of the IP address that corresponds to the network.

IP address (2)

Page 7: Introduction to VoIP

Therefore, in the previous example we obtain an IP address of 130.5.5.26 with a mask of 255.255.255.0 belonging to the 130.5.5.0 network.

The previous mask was a 24 bit mask, since there were 24 ”ones”.

Once the network where the host is located is known it is easier to send the IP packets to their destination.

Routers store tables of routes or rules on how to find other networks

IP address (3)

Page 8: Introduction to VoIP

An IP packet contains all the necessary information to arrive to its destination.

It can be divided into two parts: the header and the payload.

The header contains information that allows the packet to be delivered to its destination, and the payload retrieved.

This header decreases slightly the quantity of information that can be transported since it occupies space.

The payload can be used to encapsulate other protocols like UDP or TCP.

IP Packets (1)

Page 9: Introduction to VoIP

Header of an IP packet

IP Packets (2)

Page 10: Introduction to VoIP

Routers are necessary to direct packets on its way to a destination.

Routers are devices with tables of routes.

This “table of routes” is made up of destination networks, and for each one the IP address of the router to reach them.

The router that provides a route to external networks is called a gateway.

The IP packet that arrives at the router is examined to see what network it belongs to, the proper route is chosen, and the packet it is sent there.

IP routing

Page 11: Introduction to VoIP

Transport Control Protocol

It is an IP protocol that allows packet retransmission, packet order management, and receipt acknowledgement.

To achieve this goal, TCP carries additional information that adds weight to the packet. That is why it is not recommended for real time applications like voice.

However, it can work for voice signaling.

TCP Protocol (1)

Page 12: Introduction to VoIP

TCP introduces the concept of port.

A port is an abstraction that allows us to relate flows of data with services on the network.

For example, port 80 corresponds to the Web service, or HTTP protocol.

TCP Protocol (2)

Page 13: Introduction to VoIP

UDP (User Datagram Protocol) is another transport protocol.

It divides information into packets called datagrams.

This protocol doesn't care if the data arrives with errors or if it doesn´t arrive at all. That is the main difference with TCP.

This is why it introduces little extra weight to the IP packet which makes it ideal for real-time applications like voice.

UDP Protocol

Page 14: Introduction to VoIP

As in traditional telephony, it's necessary to signalize VoIP calls.

There are some alternatives in signaling protocols, like SIP, H.323, MGCP, IAX2, and others.

The most popular protocols on Asterisk are SIP and IAX2.

Regarding SIP or H.323, many people confuse them and think that voice is transmitted through this protocol, but it is only used for signaling.

VoIP Signaling

Page 15: Introduction to VoIP

RTP means Realtime Transport Protocol.

The RTP protocol is the one that really transports encoded audio.

RTP is transported over UDP.

Using SIP, audio is transmitted over RTP after the network port between Elastix and the endpoint / telephone is negotiated.

VoIP Transport

Page 16: Introduction to VoIP

Relationship between protocols

Page 17: Introduction to VoIP

Voice is adequately encoded for transmission.

After encoding, it is transmitted over RTP.

Encoding can serve to reduce the chance of error, as well as to minimize the amount of bandwidth used.

To encode this data, an algorithm called a codec is used.

There are several different codecs, each has pros and cons.

Voice codification

Page 18: Introduction to VoIP

One of the most widely used codecs of all time.

Comes from the ITU-T standard that was released in 1972.

Comes in two types called μ-Law (or u-law, primarily used in Europe) and a-Law (used in the USA).

Advantage 1: Good voice quality since it uses 64kbit/s, that is a sampling of 8 bits at 8kHz.

Advantage 2: It is already enabled in Elastix, it's not necessary to pay for it.

Disadvantage: It uses a lot of bandwidth. It is not recommended for connections with low bandwidth.

G.711

Page 19: Introduction to VoIP

Also a very popular codec.

Licensed by Intel.

Advantage: It compresses voice very well without a significant loss of quality.

Disadvantage 1: It is licensed per voice channel, approximately USD$10 per channel.

Disadvantage 2: Voice quality is lower than than G.711

G.729

Page 20: Introduction to VoIP

It is related to the cellular telephony standard GSM (Global System for Mobile communications), hence its name.

It compresses voice very well, with a quality similar to cell phones.

It is enabled by default in Elastix.

Good as an alternative to G.729, although its audio quality is slightly inferior to G.729.

GSM

Page 21: Introduction to VoIP

The different protocols increase the total amount of data transmitted, in addition to the actual voice payload.

Headers are added for Ethernet, IP, TCP/UDP, RTP.

That makes the actual bandwidth for transmitting voice to be more than just what is required for the codec.

For example, to transmit voice using G.711, in theory we should use 64Kbps (the payload of the codec), but we are really using 95.2Kbps of BW.

In codecs with more compression, overload is even more significant (percentage-wise).

Protocol overload (1)

Page 22: Introduction to VoIP

Protocol overload (2)

Page 23: Introduction to VoIP

– Let's calculate the bandwidth for G.711

• Bytes transmitted every 20ms

– 38 + 20 + 12 + 8 + 160 = 238 bytes

• Bits transmitted every 20ms

– 238 bytes * 8 bits/byte = 1904 bits

• Bits transmitted every second

– 1904 bits/frame * 50 frames/seg. = 95,200 bits/second = 95.2Kbps!

Protocol overload (3)

Page 24: Introduction to VoIP

Table for the actual bandwidth for common codecs (using Ethernet):

* For these codecs, multiple data rates may be used.

Codec BW codec BW actual (Ethernet)

G.711 64 Kbps 95.2 Kbps

G.726* 32 Kbps 63.2 Kbps

iLBC* 15.2 Kbps 46.4 Kbps

GSM 13 Kbps 43.7 Kbps

G.729A 8 Kbps 39.2 Kbps

Comparing Codecs

Page 25: Introduction to VoIP

www.elastixbook.com

More at: