استخراج روابط معنایی از حالات...
TRANSCRIPT
Multimedia ProtocolsInstructor: Hamid R. Rabiee
Spring 2012
Outline
Multimedia Protocol Stack (Overview)
Signaling Protocols
H.323 (Multimedia Conferencing Protocol)
Session Initiation Protocol (SIP)
Real-time Protocols
Real-time transport protocol (RTP)
RTP control protocol (RTCP)
Real-time streaming protocol (RTSP)
Digital Media Lab - Sharif University of Technology2
Multimedia Protocol Stack
Digital Media Lab - Sharif University of Technology3
Signaling Protocols Terminology
Call Establishment and Teardown
Call Control and Supplementary Services
Call waiting, Call hold, Call transfer
Capability Exchange
Admission Control
Protocol Encoding (ASN1, HTTP)
4Digital Media Lab - Sharif University of Technology
H.323 – ITU Standard
H.323 is a multimedia conferencing protocol, which includes voice, video, and data conferencing, for use over packet-switched networks
Devices: Terminals, Gateways, Gatekeepers and Multipoint Control Units (MCUs)
Codecs: Video: H.261, H.263, H.264
Audio: G.711, G.722, G.723.1
Signaling: H.225, H.245
Transport Mechanisms: TCP, UDP, RTP and RTCP
Data collaboration: T.120
Applications
- Application Sharing - Unified Messaging
- Electronic Whiteboard - Ad-Hoc Conferencing
- File Transfer - Call No-Waiting
- Instant Messaging - Web Call Parking
- Click to Dial - Internet Call Waiting
- Voicemail Anywhere - Service Portability
5Digital Media Lab - Sharif University of Technology
The H.323 Architecture
Fig.2 – Scope of H.323 in the network
6Digital Media Lab - Sharif University of Technology
The H.323 Architecture
Fig.1 - H.323 Network Architecture and Components
Entities
Terminals
Gateways
Gatekeepers
MCUs
Protocols
Parts of H.225.0 - RAS, Q.931
H.245
RTP/RTCP
Audio/video codecs
7Digital Media Lab - Sharif University of Technology
Terminals
Endpoint on a LAN
Supports real-time, 2-way
communications with another H.323
entity
Must support:
Voice - audio codecs
Signaling and setup - Q.931, H.245,
RAS
Optional support:
Video
DataFig.3 – H.323 terminal
8Digital Media Lab - Sharif University of Technology
Gateways
Interface between the LAN and the
switched circuit network
Mandatory Functions
Transmission Format Translation
Communication Procedure Translation
Call Setup and Clearing On Both Sides
Optional Function
Media Format Translation
Example: IP/PSTN gateway
Fig.4 – H.323 gateway
9Digital Media Lab - Sharif University of Technology
MCUs
MCU - Multipoint Control Unit Endpoint that supports conferences between 3 or more endpoints
Can be stand-alone device or integrated into a gateway, gatekeeper or terminal
Typically consists of multi-point controller (MC) and multi-point processor (MP) MC - handles control and signaling for conference support
MP - receives streams from endpoints, processes them, and returns them to the endpoints in the conference
T1521250-96
MC
MC MC MP MC
MC
Gateway 1 MCU 1
LAN
MCU 2
Gatekeeper 1 Terminal 1 Terminal 2
NOTE – Gateway, Gatekeeper and MCU can be a single device.
Gatekeeper 2
Gateway 2 Gateway 3
Gatekeeper 3
MC MP
MC MP
Fig.5 – H.323 MCUs
10Digital Media Lab - Sharif University of Technology
Gatekeepers
Manage a zone (a collection of H.323 devices)
Usually one gatekeeper per zone
alternate gatekeeper might exist for backup and load balancing
Typically a software application
implemented on a PC, but can be integrated in a gateway or terminal
Mandatory functions:
Address translation (routing)
Admission control
Minimal bandwidth control - request processing
Zone management
Optional functions: Call control signaling - direct handling of Q.931 signaling between endpoints
Call authorization, bandwidth management, and call management using some policy
Gatekeeper management information (MIB)
Directory services
11Digital Media Lab - Sharif University of Technology
H.323 Protocol Stack
12Digital Media Lab - Sharif University of Technology
NETWORK
DATA LINK
PHYSICAL
TRANSPORT
SESSION
PRESENTATION
APPLICATION
Supplementary Services
Audio Signal
Video SignalData
Control
G.711 G.728
H.261 H.263 T.127
T.126
T.124
T.125/
T.122
G.722 G.729
G.723.1
RTCP RAS RTP
H.450.3 H.450.2
H.450.1H.235
H.245 H.225UDP TCP
X.224.0
RTP/RTCP (RFC 3550) is used to transmit
media such as audio and video over IP
networks
H.225.0 define the procedures and protocol
for communication within and between Peer
Elements (defines the call signaling
between endpoints and the Gatekeeper)
H.245 is the protocol used to control
establishment and closure of media channels
within the context of a call and to perform
conference controlH.450.x is a series of supplementaryservice protocols
H.460.x is a series of version-independentextensions to the base H.323 protocol
T.120 specifies how to do dataconferencingH.235 defines security within H.323systems
H.323 Protocol Stack (cont.)
RAS, Q.931 and H.245 RAS to obtain permission from a gatekeeper
RAS channel
Q.931 to establish communication and set up the call
Call-signaling channel
H.245 to negotiate media parameters
H.245 control channel
Media streams over logical channels
Digital Media Lab - Sharif University of Technology13
H.323 Call Establishment & Teardown (cont.)
Admission Request (ARQ)
The type of the call (e.g., two-party or multi-party)
The endpoint’s own id
A call identifier (a unique string)
A call-reference value (an integer)
Information of the other party
Aliases
Signaling address
Bandwidth (mandatory)
TransportQOS: endpoint or GK to reserve the resource
Admission Confirm (ACF)
Many of the same parameters as ARQ
A firm order from the GK
CallModel
Optional in ARQ; mandtory in ACF
The endpoint sends call signaling directly or via the GK
Admission Reject (ARJ)
With a reason
Bandwidth, address translation, unregistered endpoint
Disengage Confirm (DCF)
Digital Media Lab - Sharif University of Technology14
H.323 Call Establishment & Teardown (cont.)
Setup
The first call-signaling message
Q.931 Protocol Discriminator
A call reference
Bearer Capability
RTP information, such as payload type
A gateway needs to perform the mapping
User-to-User information element
Mandatory: Call id, call type, conference id, the caller information
Optional: source alias, destination alias, H.245 address, destination call-signaling address
Call Proceeding
Optional
call-establishment procedures are underway
Mandatory
Protocol discriminator, call reference, and message type, user-to-user
User-to-user: similar to the setup message
Alerting
The called user is being alerted
The same parameters as Call Proceeding
Progress sent by a called gateway
the Cause information – in-band tones
the User-to-User info. – same as Call-Proceeding
Digital Media Lab - Sharif University of Technology15
H.323 Call Establishment & Teardown (cont.)
Connect The called party has accepted the call
Must be sent if the call is to be completed
Call Proceeding and Alerting are optional
User-to-User information
The same as Call Proceeding
Plus Conference Identifier
The same as Setup
Release Complete
Terminate a call
No Release message
In ISDN, Release and Release Complete
Cause information element, optional
Otherwise, a Release reason in User-to-User
Facility (Q.932)
A call should be redirected
Also be used for supplementary services
User-to-User contains reason parameter
E.g., routeCallToGatekeeper
Digital Media Lab - Sharif University of Technology16
SIP - IETF Standard
Session Initiation Protocol (SIP)
SIP Elements: User Agent Client (UAC), User Agent Server (UAS)
Easy to locate users due to the flexibility in SIP to contact external location
servers to determine user or routing policies (url, email ID, e.g.
Server Types: Redirect Server, Proxy Server and Registrar
SIP Proxy: perform application layer routing of SIP requests and
responses.
SIP Registrar: UAC sends a registration message and the Registrar stores
registration information in a location service using a non-SIP protocol (E.g.
LDAP)
17Digital Media Lab - Sharif University of Technology
SIP…
SIP is
SIP is the core protocol for initiating, managing and terminating
sessions in the Internet
These sessions may be text, voice, video or a combination of these
SIP sessions involve one or more participants and can use unicast or
multicast communication.
An Application-layer control (signaling) protocol for creating, modifying and terminating sessions with one or more participants.
Sessions include Internet multimedia conferences, Internet telephone calls and multimedia distribution.
Members in a session can communicate via multicast or via a mesh of unicast relations, or a combination of these.
Digital Media Lab - Sharif University of Technology18
Where is SIP ?
Digital Media Lab - Sharif University of Technology19
Application
Transport
Network
Physical/Data LinkEthernet
IP
TCP UDP
RTSP SIP
SDP codecs
RTP DNS
SIP Basic Functionality
Supports 5 facets of communication:
User location: determination of the end system to be used for
communication;
User capabilities: determination of the media and media parameters to
be used;
User availability: determination of the willingness of the called party to
engage in communications;
Call setup: "ringing", establishment of call parameters at both called
and calling party;
Call handling: including transfer and termination of calls.
Digital Media Lab - Sharif University of Technology20
SIP Specifications
SIP Vulnerabilities
Proxy Impersonation
Message Tampering
Session Teardown
Spoofed BYEs
Denial of Service
Malformed packets
REGISTER and INVITE flooding
SIP Security Registration hijacking
Authenticate originators of requests
Proxy impersonation
Authenticate servers
Message tampering
Secure body and certain headers end-to-end
Session teardown
Authenticate sender of BYE
Confidentiality so attacker can’t learn To, From tags
Denial of Service
Authenticate and authorize registrations
Digital Media Lab - Sharif University of Technology21
More Detail in Appendix A
Comparison of H.323 and SIP
H.323 is another signaling protocol for real-time, interactive
H.323 is a complete, vertically integrated suite of protocols for multimedia conferencing: signaling, registration, admission control, transport, codecs
SIP is a single component. Works with RTP, but does not mandate it. Can be combined with other protocols, services
H.323 comes from the ITU (telephony).
SIP comes from IETF: Borrows much of its concepts from HTTP
SIP has Web flavor, whereas H.323 has telephony flavor.
More Detail in Appendix B
22Digital Media Lab - Sharif University of Technology
Session Description Protocol (SDP)
Multicast IP service discovery
• Multicast IP services are typically
organized into sessions
• Each session consists of one or
more media streams and exists
for a duration of time
• Problem - how to find out which
sessions are available and what are their parameters?
addresses, ports, media formats, keys, session times
• Solution - session announcements or invitations
Need for a description format
Need for a delivery mechanism
Digital Media Lab - Sharif University of Technology23
Session Description Protocol (SDP)
It is a protocol used to describe media objects and presentations
Usually, in multimedia streaming, SDP messages are sent in RTSP requests
A SDP message contains information about the session, the media streams
included in the session and information necessary to receive the media (e.g. IP
addresses, ports, formats etc.)
Applications
Setting up voice-over-IP calls.
Setting up multimedia conferences.
Event notification (subscribe / notify) IM and presence.
Text and general messaging.
Signaling transport.
Digital Media Lab - Sharif University of Technology24
Structure of an SDP description
Digital Media Lab - Sharif University of Technology25
•An SDP description uses a
textual notation describing the
parameters of a single
multimedia session
• Consists of a number of lines,
each of the format
<parameter type>=<value>
• Logically structured in three
sections
RTP/RTCP/RTSPReal-Time Protocols
Real-Time Protocol (RTP)
RTP provides end-to-end transport functions for real-time
applications Supports different payload types
All RTP and RTCP PDUs are sent to same multicast group (by all
participants)
All RTP PDUs sent to an even-numbered UDP port, 2p
All RTCP PDUs sent to UDP port 2p+1
RTP Does NOT:Define media data formats or encodings
Need media specific profiles
Handle connection setups or tear-downsNeed other protocols like SIP or H.323
Handle resource reservation Need other protocols like RSVP
Guarantee timely delivery or Quality of ServiceHowever, it does provide necessary data to application to order packets and
adjust signal quality
27Digital Media Lab - Sharif University of Technology
RTP Session
RTP session is sending and receiving of RTP data by a group of participants
For each participant, a session is a pair of transport addresses used to
communicate with the group
If multiple media types are communicated by the group, the transmission of
each medium constitutes a session.
28Digital Media Lab - Sharif University of Technology
Fig.7- Examples of RTP Session
RTP Synchronization Source
Synchronization source - each source of RTP PDUs, identified by a unique,
randomly chosen 32-bit ID (the SSRC)
A host generating multiple streams within a single RTP must use a different
SSRC per stream
29Digital Media Lab - Sharif University of Technology
Fig.8- Example of RTP Synchronization source
Some of the RTP Applications
Simple Multicast Audio Conference
Each participant uses two ports. One for audio data and the other for control
(RTCP) packets
Each participant sends audio data in small chunks of say 20 mS duration
A RTP header is added which contains the timing field that ensures that the
chunks of data are continuously played for every 20mS
Audio and Video Conference
Both audio and video are transmitted as two separate RTP sessions.
separate RTP and RTCP packets are transmitted for each medium using two
UDP port pairs and multicast addresses.
no direct coupling at the RTP level between the audio and video sessions
30Digital Media Lab - Sharif University of Technology
Mixers and Translators
Accommodate participant network resources
Mixer – Low Bandwidth
Mixer – Combining media streams
Translator – Forward RTP packets to private networks
Digital Media Lab - Sharif University of Technology31
Mixers and Translators (cont.)
RTP mixer - an intermediate system that receives & combines RTP PDUs of
one or more RTP sessions into a new RTP PDU
A mixer
may change the data format (coding) and combine the streams in any manner
Helps in re-synchronizing the incoming audio packets and forward it to the low speed
link.
Also combines several flows in a single new one appears as a new source
Will typically have to define synchronization relationships between streams =>
Sources that are mixed together become contributing sources (CSRC)
Mixer itself appears as a new source having a new SSRC
32Digital Media Lab - Sharif University of Technology
end system 1
end system 2
mixer end system 3from ES1: SSRC=6
from ES2: SSRC=23
from M: SSRC=52
CSRC list={6, 23}
Fig.9- Examples of RTP Mixer
Mixers and Translators (cont.)
Translator is an intermediate system that…
Connects two or more networks
Multicasting through a firewall
Modifies stream encoding, changing the stream’s timing
Transparent to participants
SSRC’s remain intact
Two translators are installed, on either side of the firewall, with the outside one tunneling all multicast
packets received through a secure connection to the translator inside the firewall.
Data may pass through the translator intact or may be encoded differently
The identity of individual flows remains intact
Example: going through a firewall:
end system 1
end system 2
transl.1from ES1: SSRC=6
from ES2: SSRC=23
transl.2from ES2: SSRC=23
from ES1: SSRC=6
authorized tunnel
Firewallfrom ES2: SSRC=23
from ES1: SSRC=6
Digital Media Lab - Sharif University of Technology
Fig.9- Examples of RTP Translator
33
RTP Control Protocol (RTCP)
RTCP responsible for periodic transmission of control packets
RTCP specifies report PDUs exchanged between sources and destinations of
multimedia information
receiver reception report
sender report
source description report
Reports contain statistics such as the number of
RTP-PDUs sent, number of RTP-PDUs lost,
inter-arrival jitter
Used by application to modify sender
transmission rates and for diagnostics purposes
34Digital Media Lab - Sharif University of Technology
RTP Control Protocol (RTCP) (cont.)
Functions
Feedback on the quality of data distribution
Permits everybody to evaluate the number of participants
Persistant transport-level canonical name for a source, CNAME
Usually: user@host
Will not change; even if SSRC does
Provides binding across multiple media tools for a sngle user
Distribution
use same distribution mechanisms as data packets
Underlying protocol should provide multiplexing
for data and control packets (in this case UDP)
multiple RTCP packets can be concatenated by translators/mixers
compound RTCP packet
Digital Media Lab - Sharif University of Technology35
RTCP bandwidth scaling
Solution
RTCP attempts to limit its traffic
to 5% of the session bandwidth
to ensure it can scale!
RTCP gives 75% of this rate to
the receivers; and the remaining
25% to the sender.
Example
Suppose one sender, sending video at
a rate of 2 Mbps. Then RTCP
attempts to limit its traffic to 100 Kbps.
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.
Problem
What happens when there is one sender
and many receivers?
RTCP reports scale linearly with the
number of participants and would
match or exceed the amount of RTP
data! More overhead than useful data!
36Digital Media Lab - Sharif University of Technology
Real-Time Streaming Protocol (RTSP)
Application layer protocol
(default port 554)
Usually runs on RTP for
stream & TCP for control
Provides the control
channel
Uses out-of-band
signaling
Usable for Live
broadcasts / multicast Also known as “Network
remote control” for multi-media servers.
37Digital Media Lab - Sharif University of Technology
web
browser
media player
Web Server
Web
Server/Media
serverRTSPpres. desc,streaming commands
RTP/RTCPaudio/video content
Presentation
descriptor
HTTPpresentation descriptor
RTSP Features
“Rough” synchronization (fine-grained)
Virtual presentations = synchronized playback from several servers
Load balancing using redirection at connect, during stream
Supports any session description
Device control camera pan, zoom, tilt
Caching: similar to HTTP
Application
Streaming of multi-media via Internet
Video conferencing & lectures.
Broadcasting of entertainment.
Remote digital editing
Voice mail
Digital Media Lab - Sharif University of Technology38
RTSP Limitations
Bandwidth: 64 – 128 kb/s for talking heads, 1.5Mb/s for movies
Quality: packet loss, predictability
Billing Infrastructure: pay-per-view?
Cheap Receivers: shouldn’t cost more than set-top box
Digital Media Lab - Sharif University of Technology39
RTSP Session
media server
RTSPserver
datasource
media player
AVsubsystem
RTSPclient
RTSP OK
RTSP PLAY
RTSP OK
RTP AUDIO
RTP VIDEO
RTSP TEARDOWN
RTSP OK
get UDP portchoose
UDP port
RTSP SETUP
Default port
554
RTCP
TCP
UDP
40Digital Media Lab - Sharif University of Technology
More Detail in Appendix C
RTSP Example
Digital Media Lab - Sharif University of Technology
41
SETUP
Specifies the transport mechanism to be used for the streamed media
Transport header specifies the transport parameters acceptable to the
client
Response contains transport parameters selected by the server
Server generates session identifiers in response to SETUP requests
Client can issue SETUP to change parameters for already streaming
media
42
PLAY
Tells server to start sending data via mechanism specified in SETUP
Plays from beginning to end of range specified
Pauses at end as if PAUSE has been issued
Requests may be pipelined
Range header can have time parameter
Legal to have PLAY without Range header
Scale header can be used to change viewing rate
Can be used for fast forward or rewind
43
PAUSE
Causes stream delivery to halt
Can pause entire presentation or selected stream
Server resources continue to be reserved
Server will terminate session after timeout period expires (specified in
SETUP)
Can contain Range header with one value to specify when to pause
Must fall in one of the PLAY ranges
44
TEARDOWN
Stops delivery of stream
Frees up resources on the server
Can stop single stream or entire presentation
Example
Client -> Server:
TEARDOWN rtsp://example.com/fizzle/foo RTSP/1.0
CSeq: 892
Session: 12345678
Server -> Client:
RTSP/1.0 200 OK
CSeq: 892
45
More Detail in Appendix D
Next Session
IP Multimedia Subsystem (IMS)
Digital Media Lab - Sharif University of Technology46
Appendix A
Digital Media Lab - Sharif University of Technology 47
SIP Commands
Digital Media Lab - Sharif University of Technology48
Method Description
INVITE A session is being requested to be setup using a specified media
ACK Message from client to indicate that a successful response to an INVITE has been received
OPTIONS A Query to a server about its capabilities
BYE A call is being released by either party
CANCEL Cancels any pending requests. Usually sent to a Proxy Server to cancel searches
REGISTER Used by client to register a particular address with the SIP server
Table 1 – SIP Commands
SIP Call Establishment & Teardown
Digital Media Lab - Sharif University of Technology49
A BProxy Proxy
(Registrar local services)
……. ……. …….
Register200 Ok
Register200 Ok
Invite100 Trying Invite
100 Trying Invite180 Ringing
180 Ringing180 Ringing
200 Ok200 Ok
200 Ok
AckMedia Session
Bye
200 Ok
An Example of SIP Message
Digital Media Lab - Sharif University of Technology50
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 167.180.112.24
From: sip:[email protected]
To: sip:[email protected]
Call-ID: [email protected]
Content-Type: application/sdp
Content-Length: 885
c=IN IP4 167.180.112.24
m=audio 38060 RTP/AVP 0
Notes:
HTTP message syntax
sdp = session description protocol
Call-ID is unique for every call.
• Here we don’t know
Bob’s IP address.
Intermediate SIP
servers will be
necessary.
• Alice sends and
receives SIP messages
using the SIP default
port number 506.
• Alice specifies in Via:
header that SIP client
sends and receives
SIP messages over UDP
SIP Request Example
Digital Media Lab - Sharif University of Technology51
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP host.wcom.com:5060
From: Alan Johnston <sip:[email protected]>
To: Jean Luc Picard <sip:[email protected]>
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: sip:[email protected]
Subject: Where are you these days?
Content-Type: application/sdp
Content-Length: 124
v=0
o=ajohnston 5462346 332134 IN IP4 host.wcom.com
s=Let's Talk
t=0 0
c=IN IP4 10.64.1.1
m=audio 49170 RTP/AVP 0 3
SIP Response Example
SIP/2.0 200 OK
Via: SIP/2.0/UDP host.wcom.com
From: Alan Johnston <sip:[email protected]>
To: Jean Luc Picard <sip:[email protected]>
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: sip:[email protected]
Subject: Where are you these days?
Content-Type: application/sdp
Content-Length: 107
v=0
o=picard 124333 67895 IN IP4 uunet.com
s=Engage!
t=0 0
c=IN IP4 11.234.2.1
m=audio 3456 RTP/AVP 0
Digital Media Lab - Sharif University of Technology52
SETUP Message
Client -> Server:
SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0
CSeq: 302
Transport: RTP/AVP;unicast;client_port=4588-4589
Server -> Client:
RTSP/1.0 200 OK
Cseq: 302
Date: 23 Jan 1997 15:35:06 GMT
Session: 47112344
Transport: RTP/AVP;unicast;
client_port=4588-4589;server_port=6256-6257
53From RFC 2326
PLAY Message
Client -> Server:
PLAY `rtsp://audio.example.com/twister.en RTSP/1.0
CSeq: 833
Session: 12345678
Range: smpte=0:10:20-;time=19970123T153600Z
Server -> Client:
RTSP/1.0 200 OK
CSeq: 833
Date: 23 Jan 1997 15:35:06 GMT
Range: smpte=0:10:22-;time=19970123T153600Z
54From RFC 2326
Appendix B
Digital Media Lab - Sharif University of Technology 55
Comparison of
H.323 and SIP (cont.)
56Digital Media Lab - Sharif University of Technology
H.323 Call Establishment & Teardown
Digital Media Lab - Sharif University of Technology57
a. Call with GKs and Direct-
Endpoint Call Signaling
Fig.6- Examples of H.323 Call Establishment
b. Gatekeeper routed/direct-
endpoint call signaling
Digital Media Lab - Sharif University of Technology58
Appendix C
RTCP Packet Type
SR: Sender report, for transmission and
reception statistics from participants that
are active senders
Carry statistics from the active senders
Digital Media Lab - Sharif University of Technology59
RR: Receiver-report, for transmission and
reception statistics from participants that
are active receivers
Carry statistics from the active receivers
Fig.10- RTCP Receiver Report Format
Fig.11- RTCP Sender Report Format
RTCP Packet Type (cont.)
SDES: Source Description packet
Allow the binding of SSRC value with an actual identification of the user.
End points need to send an SDES packet at the beginning of the session
BYE: ends a user’s participation in a call.
APP: Application-specific RTP packet.
Digital Media Lab - Sharif University of Technology60
RTSP Commands
OPTIONSC S
determine capabilities of server/clientC S
DESCRIBE C S get description of media stream
ANNOUNCE C S announce new session description
SETUP C S create media session
RECORD C S start media recording
PLAY C S start media delivery
PAUSE C S pause media delivery
REDIRECT C S redirection to another server
TEARDOWN C S immediate teardown
SET_PARAMETER C S change server/client parameter
GET_PARAMETER C S read server/client parameter
61Digital Media Lab - Sharif University of Technology
Digital Media Lab - Sharif University of Technology 62
Appendix D
RTSP Message sequence
C
W
V
A
C->V : SETUP rtsp://video.example.com/twister/video.en RTSP/1.0
Cseq:1
Transport : RTP/AVP/UDP;unicast;client_port=3058-3059
A-> C : RTSP/1.0 200 OK
Cseq:1
Session: 23456789
Transport : RTP/AVP/UDP;unicast;client_port=3058-3059
server_port=5002-5003
C -> W : GET/Twister.sdp HTTP/1.1
Host: www.example.com
Accept: application/sdp
W-> C : HTTP/1.0 200 OK
Content-Type: application/sdp
C-> A : SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0
Cseq:1
Transport : RTP/AVP/UDP;unicast;client_port=3056-3057
A-> C : RTSP/1.0 200 OK
Cseq:1
Session: 12345678
Transport : RTP/AVP/UDP;unicast;client_port=3056-3057
server_port=5000-5001
63
Digital Media Lab - Sharif University of Technology
RTSP Message sequence (cont.)
C
W
V
A
C->V: PLAY rtsp://video.example.com/twister/video RTSP/1.0
Cseq: 2
Session: 23456789
V->C: RTSP/1.0 200 OK
Cseq: 2
Session: 23456789
RTP-Info: url=rtsp://video.example.com/twister/video;
seq=12312232;
C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0
Cseq: 2
Session: 12345678
A->C: RTSP/1.0 200 OK
Cseq: 2
Session: 12345678
RTP-Info: url=rtsp://audio.example.com/twister/audio.en;
seq=876655;
64Digital Media Lab - Sharif University of Technology
RTSP Message sequence (contd.)
C
W
V
A
C->A: TEARDOWN rtsp://audio.example.com/twister/audio.en RTSP/1.0
Cseq: 3
Session: 12345678
A->C: RTSP/1.0 200 OK
Cseq: 3
C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0
Cseq: 3
Session: 23456789
V->C: RTSP/1.0 200 OK
Cseq: 3
65Digital Media Lab - Sharif University of Technology