Вы находитесь на странице: 1из 36

EE6364

Voice over IP (VoIP)

David Wang, Ph.D. UT Arlington

DCW

EE6364

Purposes of this Lecture


To present an overview of Voice over IP To use VoIP as an example
To review what we have learned so far To use what we have learned to design a VoIP network

DCW

EE6364

Agenda
Why VoIP? Voice Codec Signaling & Control Protocols Quality of Service Design a VoIP network

DCW

EE6364

Types of Voice Calls


Voice over TDM
PSTN call, 100+ years old Circuit switching High availability, constant latency

Voice over Frame Relay


Packet switching Large enterprise By pass toll charge

Voice over ATM


Multimedia transmission Tandem switch (class 4) replacement

Voice over IP

DCW

EE6364

Why VoIP?
Cost reduction
Toll by-pass WAN Cost Reduction

Operational Improvement
Common network infrastructure Simplification of Routing Administration

Business Tool Integration


Voice mail, email and fax mail integration Web + Call Mobility using IP

New Services
New Integrated Applications

DCW

EE6364

Public Switched Telephone Network


SCP STP

SS7

STP

T-1

T-1

SSP (CO)
Loop

Trunk

Trunk

SSP (CO)
Loop

SCP: Service control point SSP: Service-switching point STP: Service transfer point

Circuit switching Optimized for 3-minute calls and certain busy hour call attempts Separated signaling and transport facilities Expensive switching devices
DCW

EE6364

Yesterdays Networks
Circuit Switched Networks (Voice)
CO PBX PBX

CO

CO

Packet Switched Networks (Data)


Router Router Router Router Router

Separated networks Separated applications/services


DCW

EE6364

Converged Network
PSTN

PBX

CO

PBX

Gateway Router Router Router Router

IP Phone IP Phone

Converged network Separated or integrated applications


8

DCW

EE6364

Convergence
Cost Savings
One backbone instead of two parallel ones. No maintenance of proprietary switching systems Significant capital equipment cost reduction

Simplification
One infrastructure Multi-vendor capable

Advanced Services
Unified Messaging Computer-telephony integration

DCW

EE6364

Components of VoIP
Coding & Decoding of Analog Voice
Analog-to-Digital and Digital-to-Analog conversions Compression

Signaling
Call setup & tear down Resource & coding negotiation

Transport of Bearer Traffic


Voice packet transmission Routing Support of quality of service

Numbering
Phone number, IP address

DCW

10

EE6364

Voice Codec
Standard G.711 G.723.1 G.723.1 G.726 G.728 G.729 Compression Method Pulse Code Modulation (PCM) Multipulse, Multilevel Quantization (MPMLQ) Algebraic Code Excited Linear Predictive (ACELP) Adaptive Differential PCM (ADPCM) Low Delay-Code Excited Linear Predictive (LD-CELP) Conjugate Structure-Algebraic Code Excited Linear Predictive (CS-CELP) Bit Rate 64Kbps 5.3Kbps 6.4Kbps 40, 32, 24 and 16 Kbps 16 Kbps 8 Kbps MOS Score 4.1 3.9 3.65 3.85 3.61 3.92, 3.7

MOS: Mean Opinion Score (1 to 5)

DCW

11

EE6364

What Protocols are Required?


Signaling Protocol: To establish presence, locate user, set up, modify and tear down sessions. Media Transport Protocols: To transmit packetized audio/video signal. Supporting Protocols: Gateway Location, QoS, AAA, Address Translation, etc.

DCW

12

EE6364

VoIP Protocols
H.323:
ITU-T standard, latest version v4 Peer-to-peer protocol that supports terminals communicating over packet based networks

SIP:
IETF standard, RFC 3261 Peer-to-peer protocol for initiation, modification termination of communication sessions between users

MGCP:
ITU-T and IETF collaboration, RFC 3435 Master/slave protocol for media gateway controller to control media gateway

DCW

13

EE6364

VoIP Protocol Stacks


Call Control & Signaling
H.323 H.225 H.245 Q.931 RAS SDP/SIP MGCP

Signaling & Gateway Control

Media
Voice & Video

RTCP

RTP

TCP IP

UDP

Link Layer Protocols


H225: H245: IP: MGCP: Q.931: RAS: DCW Call control signaling Control channel signaling, Media control Internet Protocol Media Gateway Control Protocol ISDN signaling Registration, Admission, Status RTCP: RTP: SDP: SIP: TCP: UDP: RTP Control Protocol Real-time Transport Protocol Session Description Protocol Session Initiation Protocol Transport Control Protocol User datagram Protocol

