What Is SDP?
What is SDP – Session Description Protocol?
SDP (Session Description Protocol) defines the format used by endpoints to declare how they can send and receive media. It’s published by the IETF as RFC 4566 and is most often used inside SIP messages in IP telephony. SDP doesn’t carry media—it simply describes what each side can handle: what type, where to send it, and in what format. A typical SDP declaration includes:
- 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.
This SDP tells us the endpoint expects audio on 10.11.12.13:15010 via RTP using PCMU or DTMF tones.
- 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”)