Real-time multimedia applications rely on RTP, RTCP, and SIP for transport, feedback, and signalling.
Real-Time Transport Protocol (RTP)
RTP standardizes the packet structure for delivering real-time data such as audio and video over network transport.
- RTP runs in end systems and is encapsulated directly inside UDP segments.
- It extends UDP by adding payload identification, sequence numbers, and sampling timestamps.
+-------------------+-------------------+-------------------+-----------------------+
| IP Header (20 B) | UDP Header (8 B) | RTP Header (12 B) | Audio/Video Payload |
+-------------------+-------------------+-------------------+-----------------------+
RTP Header Fields
The fixed 12-byte RTP header:
0 | 4 | 8 | 16 | 32 | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
V | P | X | CC | M | PT | Sequence Number | |||||||||||||||||||||||||
Timestamp | |||||||||||||||||||||||||||||||
Synchronization Source (SSRC) Identifier | |||||||||||||||||||||||||||||||
- Payload Type (7 bits): Identifies the audio/video encoding format.
0: PCM -law ()3: GSM ()7: LPC ()26: Motion JPEG31: H.26133: MPEG2 Video
- Sequence Number (16 bits): Increments by for each RTP packet sent. Detects loss and restores order.
- Timestamp (32 bits): Sampling instant of the first RTP payload byte. Supports jitter removal and playout synchronisation.
- For audio, the timestamp clock increments by every . A chunk increases the timestamp by .
- SSRC (32 bits): Identifies the RTP source within a session. Each stream in RTP session has distinct SSRC.
Real-Time Control Protocol (RTCP)
RTCP works in conjunction with RTP. While RTP delivers media data, RTCP transmits out-of-band control packets periodically to all participants in an RTP session.
- RTP and RTCP use adjacent port numbers (e.g., RTP on UDP port , RTCP on UDP port ).
Key RTCP Packet Types
- Receiver Report (RR): Sent by receivers; reports loss and jitter statistics.
- Sender Report (SR): SSRC, wall-clock time, RTP timestamp, packet count, and byte count.
- Source Description (SDES): Source metadata such as
email address,sender's name,SSRC.
Stream Synchronization (Lip Sync)
In a video conference, separate RTP streams are generated for audio and video, each driven by its own sampling clock.
RTCP Sender Reports map media RTP timestamps to wall-clock time. Receivers use the mapping to align independent streams.
RTCP Bandwidth Scaling
RTCP limits control traffic to 5% of session bandwidth. Eg: For sending video at session, RTCP traffic is limited to .
- 75% of RTCP bandwidth
Shared by receivers. - 25% of RTCP bandwidth
Reserved for active senders.
Each participant dynamically computes its RTCP transmission interval by dividing the average RTCP packet size by its allocated control bandwidth rate.
Session Initiation Protocol (SIP)
SIP is an application-layer signaling protocol designed by the IETF (Internet Engineering Task Force) for creating, modifying, and terminating multimedia sessions over IP networks.
Core Functions of SIP
- Address resolution: Maps SIP URIs to current IP addresses.
- Media capability negotiation: Agrees on codecs and media parameters using SDP (Session Description Protocol).
- Session management: Supports setup, rejection, hold, transfer, and new media streams.
Basic Call Setup Scenario
When Alice (167.180.112.24) calls Bob (193.64.210.89), the signaling and media flow look like this:
- INVITE: Alice supplies her media address, port, and codec.
- 200 OK: Bob returns his media address, port, and codec.
- ACK: Alice confirms setup.
- Data transfer: Endpoints exchange RTP media.
SIP Server Architecture
In real-world networks, users move between addresses and networks, so SIP needs servers that can locate and route calls.
- SIP Registrar
Keeps track of where users are currently reachable and returns their current address when asked. - SIP Proxy
Receives the call, queries the registrar, and forwards the request to the callee.
SIP vs. H.323
H.323 is another signaling/communication protocol suite for real-time multimedia communication.
| Feature | SIP (Session Initiation Protocol) | H.323 |
|---|---|---|
| Standardization body | IETF | ITU-T |
| Design philosophy | Modular; follows KISS (Keep It Simple Stupid). | Complete, vertically integrated suite. |
| Syntax | Text-based HTTP-like syntax. | Binary ASN.1 encoding. |
| Flexibility | Combines with web protocols and generic transport. | Rigid admission and control state machines. |