14

EE6364

VoIP Using SIP

DCW

15

EE6364

Related IETF Working Groups


SIP: Session Initiation Protocol IPTEL: Internet Telephony AVT: Audio Video Transport MIDCOM: Firewall/NAT Traversal SIMPLE: SIP for Instant Messaging and Presence Leveraging MMUSIC: Multiparty Multimedia Session Control QoS Related: DiffServ, IntServ PSTN legacy: SigTran, Megaco interaction of PSTN and IP services: PINT,SPIRITS

DCW

16

EE6364

Session Initiation Protocol (SIP)


IETF standard, RFC 3261 Peer-to-peer protocol for initiation, modification termination of communication sessions between users Two components: user agents and network servers User agents: client end-system applications
User-agent client (UAC): originate calls User-agent server (UAS): listen for incoming calls

Network servers:
Proxy server: relay calls, act as both client and server Redirect server: redirect calls to other servers Registrar: accept user registration

Simple, text based messages New, gaining momentum


DCW

17

EE6364

SIP Addresses
Require a reachable IP address.
Callee bind to this address using SIP REGISTER method. Caller use this address to establish communication with callee.

URLs used as address data format; examples:


sip:dw@xyz.com sip:voicemail@xyz.com?subject=callme

Must include host, may include user name, port number, parameters, etc. May be embedded in Webpages, email signatures, printed on your business card, etc. Address space unlimited Non-SIP URLs can be used (mailto:, http:, ...)
18

DCW

EE6364

SIP Messages
SIP is a text-based protocol with message syntax and header fields identical to HTTP Message header includes:
General header Entity header

Two kinds of messages:


Requests initiated by client Responses returned by server

DCW

19

EE6364

SIP Methods
Method
INVITE
ACK CANCEL REGISTER

Description
invite the server to participate in a session; session setup
accept the INVITE to participate; acknowledgement to INVITE cancel any in-progress request a client to register location information with a server

RFC
3261
3261 3261 3261

OPTION
BYE INFO PRACK UPDATE REFER SUBSCRIBE NOTIFY MESSAGE PUBLISH
DCW

inquire capability and options


terminate a session signaling in mid-call provisional response acknowledgement update session information transfer client to a URI request notification of an event notification of an event instant message body upload presence state to a server

3261
3261 2976 3262 3311 3515 3265 3265 3428 3911
20

EE6364

SIP Messages
Example Message Responses
Class of Response Information Status Code 100 180 182 Success 200 301 302 Client Error 400 401 402 403 408 Server Error 500 502 Global Failure 600 603 DCW Trying Ringing Queued OK Moved permanently Moved temporarily Bad request Unauthorized Payment required Forbidden Request timeout Internal server error Bad gateway Busy everywhere Decline Explanation

21

EE6364

Session Description Protocol (SDP)


RFC 2327 To convey information about the session to the destination Description includes:
Media to be transmitted (e.g., A/V, codec, sampling rate) Transport protocol Media destination (IP address and port number) Session name and purpose Times the session is active Contact information
22

DCW

EE6364

SIP Registration
SIP Registration:
Establishes presence of user with an address (e.g., dave@abc.com) Binds this address to users current location (e.g., 199.147.77.123).
Location Server

REGISTER sip:abc.com SIP/2.0 From: sip:dave@abc.com To: sip:dave@abc.com Contact: <sip:199.147.67.123> Expires: 3600 SIP/2.0 200 OK

dave@199.147.67.123 3

SIP Registrar

DCW

23

EE6364

SIP Call Setup Message


INVITE INVITE

Internet
dave@abc.com john@xyz.com

SIP Header RFC 2543

INVITE sip:john@xyz.com SIP/2.0 Via: sip/2.0/UDP abc.com:5060 From: sip:dave@abc.com To: sip:john@xyz.com Call-ID: 12345600@abc.com CSeq: 1 INVITE Subject: Hello Contact: sip:dave@abc.com Content-Type: application/sdp Content-Length: 147 v=0 o=David 2890844526 2890844526 IN IP4 abc.com s=Session SDP c=IN IP4 100.101.102.103 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000

Space

SDP RFC 2327

DCW

24

EE6364

Call Flow
User A User B

Calsl 195.218.12.32

INVITE: sip:195.218.12.32

180 - Ringing

Rings

200 - OK

Answers

ACK

Talks

RTP

Talks

Hangs up

BYE

200 - OK

DCW

25

EE6364

SIP Operation with Proxy Server


Location Server
3
john@195.127.75.123

