230 likes | 579 Views
Voice and Video Over IP. NETS3303/3603 Week 11. Lesson Outcomes. What is needed to support multimedia traffic on the Internet How RTP handles data transfer in unicast and multicast sessions The role of RTCP The need for a separate signalling protocol. TCP/IP Protocols. Designed for data
E N D
Voice and Video Over IP NETS3303/3603 Week 11
Lesson Outcomes • What is needed to support multimedia traffic on the Internet • How RTP handles data transfer in unicast and multicast sessions • The role of RTCP • The need for a separate signalling protocol
TCP/IP Protocols • Designed for data • Can also handle voice and video • Industry excited about Voice Over IP (VOIP)
Digital Representation • Voice and video must be converted between analog and digital forms • Typical device is codec (coder / decoder) • Example encoding used by phone system is Pulse Code Modulation (PCM) • Take 8-bit samples @ 125 μs • Note: 128 second audio clip encoded in PCM requires one megabyte of memory • Codec for voice, known as vocodec, attempts to recognize speech rather than just waveforms
Requirements For Real-Time Transmission • Need to emulate conventional telephone system • Isochronous – output timing same with input timing • IP Internet is not isochronous! • Additional protocol support is required: • sequence information that allows detection of duplicate or reordered packets • each packet must carry a separate timestamp that tells the receiver the exact time at which the data in the packet should be played
Playback • Internet introduces burstiness • Jitter buffer used to smooth bursts • Protocol support needed
Illustration Of Jitter Buffer • Data arrives in bursts • Receiver delays playback until certain threshold, k – playback point • k too small, still have jitter • k too large, extra delay noticeable to users • Data leaves at steady rate
Real-Time Transport Protocol (RTP) • Internet standard (RFC 3550) • Provides playback timestamp along with data • Allows receiver to playback items in sequence • However, RTP does not contain mechanism to ensure timely delivery! • Supports different encodings: • Audio – PCM, GSM and MP3 • Video – MPEG and H.263
RTP Message Format • Each message begins with same header • Synchronisation source identifier (SSRC) is randomly chosen by the source • PTYPE – type of encoding used
Terminology And Layering • Name implies that RTP is a transport-layer protocol • In fact • RTP is an application protocol • RTP runs over UDP • For one-to-one session or one-to-many and many-to-many multicast trees
Translation & Mixing • Supports changing stream encoding during a session - translation • RTP can coordinate multiple data streams • Up to 15 sources (c.f. 4-bit CC field) • Header specifies mixing • Contributing source id – SSRC of streams that were mixed
RTP Control Protocol (RTCP) • Required part of RTP • Allows sender and receiver to exchange information about sessions • Monitors ongoing statistics • Separate communication (out-of-band reporting) • Uses protocol port number one greater than port number of data stream
RTCP • Each participant in RTP session periodically transmits RTCP control packets to all other participants (so multicast!) • Each RTCP packet contains sender and/or receiver reports • report statistics useful to application • Statistics include number of packets sent, number of packets lost, interarrival jitter, etc. • Feedback can be used to control performance • Sender may modify its transmissions based on feedback like changing encoding to a higher or lower quality
RTCP II • For an RTP session there is typically a single multicast address • all RTP and RTCP packets belonging to the session use the multicast address. • RTP and RTCP packets are distinguished from each other through the use of distinct port numbers. • To limit traffic, each participant reduces his RTCP traffic as the number of conference participants increases.
RTCP Packets Receiver report packets: • fraction of packets lost, last sequence number, average interarrival jitter Sender report packets: • SSRC of the RTP stream, the current time, the number of packets sent, and the number of bytes sent
RTCP attempts to limit its traffic to 5% of the session bandwidth. Example Suppose one sender, sending video at a rate of 2 Mbps. Then RTCP attempts to limit its traffic to 100 Kbps. RTCP gives 75% of this rate to the receivers; remaining 25% to the sender The 75 Kbps is equally shared among receivers: With R receivers, each receiver gets to send RTCP traffic at 75/R Kbps Sender gets to send RTCP traffic at 25 Kbps Participant determines RTCP packet transmission period by calculating avg RTCP packet size (across the entire session) and dividing by allocated rate RTCP Bandwidth Scaling
VoIP • RTP used for encoding and transfer • Signalling refers to process of establishing a call • So, we need a signalling protocol for • Dialling • Answering a call • Call forwarding… • Gateway used to connect IP telephone network to Public Switched Telephone Network (PSTN)
Standards For VoIP • H.323 • SIP
H.323 • ITU standard • Set of many protocols • Major protocols specified by H.323 include
Session Initiation Protocol (SIP) • IETF standard • Alternative to H.323 • Less functionality • Much smaller • Permits SIP telephone to make call • Does not require RTP for encoding
Session Description Protocol (SDP) • Companion to SIP • Specifies details such as • Media encoding • Protocol port numbers • Multicast addresses
Summary • Codec translates between analog and digital forms • RTP used to transfer real-time data • RTP adds timestamp that sender uses to determine playback time • RTCP is companion protocol for RTP that senders and receivers use to control and coordinate data transfer • Voice Over IP uses • RTP for digitized voice transfer • SIP or H.323 for signalling