Sie sind auf Seite 1von 25

Indian Institute of Technology Kharagpur

Internet Telephony,
Real Time Protocol

Prof. Indranil Sen Gupta


Dept. of Computer Science & Engg.
I.I.T. Kharagpur, INDIA

Lecture 37: Internet telephony, real time


protocol
On completion, the student will be able to:
1. Understand how IP telephony works.
2. Analyze packet losses and jitters and their impact
on playback performance.
3. Explain the purpose of RTP and RTCP protocols.
4. Interpret the header fields of a RTP packet.
5. Justify why RTP is better that TCP for real-time
traffic.

1
Internet Telephony

Introduction

• A classic application of interactive


multimedia over Internet.
• Voice chat (PC-to-PC, say) over the
Internet.
• How is basically works?
¾The speaker speaks into the microphone
connected to the PC.
ƒ Alternating talk spurts and silent periods.
ƒ Data rate of 8000 bytes per second generated
during each talk spurt (64 Kbps).

2
¾Packets get generated only during the
talk spurts,
ƒ Every 20 msec, the sender gathers the data
into chunks ==> 160 bytes per chunk
(maximum).
¾Application-layer header is added to
each chunk.
¾The data chunk and the header is
encapsulated into a UDP packet.
¾The UDP packets are transmitted.

• To summarize:
¾An UDP packet gets transmitted every
20 msec during a talk spurt.
¾No packets generate during idle
periods.

3
Packet Loss Analysis

• Two main reasons for quality loss:


¾Normal packet loss
ƒ Some IP packets are lost, and are not delivered
at the destination.
¾Loss due to excessive delay
ƒ An IP packet arrives, but too late to be played.
ƒ Delays < 150 msec are normally not detected.
Delays > 400 msec can be annoying.
• Depending on encoding technique,
packet loss rate of up to 20% can be
tolerated.

Handling Jitters

• Variable end-to-end delays in consecutive


packets can cause jitters.
• How to handle / remove jitters?
¾Use sequence number with each packet.
ƒ Out-of-order playback can be avoided.
¾Timestamps in the packet header.
ƒ Works similar to sequence number.
¾Delayed playout
ƒ The playout of packets is delayed long enough
so that most of the packets are received before
their playout times.
ƒ Delay can be adaptive.

4
Protocols Used

• Two widely used protocols:


¾Session Initiation Protocol (SIP)
¾ITU standard H.323

Session Initiation Protocol


(SIP)

5
Basic Idea

• SIP is an application layer protocol.


¾Used to establish, manage and
terminate multimedia sessions.
¾Various types of sessions are possible:
ƒ Two-party, multi-party, multi-cast
• SIP can run on either TCP or UDP.

SIP Messages

• Six message types are defined in SIP:


¾ INVITE – caller initializes a session
¾ ACK – caller confirms after callee answers the
call
¾ BYE – used to terminate a session
¾ OPTIONS – used to know the capabilities of a
host
¾ CANCEL – an ongoing initialization process
can be aborted
¾ REGISTER – to make a connection when the
callee is not available

6
Sender / Receiver Addressing

• SIP is flexible in specifying the address.


¾Typically uses the IP address, email
address, and the telephone number to
identify the sender and the receiver.
¾Must be specified in a standard SIP format.

Simple SIP Session

• Three parts:
¾Establishing a session
ƒ Uses a 3-way handshake protocol.
¾Communication
ƒ Caller and callee uses two temporary ports
for the purpose.
¾Terminating the session
ƒ Either party can initiate this.

7
INVITE

OK
C C
ACK A
A
L L
L L
E Exchange of voice packets E
R E

BYE

The H.323 Standard

8
Basic Idea

• A standard that allows telephones on


the public network to talk to
computers on the Internet.
• Uses a gateway:
¾Connects the telephone network to the
Internet.
¾Translates messages from one protocol
stack to another.

G
A
T
Internet E Telephone
W Network
A
Y

9
Various Protocols Used

• H.323 uses a number of protocols:


¾G.71 or G723.1
ƒ Used for compression.
¾H.245
ƒ Allows parties to negotiate the compression
method.
¾Q.931
ƒ For establishment and termination of
connections.
¾H.225
ƒ Used for registration with the gatekeeper.

Typical Operation

• Step 1: Host sends a broadcast message; gatekeeper


responds with its IP address.
• Step 2: Using H.225, the host and gatekeeper
negotiate bandwidth required.
• Step 3: Host, gatekeeper, gateway, and telephone
communicate using Q.931 for connection setup.
• Step 4: All the four use H.245 to negotiate the
compression method to be used.
• Step 5: The host and the telephone exchange audio
through the gateway using RTP & RTCP protocols.
• Step 6: All the four use Q.931 to terminate the
connection.

10
Real Time Protocol (RTP)

Introduction

• Real-time Transport Protocol (RTP) is


used to handle real-time traffic over
the Internet.
• RTP does not have an inherent
mechanism to deliver packets.
¾Uses UDP for the purpose.
¾RTP basically performs sequencing,
time-stamping, mixing, etc. for real-time
traffic requirements.

11
RTP
Transport
Layer
UDP

IP

• Typical multimedia sessions:


¾Relay on Real-time Transport Protocol
(RTP) for transmitting data.
¾Relay on Real-time Transport Control
Protocol (RTCP) for transmitting control
information.

12
Some Problems

• A typical complex session today:


¾Number of entities involved in a multimedia
session is large.
¾In asymmetric heterogeneous broadcast
environments the RTCP protocol becomes
ineffective (e.g. satellite networks).
• So we must:
¾Extend RTCP to address scalability, and its
inability to operate effectively in asymmetric
broadcast environments.

