Voice over IP (VoIP) David Wang, Ph.D. UT Arlington 1
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 2
Agenda Why VoIP? Voice Codec Signaling & Control Protocols Quality of Service Design a VoIP network 3
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 4
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 5
Public Switched Telephone Network SCP STP SS7 STP T-1 T-1 SSP (CO) Trunk Trunk SSP (CO) Loop SCP: Service control point SSP: Service-switching point STP: Service transfer point Loop Circuit switching Optimized for 3-minute calls and certain busy hour call attempts Separated signaling and transport facilities Expensive switching devices 6
Yesterday s Networks Circuit Switched Networks (Voice) PBX CO PBX CO CO Packet Switched Networks (Data) Router Router Router Router Router Separated networks Separated applications/services 7
Converged Network PBX PSTN CO PBX Gateway Router Router Router Router IP Phone IP Phone Converged network Separated or integrated applications 8
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 9
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 10
Voice Codec Standard Compression Method Bit Rate MOS Score G.711 Pulse Code Modulation (PCM) 64Kbps 4.1 G.723.1 G.723.1 Multipulse, Multilevel Quantization (MP- MLQ) Algebraic Code Excited Linear Predictive (ACELP) 5.3Kbps 3.9 6.4Kbps 3.65 G.726 Adaptive Differential PCM (ADPCM) 40, 32, 24 and 16 Kbps G.728 Low Delay-Code Excited Linear Predictive (LD-CELP) G.729 Conjugate Structure-Algebraic Code Excited Linear Predictive (CS-CELP) 3.85 16 Kbps 3.61 8 Kbps 3.92, 3.7 MOS: Mean Opinion Score (1 to 5) 11
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. 12
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 13
VoIP Protocol Stacks Call Control & Signaling H.323 H.225 Signaling & Gateway Control Media Voice & Video H.245 Q.931 RAS SDP/SIP MGCP RTCP RTP TCP UDP IP Link Layer Protocols H225: Call control signaling H245: Control channel signaling, Media control IP: Internet Protocol MGCP: Media Gateway Control Protocol Q.931: ISDN signaling RAS: Registration, Admission, Status RTCP: RTP Control Protocol RTP: Real-time Transport Protocol SDP: Session Description Protocol SIP: Session Initiation Protocol TCP: Transport Control Protocol UDP: User datagram Protocol 14
VoIP Using SIP 15
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 16
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 17
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
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 19
SIP Methods Method Description RFC INVITE invite the server to participate in a session; session setup 3261 ACK accept the INVITE to participate; acknowledgement to INVITE 3261 CANCEL cancel any in-progress request 3261 REGISTER a client to register location information with a server 3261 OPTION inquire capability and options 3261 BYE terminate a session 3261 INFO signaling in mid-call 2976 PRACK provisional response acknowledgement 3262 UPDATE update session information 3311 REFER transfer client to a URI 3515 SUBSCRIBE request notification of an event 3265 NOTIFY notification of an event 3265 MESSAGE instant message body 3428 PUBLISH upload presence state to a server 3911 20
SIP Messages Example Message Responses Class of Response Status Code Explanation Information 100 Trying 180 Ringing 182 Queued Success 200 OK 301 Moved permanently 302 Moved temporarily Client Error 400 Bad request 401 Unauthorized 402 Payment required 403 Forbidden 408 Request timeout Server Error 500 Internal server error 502 Bad gateway Global Failure 600 Busy everywhere 603 Decline 21
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
dave@199.147.67.123 EE6364 SIP Registration SIP Registration: Establishes presence of user with an address (e.g., dave@abc.com) Binds this address to user s current location (e.g., 199.147.77.123). Location Server 1 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 2 SIP Registrar SIP/2.0 200 OK 3 23
SIP Call Setup Message INVITE Internet INVITE dave@abc.com john@xyz.com SIP Header RFC 2543 Space SDP RFC 2327 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 24
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 25
Where is john? EE6364 SIP Operation with Proxy Server Location Server 3 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 2 john@195.127.75.123 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 6 OK 200 VIA: dave@abc.com From: sip:dave@abc.com TO: sip:john@xyz.com Call-ID: 1234@abc.com Proxy Server 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 7 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 26
Where is john? EE6364 SIP Operation with Redirect Server Location Server 3 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 302 Moved Temporarily CONTACT: john@def.com 2 john@def.com Redirect Server 5 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 Media Streams 27
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 28
VoIP QoS 29
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. 30
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 31
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) 32
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 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
Examples of VoIP Delay Codec Packetization Delay (msec) Sender Codec Delay (msec) Jitter Buffer Delay* (msec) Receiver Codec Delay (msec) G.711 20 1 40 1 G.729 20 15 40 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. 34
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 35
Now, Let s 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 36