42
© Kenega Training Ltd Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys Kenega Training Ltd, Havant, Hants http://www.kenega.co.uk 02392 454623

Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

  • Upload
    dara

  • View
    14

  • Download
    3

Embed Size (px)

DESCRIPTION

Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys Kenega Training Ltd, Havant, Hants http://www.kenega.co.uk 02392 454623. Objectives:. Describe voice telephony in a circuit switched network (e.g Public Switched Telephone Network (PSTN) - PowerPoint PPT Presentation

Citation preview

Page 1: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Understanding Voice over IP

by

Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

Kenega Training Ltd, Havant, Hants

http://www.kenega.co.uk

02392 454623

Page 2: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Objectives:

Describe voice telephony in a circuit switched network (e.g Public Switched Telephone Network (PSTN)

Describe requirements on bandwidth and delay in the PSTN Describe suitability of Data Networks for transporting voiceDiscuss main VoIP signalling and transport protocols – SIP,

H323 and RTPDescribe packetisation, codecs and bandwidth requirements

for VoIPPresent some typical VoIP deployments

Page 3: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Analogue Connection to a Local Exchange Switch

PSTN(circuit switched digital voice – 64 kbps per call)

Copper loop – typically uses loop start signalling for voice

Copper loop can be analogue or digital (BRI)Copper loop mainly analogue for xDSL technologiesLE switch filters analogue voice and digitises using PCMAnalogue voice carried across digital network in 64 kbps channel

Page 4: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Corporate Telephony using a Digital PBX

PBX PBX

PSTN

Signalling between user and network (Q931)

Signalling within the network (SS7)

Signalling sets up PCM bandwidth for conversation (64 kbps) – in a TDM timeslot

Switch A Switch B

Signalling between user and network (Q931)

PCM is analagous to G711 codec in VoIP

Page 5: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Connection between User and Network

PRI using CCS

0 1 234 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2223 24 25 26 27 28 29 3031

G.704 Frame Structure – 32 x 64 kbps timeslots

Q 931 MessageFCS Addressing/Control 7E7E

Signalling Timeslot carries Q921 Frames

Time slots 1 – 15 and 17 – 31 are bearer channelsTime slot 16 carries byte samples of packetised voice signalling

Page 6: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

E164 Addresses

XXX00 0 XXXX XXXXXXX

International Call Request

National Call Request

Country Code

National Destination

Code

Subscriber Number

E164 telephone numbers are network layer addressesNetwork addresses have hierarchical structure

Page 7: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Signalling Protocol Stacks

Application

Presentation

Session

Transport

Network

Datalink

Physical

7 Layer OSI Model

MTP 3

MTP 2

MTP 1

TUP / ISUP

Part of SS7 Protocol Stack

SS7 signalling is already packetised in PSTNSS7 signalling can be backhauled into a Data Network

Page 8: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Performance of the Voice Network

ITU G.114 emphasises the need to consider delayOne way end-to-end delay no more than 150 mSPost-dial delay less than 2 seconds

PSTN

Page 9: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice over the PSTN - pros

Service GuaranteesLow DelayLow JitterUses Admission Control Call only accepted if sufficient resources exist in network

Each call receives a dedicated bandwidth

Page 10: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice over the PSTN - Cons

High bandwidth requirement due to legacy standardsEach call requires 64kbps of bandwidth – from PCMNew Codecs utilise only 8k Inefficient usage of bandwidthBandwidth wasted during gaps in the conversation

Page 11: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

The Internet Protocol (IP)

Source Host

Host to Host

Internet

Process

Network Access

Destination Host

Host to Host

Internet

Process

Network Access

Internetwork

payload IPHeader

IP datagram routed through connectionless, unreliable internetwork using destination IP address in IP header

Page 12: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Network Access

Headers within TCP/IP

Host to Host

Internet

Process

TCP/IP Stack

ApplicationData

ProcessHeader

TCP or UDPHeader

IPHeader

Network AccessLayer Header

FCS

e.g. FTP

TFTP

TELNET

or

VOICE

PROTOCOLS

e.g. PPP

Frame Relay

Ethernet

Page 13: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Transport (Host to Host) Protocols

Transmission Control Protocol (TCP) Ports numbers point to software application End to end reliability Connection oriented

Stream Control Transmission Protocol (SCTP) Alternative to TCP for backhauling multiple signalling messages

User Datagram Protocol (UDP) Port numbers point to software application Used to carry voice media packets Connectionless Unreliable

Page 14: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice over Data Networks - Pros Packet Switched not Circuit Switched

Packet switching has greater resilience

Call Bandwidth Flexibility Reduced bandwidth per call when using more efficient coding

scheme Bandwidth can be increased on a needs basis

Efficient bandwidth utilisation Available bandwidth can be shared amongst various traffic types

Page 15: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice over Data Networks - ConsNo Service Guarantees (no per call state)

Packets may be queued by Routers Packets may follow different paths

Unpredictable Quality of Service Traffic is sent ‘best-effort’ by default

No admission control Connectionless (Unless controlled by another protocol)

Page 16: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Data

Voice

IP

Voice & Data Convergence

Convergence of voice and data networksReduce rising communications costsReal-time voice over IP

Page 17: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Standards Organisations in VoIP

H.323 VoIP Solution - International Telecommunications Union (ITU)

SIP VoIP Solution - Internet Engineering Task Force (IETF)Soft Switching VoIP Solution – ITU and IETFOther Organisations involved:

Internet Architecture Board (IAB) Internet Corporation for Assigned Names & Numbers (ICANN) SIGTRAN Soft Switch Consortium (SSC) Forums (SIP, H.323, etc)

Page 18: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Analogue Equipment can be used in VoIP

Analogue telephones connect via Foreign Exchange Subscriber (FXS) interface.

FXS interface provides dial tone, battery current and ring voltage to the analogue telephone.

FXS can be an Analogue Telephone Adapter (ATA) or a voice card in a router or server.

Analogue trunk lines can be connected via a Foreign Exchange Office (FXO) interface.

FXO receives POTS from a switch in the Local Exchange and provides on-hook/off-hook indication to switch.

FXO is typically a voice card in a router or server.

Page 19: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Gateway

Packet SwitchedCircuit Switched

Gateway

To communicate to a PSTN user, a gateway is requiredProvides an interface between:

circuit switched telephone networks (PSTN and GSM) and packet switched IP data networks.

Page 20: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice Conversion Internet or

Private IP Network

PABX(Gateway)

Analogue (or Digital)

PacketsIP

PCM samples are delayed, optionally compressed, and carried across the IP network in IP packets

Page 21: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Three Styles of Call

Phone to phonePhone to PC /PC to PhonePC to PC

Page 22: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice Coding

CompressionMethod

Bit Rate(kbps)

Frame Size(mS)

YearFinalised

G.711 (PCM) 64 0.125 1972

G.726 (ADPCM) 40,32,24,16 0.125 1988

G.728 (LD-CELP) 16 0.625 1992

G.729 (CS-ACELP) 8 10 1995

G.723.1 (MP-MLQ) (ACELP)

6.35.3

3030

1995

Bit rate for voice call is determined by codec usedG711 codec is mandatory – others are optional

Page 23: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Real-time Transport Protocol (RTP)

RTP V2 is defined in IETF RFC 1889, along with a profile for carrying audio and video over RTP in RFC 1890

RTP carries voice or video Does not offer any form of reliability or a protocol-defined

flow/congestion controlSequences and Timestamps packets for proper replay Indicates codec used in RTP headerPort 5004 (UDP) registered by IETF – but voice software

can negotiate dynamic port

Page 24: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Payload Formats

PTI ENCODING MEDIA CLOCK (Hz)

0 PCM (µ-Law) Audio 8000

3 GSM Audio 8000

8 PCM (A-Law) Audio 8000

9 G.722 Audio 8000

15 G.728 Audio 8000

18 G.729 Audio 8000

31 H.261 Video 90000

34 H.263 Video 90000

101 NTE dtmf tones n/a

96 – 127 (dyn) GSM-HR Audio 8000

96 – 127 (dyn) GSM-EFR Audio 8000

Page 25: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Mean Opinion Score (MOS)

CompressionMethod

Bit Rate(kbps)

Frame Size(mS)

MOS

G.711 (PCM) 64 0.125 4.1

G.726 (ADPCM) 40,32,24,16 0.125 3.85

G.728 (LD-CELP) 16 0.625 3.61

G.729 (CS-ACELP) 8 10 3.92

G.723.1 (MP-MLQ) (ACELP)

6.35.3

3030

3.93.65

Page 26: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice Media Packet using G.711 Codec

G711 codec is mandatory in VoIP implementations IP packet size around 200 bytes

Voice Payload RTPHeader

UDPHeader

IPHeader

e.g. G.711 (20mS delay) = 160 bytes

Page 27: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Voice Media Packet using G.729/G.723.1 Codec

Compresses voice payload to reduce bandwidth for callAdditional processing degrades quality and adds delayG.729 used by Main vendors such as Cisco and Nortel IP packet size around 60 bytes

VoicePayload

RTPHeader

UDPHeader

IPHeader

e.g. G.729 (20mS delay) = 20 bytes

G.723 (30mS delay) = 24 bytes

Page 28: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

IP Bandwidth Requirements for a Voice Call

CodecBit Rate(kbps)

Delay(mS)

IP Bandwidth

G.711 (PCM) 64 0 2.6 Mbps

G.711(PCM) 64 10 96 kbps

G.711(PCM) 64 20 80 kbps

G.711 (PCM) 64 30 74 kbps

G.729 ( 8 20 24 kbps

Layer 2 overhead needs to be accounted for alsocf 64 kbps for voice call over PSTN

Page 29: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

The H.323 Protocol Stack

IP

TCP or UDP UDP

RTP

CompressedAudioAudio

Control

RTCP

Control

RAS

CapabilitiesExchange

H.245

CallSignalling

H.225

Deployed extensively in corporate environmentGatekeeper offers admission control and bandwidth managementOriginally designed for LAN – poor scalabilityUses well known signalling port 1720 (TCP or UDP)

Page 30: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

The SIP Protocol Stack

IP

UDP (or TCP) UDP

RTP

CompressedAudioAudio

Control

RTCP

CapabilitiesExchange

SDP (SIP)

CallSignalling

SIP

Similar to HTTP and SMTP – text based protocolHighly scalable – utilises DNSClassic client/server Internet ModelUses well known signalling port 5060 (UDP)

Page 31: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

SIP Components

• SIP components• User Agent Client (UAC) — Makes calls

• User Agent Server (UAS) — Answers or rejects calls

• SIP servers (several types) — Locate called parties

• Proxy server

• Redirect server

• Registrar/Location server

• Addressing and naming• sip:[email protected] (requires DNS lookup)

• sip:[email protected]

• Either can be placed directly on a Web page

• Two kinds of SIP messages• Requests (from client)

• Responses (from server)

Page 32: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

[email protected] [email protected]

SIP Proxy Server Example

DNS lookup

INVITE [email protected]

[email protected]

200 OK

INVITE [email protected]

200 OK ACK [email protected] ACK [email protected]

SIPSERV IP address

DNS

SIP Registrar (Location) Server

Called PCSIP proxy Server

Calling PC

[email protected] wants to call [email protected] but he has gone to Eurotech for the day

Register

Page 33: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

Call Connection with MGCP

Notify

CreateConnectionCreateConnectionModifyConnection

IP Network

MG1 MG2

Call Agent

Digit Map

Voice SignallingVoice Signalling

Voice PathVoice Path

NotifyDeleteConnection DeleteConnection

Call Setup

Call Teardown

ModifyConnection

Page 34: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

IP

TCP UDP

RTP

CompressedAudio /VideoAudio

Control

RTCP

Cisco ‘Skinny’

Protocol

Skinny Client Control Protocol (SCCP)

Used for communication between Cisco IP telephones and Cisco Callmanager Server

Proprietary Voice Signalling ProtocolUses TCP port 2000 for voice signalling messages

Page 35: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

LANs and WANs

LANs: Traditional Ethernet, 10Mbps, no QoS support, legacy technology Fast Ethernet, 100 Mbps, supports QoS, standard access switch Gigabit Ethernet, 1000 Mbps, point-to-point, supports QoS 10 Gb Ethernet, 10000 Mbps, supports QoS, work in progress

WANs: X.25 - up to 256kbps, old technology, but still widely used, no QoS support Frame –Relay – up to 2 Mbps, used for WAN interconnect, limited QoS

support ISDN – up to 128Kbps (BRI) or 2 Mbps (PRI), used for backup and

remote working, no QoS support xDSL – up to 16Mbps, used for SOHO internet connections, backup and

remote working, no QoS support ATM – up to 2Gbps (155/622 Mbps more normal), extensive QoS support,

slowly losing favour but large installed base MPLS – extensive QoS support and will be covered in QoS chapter

Page 36: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

VoIP in the WAN - Packet or Circuit Switched?

Connection oriented (ATM or MPLS) or connectionless (IP)A queue of queuesPacket switching gives large variable delay (jitter) making it

unsuitable for delay sensitive data like voiceCircuit Switching gives less jitter and is more suitable for voice

Page 37: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

H.323/SIP TerminalH.323/SIP Terminal

ISPISP

Internet

VoIP Implementation (Domestic) - 1

International voice calls at local call rates.Likely to be used with broadband access.

Page 38: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

VoIP Implementation (Domestic) - 2

Use of Skype or other VoIP Provider for free Internet calls and cheap rate to PSTN – using Skype out

Skype software loaded onto PC’sLikely to use Broadband Access to communicate with

Skype server and other Skype users

Skype TerminalSkype Terminal

ISPISP

Internet

Skype Server

Page 39: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

VoIP Implementations (Domestic/Home Office)

FXS allows analogue telephones to be used for VoIP Dial code allows calls to be carried across Internet Soft phone could be installed on PC

PSTN(circuit switched)

Third Party Data Network

( e.g. BT)

BroadbandRouter

DSLAM

Internet

FXS Interface

Communicate via soft switch

(see later)

Page 40: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

VoIP Implementation (Corporate) - 1

This is a typical H323 implementation Gatekeeper gives Call Admission Control

PBX PBX

PSTN

RouterRouter

GatewayGateway

WANGatekeeper

Page 41: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

VoIP Implementations (Corporate) - 2

FXO allows analogue lines (PSTN) to integrate with VoIP IP telephones can communicate over Internet through IPSec tunnels IP telephones can ‘break out’ to PSTN via FXO interface on SIP PBX

PSTN(circuit switched)

DSLAM

Internet

FXO interface on SIP PBX

Page 42: Understanding Voice over IP by Eur Ing Dr KR Duncan BSc MSc PhD CEng CITP CPhys

© Kenega Training Ltd

RTP

SS7

SIP

MGCP

H.323

RTP

Gateway

IP Network

Accounting

PSTN

Callagent

Proxy Server

GK

Soft SwitchSoft Switch

VoIP Implementation (Carrier/Large Corporate)

Voice SignallingVoice Signalling

Voice PathVoice Path

Signalling Signalling GatewayGateway