SDP (Session Description Protocol) is as good as saying like how I am reachable & what all we can use to communicate with each other. To compare it with real life analogy, let’s say someone want to reach us. We will share our contact information such as email, phone number, facebook id, home address, etc.. Additionally we will also let them know that when you reach out to us please note I/we can only talk in English. It’s like sharing your business card with someone.
Following above analogy when we want to establish a VOIP call. We also need to have a digital business card that holds the contact information of caller and calle. This will contain info such as
- Caller and callee IP addresses
- Media types do both peer support (Audio, video, screen share, etc.)
- Which codec types both peer supports
In the telecommunication world, we called this digital business card Session Description Protocol (SDP). SDP contains the required information to peers talk to each other.
Below is a two sample SDP snippet with few fields along with their values.
Below is the Description of the fields we will see in SDP offer:
Field Name | Description |
---|---|
v= | Protocol version |
o= | Originator (username, session ID, version number) |
s= | Session name |
i= | Session information (more descriptive information) |
u= | URI of the session |
e= | Email address of the session originator |
p= | Phone number of the session originator |
c= | Connection information (network addresses and ports) |
b= | Bandwidth information (for media streams) |
t= | Session timing (start and stop times) |
r= | Repeat times for a session |
z= | Time zone adjustment for a session |
k= | Encryption key information |
a= | Session attribute (further information about the session) |
m= | Media description (type, port number, transport protocol, and format) |
i=* | Media title (for media streams) |
a=rtpmap: | RTP payload type mapping |
a=rtcp: | RTCP port information |
a=ptime: | Packet time interval for audio |
a=maxptime: | Maximum packet time interval for audio |
a=sendrecv | Media direction (send and receive) |
a=sendonly | Media direction (send only) |
a=recvonly | Media direction (receive only) |
a=inactive | Media direction (inactive) |
a=ssrc | synchronization source (SSRC) identifier for a particular RTP stream. |
a=ssrc-group: | Grouping of synchronization source identifiers |
a=mid: | Identification tag for a media source |
a=msid: | Identification tag for a “media stream” within a “media source” |
a=ssrc-msid: | Association of a synchronization source identifier with a “media stream” within a “media source” |
a=ice-ufrag: | ICE username fragment |
a=ice-pwd: | ICE password |
a=ice-options: | ICE options |
a=fingerprint: | Transport layer security fingerprint (for SRTP) |
a=candidate: | ICE candidate (network address and port) |
a=end-of-candidates | Indicates the end of ICE candidates |
a=setup: | Offer/Answer negotiation (who will initiate the connection) |
a=connection-info: | Connection information for a DTLS connection |
a=rtcp-mux: | RTCP multiplexing |
a=rtcp-rsize: | RTCP reduced size |
a=rtcp-fb: | RTCP feedback message |
a=rtpport: | Preferred RTP port |
a=rtcpport: | Preferred RTCP port |
a=rtcp-mux-only | RTCP multiplexing (no separate RTCP port) |
a=rtcp-rsize | RTCP reduced size |
a=content: | Identification of the content type |
a=label: | Media stream label |
a=msid-semantic: | Semantics of the media stream identification |
a=ssrc-semantic: | Semantics of the synchronization source identification |
a=rid: | Identification tag for a temporal layer in a simulcast or scalable video stream |
a=simulcast-03: | Simulcast configuration using Simulcast 0.3 |
a=framerate: | Frame rate of the video stream |
a=imageattr: | Image attributes for the video stream |
a=content-type: | Content type of the media stream |
a=charset: | Character encoding for text in the media stream |
a=lang: | Language of the media stream |
a=extmap: | Signaling of RTP header extensions |
a=encrypt: | Media encryption |
a=crypto: | Obsolete media encryption |
a=setup: | Indicates which peer should initiate the connection |
a=source-filter: | Filter RTP streams based on source IP address and port |
a=ssrc-group: | Grouping of synchronization sources |
a=sctpmap: | Mapping of SCTP parameters to DTLS parameters |
a=max-message-size: | Maximum message size for SCTP |
a=sctp-port: | Port number for SCTP |
a=x-google-flag: | Google-specific flags |
a=x-google-start-bitrate: | Starting bitrate for the video stream |