What is Session Description Protocol (SDP)

SDP (Session Description Protocol)

The Session Description Protocol (SDP) is a text-based protocol used to
describe multimedia sessions. It is commonly used in conjunction with
signaling protocols like SIP (Session Initiation Protocol) and WebRTC
(Web Real-Time Communication) to negotiate and establish multimedia sessions
over the internet.

An SDP message contains information about a multimedia session, including the
session name, media type, transport protocol, network addresses, codecs, and
other session parameters. The structure of an SDP message consists of a series
of fields, each of which contains a specific type of information.

Here's an overview of some of the key fields in an SDP message:

  1. Session Name (s=): The name or title of the session being described.
  2. Session Information (i=): A description of the session.
  3. Time Description (t=): The start and end times of the session.
  4. Media Descriptions (m=): Information about each media type (such as audio,
    video, or data) included in the session, including the transport protocol,
    network addresses, and codecs used.
  5. Connection Data (c=): Information about the network connection for the
    session, including the IP address and port number.
  6. Bandwidth (b=): Information about the bandwidth available for the session.
  7. Attribute (a=): Miscellaneous session parameters, such as encryption keys,
    packetization rules, and other session-specific data.

SDP is a flexible and extensible protocol that can be used to describe a
wide range of multimedia sessions. It is used by a variety of applications
and services, including VoIP, video conferencing, streaming media, and
gaming. By providing a standardized way to describe multimedia sessions, SDP
helps to ensure interoperability between different devices and platforms.

Here is an example of  a SDP (session description protocol) packet:

v=0
o=- 20518 0 IN IP4 203.0.113.1
s=Example SDP
t=0 0
a=ice-ufrag:8hhy
a=ice-pwd:22f56wty
m=audio
60320 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101
telephone-event/8000
a=fmtp:101 0-16
a=candidate:1 1 UDP
2130706431 203.0.113.1 60320 typ host
a=candidate:2 1 UDP 2130706431
203.0.113.1 60320 typ srflx raddr 10.0.0.2 rport 60320
a=ice-options:google-ice 

This SDP packet contains information about an audio session, including the
version number (v = 0), originator (
o=- 20518 0 IN IP4 203.0.113.1 ), session name (s=Example SDP), timing (t= 0 0), ICE username fragment
(a=ice-ufrag:8hhy) ICE password (a=ice-pwd:22f56wty),
media description (m=audio 60320 RTP/AVP 0 101), RTP mapping (a=rtpmap:0 PCMU/8000), event mapping (a=rtpmap:101 telephone-event/8000), event format
(a=fmtp:101 0-16), candidate information for ICE (a=candidate:1 1 UDP 2130706431 203.0.113.1 60320 typ host and
a=candidate:2 1 UDP 2130706431 203.0.113.1 60320 typ srflx raddr 10.0.0.2
rport 60320
), and ICE options (a=ice-options:google-ice).

SDP packets are used in WebRTC and other real-time communication protocols
to negotiate session parameters between peers.

Share this Post

Leave a Reply

Your email address will not be published. Required fields are marked *