RTP/RTCP : Introduction

• Real-time Transport Protocol (RTP):


¾This is an Internet standard for sending
real-time data over the network.
ƒ Examples: Internet telephony, interactive
audio/video.
• It consists of a data and control (RTCP)
component that work together.
¾Data:
ƒ Provides support for streaming data.
ƒ Timing reconstruction, loss detection, etc.

13
¾Real-time Transport Control Protocol
(RTCP):
ƒ This is the control part of RTP, and provides
the following functions:
Data delivery monitoring
Source identification
Allow session member to calculate the
rate to send status messages

• Which port numbers do they use?


¾RTP or RTCP are not assigned any well-
known port number.
¾The port numbers are assigned on
demand.
¾Restriction:
ƒ For RTP, port number must be even.
ƒ For RTCP, port number must be odd.

14
RTP Packet Header
32 bits

V, P, X, CC, M, PT Sequence number

Timestamp

Synchronization source (SSRC) identifier

Contributing source (SSRC) identifiers


……………………….

V: version, P: padding, X: extension,


CC: CSRC count, M: maker, PT: payload type

RTCP Status Messages

• Typical information sent:


¾Time Stamps:
ƒ Used to correlate time stamp of a given
session to wall-clock time.
ƒ Can be used to make rough estimate of
round-trip propagation time between
receivers.
¾Fraction of packets lost.
¾Total number of packets sent.
¾Sender ID of the Status message.

15
Design Choice: TCP or RTP

• Typical requirement of multimedia


applications:
¾Constant data rate is more important,
rather than having a guarantee of receiving
all packets, and that too in order.
¾Examples: streaming audio, video.
• TCP:
¾Good for applications that need guarantee
on delivery and delivery order.
ƒ The resend protocol of TCP can cause
unacceptable delays in real-time data
streaming applications.

• RTP:
¾Specifically addresses this issue.
¾The protocol is designed to focus on:
ƒ Supplying applications with constant data
rate.
ƒ Giving applications feedback on the quality
of a link (can help adapt to changing link
conditions).

16
RTP: Some Assumptions Made

• Assumption 1
¾The entities are fully connected to each
other. This allows a feedback path for
control/status information between them.
ƒ Entities broadcast its control/status information
to all other entities.
ƒ To limit the total amount of control traffic, the
amount of network bandwidth allocated for
control information is controlled.

• Assumption 2
¾All entities are considered to be equal.
ƒ Constant rate for all entities to receive
control information.
ƒ No variation among entities is assumed.

17
How to Broadcast Control Info?

• Consider an asymmetric/ unicast


environment like satellite networks:
¾A single entity needs to broadcast to all
other entities.
¾These receiver entities are usually not
directly connected to each other.
ƒ Via the satellite.
¾Therefore there is no back channel for
control/status information to be sent to
all entities at once.

¾Can use the satellite for broadcast.


ƒ A signal repeater in the sky.
• Basically …
¾Instead of having an entity broadcast to
all other entities.
ƒ Individual entity sends control/status
information to the source (i.e. satellite).
ƒ Source (satellite) broadcast information to
all entity receivers (Reflection).

18
Satellite

E1 E1 E1 E1

Satellite

E1 sends to
satellite

E1 E1 E1 E1

19
Satellite

Satellite
broadcasts

E1 E1 E1 E1

Summarization

• An alternative to blind broadcast


over unicast channel.
¾Some of the information sent in control
status messages can be only important
to the Source.
¾Summarization:
ƒ Source gathers report packets from many
receiver entities.
ƒ Source processes this data and broadcasts
a summary report which is of a much
smaller size than pure Reflection.

20
SOLUTIONS TO QUIZ
QUESTIONS ON
LECTURE 36

21
Quiz Solutions on Lecture 36

1. What is a multimedia application?

It is an application which deals with


multimedia content (text, audio, video,
image, etc.).

2. What are the factors that affect the


quality of streaming multimedia
contents?

Delay sensitivity, packet losses.

Quiz Solutions on Lecture 36

3. What is streaming stored multimedia?

The file is stored at the source, and is


transmitted and played in streaming mode
when requested.

4. What is streaming live multimedia?

Multimedia content is generated on-the-fly


and broadcast to the requester.

22
Quiz Solutions on Lecture 36

5. What is real-time interactive multimedia?

Content to be transmitted is decided by the


end parties dynamically.

6. What is the purpose of the streaming server


in the Internet scenario?

It directly interacts with the media player and


provides streaming contents.

Quiz Solutions on Lecture 36

7. Explain the role of metafile in the context of


multimedia streaming over Internet.

Metafile provides details about the


multimedia content, like location, bit rate,
etc.

8. What is RTSP?

It is a client-server application layer


protocol, used for transmission of real-time
content over the Internet.

23
Quiz Solutions on Lecture 36

9. What are the different steps that are followed


by the RTSP protocol for playing multimedia
content on a client machine?
HTTP GET
Web Web
Browser Server
Presentation description
SETUP

PLAY

SERVER
CLIENT

Media Media Stream Media


Player Server
PAUSE

TEARDOWN

QUIZ QUESTIONS ON
LECTURE 37

24
Quiz Questions on Lecture 37

1. How does Internet telephony basically work?


2. What are the possible reasons for packet
loss?
3. How are jitters typically handled?
4. What are the typical steps in a SIP session?
5. What is the difference between RTP and
RTCP?
6. What are the typical information that are sent
as part of RTCP status messages?
7. How is entity broadcast typically handled in
a n asymmetric environment?

25

Das könnte Ihnen auch gefallen