What is SDP – Session Description Protocol?

SDP is the abbreviation for for Session Description Protocol. The Session Description Protocol defines a standard for defining the parameters for the exchange of media (often streaming media) between two (typically) endpoints. It has been published by the IETF as RFC 4566.The SDP is typically embedded or encapsulated within another protocol, with the most widely-used application being inside of the SIP protocol inside most IP Telephony applications. In simple terms, the SDP protocol is a declaration, by a media endpoint, of its receiving specifications and capabilities; a typical declaration would tell us:

  • which IP Address is prepared to receive the incoming media stream
  • which port number is listening for the incoming media stream
  • what media type the endpoint is expecting to receive (typically audio)
  • which protocol the endpoint is expecting to exchange information in (typically RTP)
  • which compression encoding the endpoint is capable of decoding (codec)

…and possibly more. In a typical session setup process, we would see two endpoints participating in a session, where each of the endpoints sends an SDP to inform the other endpoint of its specifications and capabilities. SDP does not in itself deliver any media, but simply limits itself to the negotiation of a compatible set of media exchange parameters; the media streams themselves are handled by a different channel and protocol. Looking at this simple example:

v=0
o=MyStreamer 2398026505 2307593197 IN IP4 10.20.30.40
s=MyStreamer Audio Session
c=IN IP4 10.11.12.13
t=0 0
m=audio 15010 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

… we can see that the endpoint is declaring that it wishes to receive media

  • on IP Address 10.11.12.13 (the “c=” parameter)
  • on port number 15010 (declared in the “m=” parameter)
  • of type audio (declared in the “m=” parameter)
  • via protocol RTP, with 2 possible codecs numbered 0 and 101 respectively, where:
    • codec 0 is defined as PCMU at 8000hz
    • codec 101 is defined as “telephone-event” at 8000Hz (telephone-event is effectively a DTMF tone)
    • in bi-directional mode (“a=sendrecv”)

Further Reading

RFC 4566
What is SIP?