1 INVITE sip:john@xyz.com VIA: dave@abc.com FROM: sip:dave@abc.com TO: sip:john@xzy.com Call-ID: 1234@abc.com

Where is john?

INVITE sip:john@195.127.75.123 VIA: proxy@internet.com VIA: dave@abc.com FROM: sip:dave@abc.com 4 TO: sip:john@xzy.com Call-ID: 1234@abc.com 5 OK 200 VIA: proxy@internet.com VIA: dave@abc.com FROM: sip:dave@abc.com TO: sip:john@xzy.com Call-ID: 1234@abc.com

6 OK 200 Proxy VIA: dave@abc.com Server From: sip:dave@abc.com TO: sip:john@xyz.com Call-ID: 1234@abc.com

ACK sip:john@xyz.com VIA: dave@abc.com FROM: sip:dave@abc.com TO: sip:john@xzy.com Call-ID: 1234@abc.com 8 Media Streams

DCW

26

EE6364

SIP Operation with Redirect Server


Location Server
Where is john? 3 john@def.com 1 INVITE sip:john@xyz.com VIA: dave@abc.com FROM: sip:dave@abc.com TO: sip:john@xzy.com Call-ID: 1234@abc.com 4 5

302 Moved Temporarily CONTACT: john@def.com

Redirect Server

ACK john@def.com

6 INVITE sip:john@def.com VIA: dave@abc.com FROM: sip:dave@abc.com TO: sip:john@def.com Call-ID: 1234@abc.com 7 OK 200 8 ACK john@def.com

9 DCW

Media Streams

27

EE6364

Proxy vs Redirect
A SIP server can either proxy or redirect INVITE requests. Architecture design issue. Consideration factors:
Using proxy, server has more control Firewall, security AAA

DCW

28

EE6364

VoIP QoS

DCW

29

EE6364

VoIP QoS Measurement


Traditional measure of user perception:
Mean Opinion Score (MOS) from 1 (poor) to 5 (excellent), An expert panel listens the voice samples and scores the quality of the voice MOS=4 is toll quality

ITU-T G.107 presents a mathematical model, known as E-model, to predict QoS (as R value) based on objective impairment measurements.

DCW

30

EE6364

QoS Considerations - Voice Quality


Five components affect the voice quality:
Codec used
Different codecs use different compression algorithms

Packet Loss
Voice can tolerate some packet loss (<10-3), Use packet loss concealment to improve quality

Packet Transfer Delay


End-to-end delay must be <150 milliseconds Use DiffServ and priority queuing for voice packet transport

Jitter
Too much jitter degrades voice quality Use jitter buffer to reduce jitter

Echo
DCW

31

EE6364

Bandwidth Required
Depends on codec used, packetization delay, and protocol overhead Packetization delay: Time required to collect voice in the packet payload Payload length = (Codec bit rate) * (packetization delay) Packet overhead: RTP, UDP, IP Layer 2 overhead:
ATM Frame Relay Ethernet PPP

Bandwidth required:
(overall length in bits)/ (packetization delay)
DCW

32

EE6364

End-to-End Delay
End-to-end delay 150 msec to be satisfactory (ITU-T G.114#) End-to-end delay includes
At the originating caller: packetization delay, originating codec latency, In the network: network delay, At the destination: receiver jitter buffer delay, and receiving codec latency.

Network delay includes



DCW

propagation delay: depends on distance insertion delay: depends on transmission line rate switch/router processing time queuing delay: depends on queuing and scheduling algorithms used.
33

EE6364

Examples of VoIP Delay

Codec G.711 G.729

Packetization Delay (msec)

Sender Codec Delay (msec)

Jitter Buffer Delay* (msec)

Receiver Codec Delay (msec)

20 20

1 15

40 40

1 2

* Jitter buffer delay depends on the jitter buffer size and can be dynamic. In general, it is 1 to 3 times the packetization delay. In this Table we assume a Jitter buffer size of TWO packets.

DCW

34

EE6364

Support of QoS in the Network


Bandwidth requirements:
In access network In the backbone network

QoS Protocols:
Layer 3: IP TOS, DiffServ Layer 2: IEEE 802.1p, ATM QoS

Queuing and scheduling in the network Codecs at the caller and callee
Different codecs yield different MOS scores Jitter buffer management

DCW

35

EE6364

Now, Lets Design a VoIP Network


High level network architecture
Network elements Network configuration

Protocol stacks Bandwidth requirements Support of QoS


QoS classes Delay measurement

OAM&P

DCW

36

Вам также может понравиться