SDP (Session Description Protocol) Reference
Reference for SDP format used for multimedia session description in WebRTC and SIP.
Format Structure
SDP (RFC 8866) is a text-based format with lines of key=value pairs. Required fields: version (v=), origin (o=), session name (s=), timing (t=). Media descriptions start with m= lines followed by attribute (a=) lines. The origin field includes username, session ID, version, net type, addr type, and address. Attributes carry codec, payload type, and direction info. SDP is used in SIP/SDP offer/answer and WebRTC.
- v=
- Protocol version
- m=
- Media description
- a=
- Attributes
v=0 m=audio 5004 RTP/AVP 0 a=rtpmap:0 PCMU/8000 WebRTC Usage
WebRTC uses SDP for offer/answer exchange of media capabilities. The SDP includes ICE candidates, DTLS fingerprints, and SSRCs. Codec preferences are expressed in rtpmap and rtcp-fb attributes. The m= line indicates media type, port, protocol, and payload types. SDP munging (direct modification) is deprecated in favor of WebRTC APIs. BUNDLE groups multiple media into one transport. SDP is verbose but human-readable for debugging.
- offer/answer
- Capability exchange
- ICE candidates
- In SDP or trickled
- BUNDLE
- Single transport
WebRTC, SIP a=candidate lines a=group:BUNDLE