rtp, voip - eecs instructional support group home...

17
Unit 23 RTP, VoIP Shyam Parekh

Upload: ngonhan

Post on 27-Apr-2018

226 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Unit 23

RTP, VoIP

Shyam Parekh

Page 2: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Contents:

� Real-time Transport Protocol (RTP)� Purpose� Protocol Stack

� RTP Header

� Real-time Transport Control Protocol (RTCP)

� Voice over IP (VoIP)� Motivation

� H.323

� SIP

� VoIP Performance Tests

� Build-out Delay

� References� Computer Networks, A. Tanenbaum

� Computer Networks, L. Peterson and B. Davie

Page 3: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

RTP: Purpose

� Provide a generic transport capabilities for real-time multimedia applications

� Supports both conversational and streaming applications

� Internet radio

� Internet telephony

� Music-on-demand

� Videoconferencing

� Video-on-demand

� Applications may include multiple media streams

Page 4: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Purpose (Cont’d)

� Provides following functions

� Identifies encoding scheme

� Facilitates playout at appropriate times

� Synchronizes multiple media streams

� Indicates packet loss

� Provides performance feedback

� Indicates frame boundary

Page 5: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Protocol Stack

� Normally runs over UDP

� Runs with the companion protocol RTCP on consecutive ports

� RTCP handles feedback, synchronization, and user

interface

� “It’s a transport protocol implemented in the application layer” – A. Tanenbaum

Page 6: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

RTP Header

� For each class of application, RTP defines

o Profile: How to interpret header fields

o Format: How to interpret payload data

�Comments

o P = Padding indicator (if present, last byte of payload is pad count)

o X = Extension bit indicating presence of Extension Header

o CC = Number of Contributing Sources

o M = Marker bit (e.g., frame with beginning of a talkspurt)

o Payload type = Type of data (e.g., encoding scheme)

o Timestamp = Generation time of first sample relative to previous frame

o Synchronization Source Identifier (SSRC) = Current source

o Contributing Source Identifier (CSRC) = Contributing source at a mixer

Page 7: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

RTCP

� Main functions

� Provide feedback on end-to-end application performance, as well as network performance

� Synchronize different media streams from the same sender

� Identify sender for display on user interface

Page 8: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

RTCP (Cont’d)

� Information conveyed for synchronization of

different media streams

� Timestamp containing actual time-of-day

� RTP timestamp

� Information conveyed for performance

feedback

� Data packets lost

� Interarrival jitter

� Highest sequence number received

Page 9: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

RTCP (Cont’d)

� How performance feedback can be used

� If one or a few of the recipients are reporting poor performance

� Check resource reservation

� Check for network problem

� If many receivers are reporting poor performance

� Lower encoding rate

� Add error resiliency

Page 10: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Voice over IP: Motivation

� By 2002, volume of total data traffic was an order of magnitude higher than that of voice traffic

� Data traffic still growing “exponentially”� Voce traffic growth almost flat (~5%)� Money spent on voice services by a typical

household is higher than that for data services� Strong business case for sending voice over data

networks� VoIP (internet Telephony) provides data service providers

significant revenue with minimal increase in traffic

� With 802.11 (Wi-Fi) and 802.16 (WiMAX), wireless voice over data networks would have even higher penetration

Page 11: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

H.323

� H.323 is an architectural overview of internet telephony than a specific protocol� Supports G.711 (64Kbps) voice by default� H.245 let the terminals negotiate encoding algorithms, bit rate, etc.� ITU Q.931 is used for signaling� Gatekeeper controls end-points in a Zone

o H.225 manages PC-to-gatekeeper channel calledRegistration/Admission/Status

� Gateway connects Internet and PSTN

Page 12: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

H.323 Protocol Stack

Page 13: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Session Initiation Protocol (SIP)

� Designed by IETF to offer a simpler alternative

� Describes how to set up VoIP calls, video conferences, etc.

� Designed to interwork with existing Internet applications� Defined phone numbers as URLs

� Text-based protocol modeled on HTTP

� Main “methods” are Invite, Ack, Bye, Options, Cancel, and Register

� Runs over UDP or TCP

� Uses RTP/RTCP for data transport

Page 14: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

SIP Example

� A proxy server is used as a redirection server

Page 15: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

VoIP Performance Tests

TestYourVoIP.com

Page 16: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

VoIP Performance Tests

(Cont’d)

TestYourVoIP.com

Page 17: RTP, VoIP - EECS Instructional Support Group Home Pageinst.eecs.berkeley.edu/~ee122/sp07/rtp_voip.pdf · Contents: Real-time Transport Protocol (RTP) Purpose Protocol Stack RTP Header

Buidout Delay

Source DestInternet

Synchronous Source

� Packet are sent at S1 = S, S2 = 2S, …, with interpacket spacing of S� Received at S1+D1, S2+D2, …� Find minimum buildout delay so that packets can be played out synchronously

o Find minimum B, such that S1+D1+B, S1+D1+B+S, … are not smaller thanthe corresponding reception times

o Implies B = Max delay – D1