RFC 4566

SDP: Session Description Protocol

๐Ÿ“… published July 2006, from ietf

RFC 4566: SDP, Session Description Protocol ๐Ÿ’–

okay bestie, let's get into it ๐Ÿงš RFC 4566 is the one that defines SDP (Session Description Protocol). It was written by M. Handley (UCL), V. Jacobson (Packet Design), and C. Perkins (University of Glasgow). It's a Standards Track doc from July 2006, and it obsoletes RFC 2327 and RFC 3266 ๐Ÿซถ


Status of This Memo โœจ

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. ๐Ÿ“ฎ

Copyright (C) The Internet Society (2006).

Abstract ๐ŸŒธ

This memo defines the Session Description Protocol (SDP). SDP is intended for describing multimedia sessions for the purposes of session announcement, session invitation, and other forms of multimedia session initiation. It's giving "all the details, one format" ๐Ÿ’…

Table of Contents ๐Ÿ“š

1. Introduction ....................................................3
2. Glossary of Terms ...............................................3
3. Examples of SDP Usage ...........................................4
   3.1. Session Initiation .........................................4
   3.2. Streaming Media ............................................4
   3.3. Email and the World Wide Web ...............................4
   3.4. Multicast Session Announcement .............................4
4. Requirements and Recommendations ................................5
   4.1. Media and Transport Information ............................6
   4.2. Timing Information .........................................6
   4.3. Private Sessions ...........................................7
   4.4. Obtaining Further Information about a Session ..............7
   4.5. Categorisation .............................................7
   4.6. Internationalisation .......................................7

5. SDP Specification ...............................................7
   5.1. Protocol Version ("v=") ...................................10
   5.2. Origin ("o=") .............................................11
   5.3. Session Name ("s=") .......................................12
   5.4. Session Information ("i=") ................................12
   5.5. URI ("u=") ................................................13
   5.6. Email Address and Phone Number ("e=" and "p=") ............13
   5.7. Connection Data ("c=") ....................................14
   5.8. Bandwidth ("b=") ..........................................16
   5.9. Timing ("t=") .............................................17
   5.10. Repeat Times ("r=") ......................................18
   5.11. Time Zones ("z=") ........................................19
   5.12. Encryption Keys ("k=") ...................................19
   5.13. Attributes ("a=") ........................................21
   5.14. Media Descriptions ("m=") ................................22
6. SDP Attributes .................................................24
7. Security Considerations ........................................31
8. IANA Considerations ............................................33
   8.1. The "application/sdp" Media Type ..........................33
   8.2. Registration of Parameters ................................34
        8.2.1. Media Types ("media") ..............................34
        8.2.2. Transport Protocols ("proto") ......................34
        8.2.3. Media Formats ("fmt") ..............................35
        8.2.4. Attribute Names ("att-field") ......................36
        8.2.5. Bandwidth Specifiers ("bwtype") ....................37
        8.2.6. Network Types ("nettype") ..........................37
        8.2.7. Address Types ("addrtype") .........................38
        8.2.8. Registration Procedure .............................38
   8.3. Encryption Key Access Methods .............................39
9. SDP Grammar ....................................................39
10. Summary of Changes from RFC 2327 ..............................44
11. Acknowledgements ..............................................45
12. References ....................................................45
   12.1. Normative References .....................................45
   12.2. Informative References ...................................46

1. Introduction ๐Ÿฆ‹

When initiating multimedia teleconferences, voice-over-IP calls, streaming video, or other sessions, there is a requirement to convey media details, transport addresses, and other session description metadata to the participants. Main character energy for sure ๐ŸŽฌ

SDP provides a standard representation for such information, irrespective of how that information is transported. SDP is purely a format for session description -- it does not incorporate a transport protocol, and it is intended to use different transport protocols as appropriate, including the Session Announcement Protocol [14], Session Initiation Protocol [15], Real Time Streaming Protocol [16], electronic mail using the MIME extensions, and the Hypertext Transport Protocol. It's the format, not the delivery truck ๐Ÿšš

SDP is intended to be general purpose so that it can be used in a wide range of network environments and applications. However, it is not intended to support negotiation of session content or media encodings: this is viewed as outside the scope of session description. So SDP isn't doing the negotiating, bestie ๐Ÿ™…โ€โ™€๏ธ

This memo obsoletes RFC 2327 [6] and RFC 3266 [10]. Section 10 outlines the changes introduced in this memo. โœจ

2. Glossary of Terms ๐Ÿ“–

The following terms are used in this document and have specific meaning within the context of this document. Here's the vocab, don't mix it up ๐Ÿง 

  • Conference: A multimedia conference is a set of two or more communicating users along with the software they are using to communicate.
  • Session: A multimedia session is a set of multimedia senders and receivers and the data streams flowing from senders to receivers. A multimedia conference is an example of a multimedia session.
  • Session Description: A well-defined format for conveying sufficient information to discover and participate in a multimedia session.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [3]. These are the strict-rule words, so read them carefully ๐Ÿ”ฅ

3. Examples of SDP Usage ๐ŸŒˆ

3.1. Session Initiation

The Session Initiation Protocol (SIP) [15] is an application-layer control protocol for creating, modifying, and terminating sessions such as Internet multimedia conferences, Internet telephone calls, and multimedia distribution. The SIP messages used to create sessions carry session descriptions that allow participants to agree on a set of compatible media types. These session descriptions are commonly formatted using SDP. When used with SIP, the offer/answer model [17] provides a limited framework for negotiation using SDP. So SIP is the one doing the vibe check with SDP ๐Ÿ“ž

3.2. Streaming Media

The Real Time Streaming Protocol (RTSP) [16], is an application-level protocol for control over the delivery of data with real-time properties. RTSP provides an extensible framework to enable controlled, on-demand delivery of real-time data, such as audio and video. An RTSP client and server negotiate an appropriate set of parameters for media delivery, partially using SDP syntax to describe those parameters. Streaming hits different when the parameters are described this clearly ๐ŸŽฅ

3.3. Email and the World Wide Web

Alternative means of conveying session descriptions include electronic mail and the World Wide Web (WWW). For both email and WWW distribution, the media type "application/sdp" is used. This enables the automatic launching of applications for participation in the session from the WWW client or mail reader in a standard manner. ๐Ÿ’Œ

Note that announcements of multicast sessions made only via email or the WWW do not have the property that the receiver of a session announcement can necessarily receive the session because the multicast sessions may be restricted in scope, and access to the WWW server or reception of email is possible outside this scope. So just because you got the invite doesn't mean you can actually get into the session ๐Ÿ™ˆ

3.4. Multicast Session Announcement

In order to assist the advertisement of multicast multimedia conferences and other multicast sessions, and to communicate the relevant session setup information to prospective participants, a distributed session directory may be used. An instance of such a session directory periodically sends packets containing a description of the session to a well-known multicast group. These advertisements are received by other session directories such that potential remote participants can use the session description to start the tools required to participate in the session. ๐Ÿ“ฃ

One protocol used to implement such a distributed directory is the Session Announcement Protocol (SAP) [14]. SDP provides the recommended session description format for such session announcements. ๐Ÿ“

4. Requirements and Recommendations ๐Ÿ’œ

The purpose of SDP is to convey information about media streams in multimedia sessions to allow the recipients of a session description to participate in the session. SDP is primarily intended for use in an internetwork, although it is sufficiently general that it can describe conferences in other network environments. Media streams can be many-to-many. Sessions need not be continually active. โœจ

Thus far, multicast-based sessions on the Internet have differed from many other forms of conferencing in that anyone receiving the traffic can join the session (unless the session traffic is encrypted). In such an environment, SDP serves two primary purposes. It is a means to communicate the existence of a session, and it is a means to convey sufficient information to enable joining and participating in the session. In a unicast environment, only the latter purpose is likely to be relevant. Two jobs, one format ๐Ÿงš

An SDP session description includes the following:

  • Session name and purpose
  • Time(s) the session is active
  • The media comprising the session
  • Information needed to receive those media (addresses, ports, formats, etc.)

As resources necessary to participate in a session may be limited, some additional information may also be desirable:

  • Information about the bandwidth to be used by the session
  • Contact information for the person responsible for the session

In general, SDP must convey sufficient information to enable applications to join a session (with the possible exception of encryption keys) and to announce the resources to be used to any non-participants that may need to know. (This latter feature is primarily useful when SDP is used with a multicast session announcement protocol.) Everyone who needs the info gets the info, no drama ๐Ÿซถ

4.1. Media and Transport Information ๐ŸŽ€

okay so an SDP session description includes this media info:

  • The type of media (video, audio, etc.)
  • The transport protocol (RTP/UDP/IP, H.320, etc.)
  • The format of the media (H.261 video, MPEG video, etc.)

besides media format and transport protocol, SDP also conveys address and port details. for an IP multicast session, that's:

  • The multicast group address for media
  • The transport port for media

this address and port are the destination address and destination port of the multicast stream, whether it's being sent, received, or both ๐Ÿ“ก

for unicast IP sessions, these get conveyed:

  • The remote address for media
  • The remote transport port for media

the meaning of this address and port depends on the media and transport protocol being used. by default, this SHOULD be the remote address and remote port that data gets sent to ๐Ÿ’Œ some media types may redefine this behaviour, but that is NOT RECOMMENDED, bestie, because it makes implementations way more complicated (including middleboxes, which have to parse the addresses to open Network Address Translation (NAT) or firewall pinholes) ๐Ÿ™ˆ

4.2. Timing Information โฐ

sessions may be bounded or unbounded in time. whether or not they're bounded, they may only be active at specific times. SDP can convey:

  • An arbitrary list of start and stop times bounding the session
  • For each bound, repeat times such as "every Wednesday at 10am for one hour"

this timing info is globally consistent, no matter the local time zone or daylight saving time (see Section 5.9) ๐ŸŒโœจ

4.3. Private Sessions ๐Ÿ”’

it's possible to create both public and private sessions. SDP itself doesn't tell them apart. private sessions are typically conveyed by encrypting the session description during distribution. the details of how encryption is performed depend on the mechanism used to convey SDP. mechanisms are currently defined for SDP transported using SAP [14] and SIP [15], and others may be defined in the future ๐Ÿงš

if a session announcement is private, it's possible to use that private announcement to convey the encryption keys needed to decode each of the media in a conference, including enough information to know which encryption scheme is used for each media ๐Ÿ”๐Ÿ’œ

4.4. Obtaining Further Information about a Session ๐Ÿ“š

a session description should convey enough information to decide whether or not to participate in a session. SDP may include additional pointers in the form of Uniform Resource Identifiers (URIs) for more information about the session ๐ŸŒธ

4.5. Categorisation ๐Ÿ—‚๏ธ

when many session descriptions are being distributed by SAP, or any other advertisement mechanism, it may be desirable to filter the session announcements you're interested in from the ones you're not. SDP supports a categorisation mechanism for sessions that is capable of being automated (the a=cat: attribute; see Section 6) ๐Ÿฆ‹

4.6. Internationalisation ๐ŸŒˆ

the SDP specification recommends the use of the ISO 10646 character sets in the UTF-8 encoding [5] so that many different languages can be represented. however, to help with compact representations, SDP also allows other character sets, such as ISO 8859-1, to be used when desired. internationalisation only applies to free-text fields (session name and background information), and not to SDP as a whole ๐Ÿ’…

5. SDP Specification ๐Ÿ“œ

an SDP session description is denoted by the media type application/sdp (See Section 8) ๐Ÿ’–

an SDP session description is entirely textual, using the ISO 10646 character set in UTF-8 encoding. SDP field names and attribute names use only the US-ASCII subset of UTF-8, but textual fields and attribute values MAY use the full ISO 10646 character set. field and attribute values that use the full UTF-8 character set are never directly compared, so there's no requirement for UTF-8 normalisation.

the textual form, as opposed to a binary encoding such as ASN.1 or XDR, was chosen for portability, to enable a variety of transports to be used, and to allow flexible, text-based toolkits to be used to generate and process session descriptions. however, since SDP may be used in environments where the maximum permissible size of a session description is limited, the encoding is deliberately compact ๐ŸŽ€

also, since announcements may be transported via very unreliable means or damaged by an intermediate caching server, the encoding was designed with strict order and formatting rules, so that most errors would result in malformed session announcements that could be detected easily and discarded. this also allows rapid discarding of encrypted session announcements for which a receiver does not have the correct key ๐Ÿซถ

an SDP session description consists of a number of lines of text of the form:

<type>=<value>

where <type> MUST be exactly one case-significant character and <value> is structured text whose format depends on <type>. in general, <value> is either a number of fields delimited by a single space character or a free format string, and is case-significant unless a specific field defines otherwise. Whitespace MUST NOT be used on either side of the "=" sign ๐Ÿ™…โ€โ™€๏ธ

an SDP session description consists of a session-level section followed by zero or more media-level sections. the session-level part starts with a "v=" line and continues to the first media-level section. each media-level section starts with an "m=" line and continues to the next media-level section or the end of the whole session description. in general, session-level values are the default for all media unless overridden by an equivalent media-level value ๐Ÿ‘‘

some lines in each description are REQUIRED and some are OPTIONAL, but all MUST appear in exactly the order given here (the fixed order greatly enhances error detection and allows for a simple parser). OPTIONAL items are marked with a "*" โœจ

Session description
   v=  (protocol version)
   o=  (originator and session identifier)
   s=  (session name)
   i=* (session information)
   u=* (URI of description)
   e=* (email address)
   p=* (phone number)
   c=* (connection information -- not required if included in
        all media)
   b=* (zero or more bandwidth information lines)
   One or more time descriptions ("t=" and "r=" lines; see below)
   z=* (time zone adjustments)
   k=* (encryption key)
   a=* (zero or more session attribute lines)
   Zero or more media descriptions

Time description
   t=  (time the session is active)
   r=* (zero or more repeat times)

Media description, if present
   m=  (media name and transport address)
   i=* (media title)
   c=* (connection information -- optional if included at
        session level)
   b=* (zero or more bandwidth information lines)
   k=* (encryption key)
   a=* (zero or more media attribute lines)

the set of type letters is deliberately small and not intended to be extensible -- an SDP parser MUST completely ignore any session description that contains a type letter that it does not understand. the attribute mechanism ("a=" described below) is the primary means for extending SDP and tailoring it to particular applications or media. some attributes (the ones listed in Section 6 of this memo) have a defined meaning, but others may be added on an application-, media-, or session-specific basis. an SDP parser MUST ignore any attribute it doesn't understand ๐Ÿง 

an SDP session description may contain URIs that reference external content in the "u=", "k=", and "a=" lines. these URIs may be dereferenced in some cases, making the session description non-self-contained ๐Ÿ”—

the connection ("c=") and attribute ("a=") information in the session-level section applies to all the media of that session, unless overridden by connection information or an attribute of the same name in the media description. for instance, in the example below, each media behaves as if it were given a "recvonly" attribute ๐Ÿ“

an example SDP description is:

v=0
o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.example.com/seminars/sdp.pdf
e=j.doe@example.com (Jane Doe)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
a=recvonly
m=audio 49170 RTP/AVP 0
m=video 51372 RTP/AVP 99
a=rtpmap:99 h263-1998/90000

text fields such as the session name and information are octet strings that may contain any octet with the exceptions of 0x00 (Nul), 0x0a (ASCII newline), and 0x0d (ASCII carriage return). the sequence CRLF (0x0d0a) is used to end a record, although parsers SHOULD be tolerant and also accept records terminated with a single newline character. if the "a=charset" attribute is not present, these octet strings MUST be interpreted as containing ISO-10646 characters in UTF-8 encoding (the presence of the "a=charset" attribute may force some fields to be interpreted differently) ๐ŸŒบ

a session description can contain domain names in the "o=", "u=", "e=", "c=", and "a=" lines. any domain name used in SDP MUST comply with [1], [2]. internationalised domain names (IDNs) MUST be represented using the ASCII Compatible Encoding (ACE) form defined in [11] and MUST NOT be directly represented in UTF-8 or any other encoding. this requirement is for compatibility with RFC 2327 and other SDP-related standards, which predate the development of internationalised domain names ๐Ÿฆ„

5.1. Protocol Version ("v=") ๐Ÿ’ซ

v=0

the "v=" field gives the version of the Session Description Protocol. this memo defines version 0. there is no minor version number ๐ŸŒŸ

5.2. Origin ("o=") โœจ

Okay, the o= line is the originator's ID card ๐Ÿชช. It tells everyone who started the session (her username and her host's address), plus a session ID and a version number:

o=<username> <sess-id> <sess-version> <nettype> <addrtype>
  <unicast-address>
  • <username> is the user's login on the originating host, or it's - if that host doesn't do user IDs. The <username> MUST NOT contain spaces. ๐Ÿ™…โ€โ™€๏ธ
  • <sess-id> is a numeric string. Together with <username>, <nettype>, <addrtype>, and <unicast-address>, it makes a globally unique ID for the session. The creating tool gets to pick how it allocates these, but people have suggested using a Network Time Protocol (NTP) format timestamp so it stays unique [13]. ๐Ÿ•ฐ๏ธ
  • <sess-version> is the version number for this session description. The creating tool decides how it's used, as long as <sess-version> goes up whenever the session data gets changed. It's RECOMMENDED to use an NTP format timestamp here too. ๐Ÿ“ˆ
  • <nettype> is a text string for the type of network. Right now, "IN" means "Internet", but other values MAY be registered later (see Section 8). ๐ŸŒ
  • <addrtype> is a text string for the kind of address that comes next. "IP4" and "IP6" are defined for now, but other values MAY be registered later (see Section 8). ๐Ÿ”ข
  • <unicast-address> is the address of the machine that made the session. For IP4, it's either the machine's fully qualified domain name or its dotted-decimal IPv4 address. For IP6, it's either the fully qualified domain name or the compressed text form of the IPv6 address. For both IP4 and IP6, the fully qualified domain name is the one that SHOULD be given, unless it isn't available. Then the globally unique address MAY be used instead. ๐Ÿ  A local IP address MUST NOT be used in any context where the SDP description might leave the scope it means something in. For example, a local address MUST NOT be included in an application-level referral that might leave that scope. ๐Ÿšซ

Overall, the o= field is a globally unique identifier for this exact version of the session description. The subfields other than the version, taken together, identify the session no matter how it gets modified. It's giving continuity, honestly ๐Ÿ’œ.

Also, for privacy reasons, sometimes you want to hide the originator's username and IP address. If that's a worry, an arbitrary <username> and a private <unicast-address> MAY be picked to fill in the o= field, as long as they're chosen so the field stays globally unique. ๐Ÿ™ˆ๐Ÿซถ

5.3. Session Name ("s=") ๐ŸŽ€

s=<session name>

The s= field is the session's text name. There MUST be one and only one s= field per session description. The s= field MUST NOT be empty, and it SHOULD contain ISO 10646 characters (but also check out the a=charset attribute). ๐Ÿ’… If the session doesn't have a meaningful name, the value s= SHOULD be used, which is a single space as the session name. Very minimalist, very on-brand ๐Ÿค.

5.4. Session Information ("i=") ๐ŸŒธ

i=<session description>

The i= field gives text info about the session. There MUST be at most one session-level i= field per session description, and at most one i= field per media. If the a=charset attribute is there, it says which character set the i= field uses. If a=charset is not there, the i= field MUST contain ISO 10646 characters in UTF-8 encoding. ๐Ÿ”ค

A single i= field MAY also be used for each media definition. Inside media definitions, i= fields are mainly for labelling media streams. They're most useful when one session has more than one distinct media stream of the same media type. Like, two whiteboards, one for slides and one for feedback and questions. ๐Ÿ“‹โœจ

The i= field is a free-form, human-readable description of the session or what a media stream is for. It's not meant to be parsed by machines, so please don't ๐Ÿค–๐Ÿšซ.

5.5. URI ("u=") ๐Ÿฆ‹

u=<uri>

A URI is a Uniform Resource Identifier, the kind WWW clients use [7]. The URI should point to more info about the session. Pls note it's a pointer, not the info itself ๐Ÿ”—. This field is OPTIONAL, but if it shows up, it MUST be specified before the first media field. You can only have one URI field per session description. One is plenty ๐Ÿ’–.

5.6. Email Address and Phone Number ("e=" and "p=") ๐Ÿ“ž

e=<email-address>
p=<phone-number>

These lines give the contact info for the person responsible for the conference. That's not necessarily the same person who made the conference announcement, so don't mix them up ๐Ÿ‘€.

Including an email address or phone number is OPTIONAL. Quick history moment: the previous version of SDP said that either an email field or a phone field MUST be specified, but people mostly ignored it. This change brings the spec in line with what people actually do ๐Ÿ™Œ.

If an email address or phone number is present, it MUST be specified before the first media field. You can have more than one email or phone field for a session description. ๐Ÿ“ฌ

Phone numbers SHOULD be written as an international public telecommunication number (see ITU-T Recommendation E.164), starting with a "+". Spaces and hyphens are fine to break up a phone field so it's easier to read. Here's an example:

p=+1 617 555-6011

Email addresses and phone numbers can both have an OPTIONAL free text string attached, usually the name of the person to contact. If it's there, it MUST be enclosed in parentheses. For example:

e=j.doe@example.com (Jane Doe)

There's also the alternative name quoting convention from RFC 2822 [29], and that's allowed for both email addresses and phone numbers. For example:

e=Jane Doe <j.doe@example.com>

The free text string SHOULD be in the ISO-10646 character set with UTF-8 encoding. Otherwise it can use ISO-8859-1 or other encodings, as long as the matching session-level a=charset attribute is set ๐ŸŒ.

5.7. Connection Data ("c=") ๐Ÿ”Œ

c=<nettype> <addrtype> <connection-address>

The c= field holds the connection data ๐Ÿ’ซ.

A session description MUST contain either at least one c= field in each media description, or a single c= field at the session level. It MAY contain a single session-level c= field plus additional c= field(s) per media description. When it does, the per-media values override the session-level settings for that media ๐ŸŽฏ.

The first sub-field (<nettype>) is the network type, a text string for the type of network. Right now, "IN" means "Internet", but other values MAY be registered later (see Section 8).

The second sub-field (<addrtype>) is the address type. This is what lets SDP work for sessions that aren't IP based. This memo only defines IP4 and IP6, but other values MAY be registered later (see Section 8). ๐Ÿงฉ

The third sub-field (<connection-address>) is the connection address. OPTIONAL sub-fields MAY be added after the connection address, depending on what the <addrtype> field says ๐Ÿง.

When <addrtype> is IP4 or IP6, the connection address works like this:

  • If the session is multicast, the connection address is an IP multicast group address. If the session isn't multicast, the connection address holds the unicast IP address of the expected data source, data relay, or data sink, as worked out by the extra attribute fields. Unicast addresses aren't really expected in a session description sent through a multicast announcement, though nothing forbids it. ๐Ÿ“ก
  • Sessions using an IPv4 multicast connection address MUST also have a time to live (TTL) value, in addition to the multicast address. The TTL and the address together define the scope the multicast packets for this conference get sent with. TTL values MUST be in the range 0-255. The TTL MUST be specified, but using it to scope multicast traffic is deprecated. Applications SHOULD use an administratively scoped address instead. โณ๐Ÿšฆ

The TTL for the session gets tacked onto the address with a slash as the separator. Here's an example:

c=IN IP4 224.2.36.42/127

IPv6 multicast doesn't use TTL scoping, so the TTL value MUST NOT be present for IPv6 multicast. Instead, IPv6 scoped addresses are expected to be used to limit the scope of conferences ๐ŸŒˆ.

Hierarchical or layered encoding schemes are data streams where one media source's encoding gets split into a bunch of layers. The receiver picks its desired quality (and so its bandwidth) by subscribing only to some of those layers. These layered encodings usually get sent over multiple multicast groups, so multicast pruning can happen. That keeps unwanted traffic away from sites that only need certain levels of the hierarchy ๐Ÿฅž. For applications that need multiple multicast groups, this notation is allowed for the connection address:

<base multicast address>[/<ttl>]/<number of addresses>

If the number of addresses isn't given, it's assumed to be one. The multicast addresses get allocated contiguously above the base address. So, for example:

c=IN IP4 224.2.1.1/127/3

means addresses 224.2.1.1, 224.2.1.2, and 224.2.1.3 get used at a TTL of 127. That's semantically identical to putting multiple c= lines in a media description:

c=IN IP4 224.2.1.1/127
c=IN IP4 224.2.1.2/127
c=IN IP4 224.2.1.3/127

Here's an IPv6 one:

c=IN IP6 FF15::101/3

which is semantically equivalent to:

c=IN IP6 FF15::101
c=IN IP6 FF15::102
c=IN IP6 FF15::103

(Remember the TTL field isn't present in IPv6 multicast.) ๐Ÿง 

Multiple addresses or c= lines MAY be specified on a per-media basis, but only if they give multicast addresses for different layers in a hierarchical or layered encoding scheme. They MUST NOT be specified for a session-level c= field. ๐Ÿšซ

The slash notation for multiple addresses described above MUST NOT be used for IP unicast addresses. Unicast is one-to-one, so no bundling ๐Ÿ™…โ€โ™€๏ธ๐Ÿ’….

5.8. Bandwidth ("b=") ๐ŸŽ€

b=<bwtype>:<bandwidth>

This field is OPTIONAL ๐Ÿ’– It tells everyone the proposed bandwidth for the session or the media. The <bwtype> is an alphanumeric modifier that explains what the <bandwidth> number means. This spec defines two values, but other values MAY be registered later (see Section 8 and [21], [25]):

  • CT: If a session's bandwidth, or the bandwidth of media inside it, is different from the bandwidth you'd assume from its scope, a "b=CT:..." line SHOULD be included for the session. It gives the proposed upper limit for the bandwidth used, which is the "conference total" bandwidth ๐Ÿงš The main point is to give a rough idea of whether two or more sessions can run at the same time. When you use CT with RTP and there are several RTP sessions in the conference, the conference total means the total bandwidth of all of those RTP sessions together.
  • AS: The bandwidth is application specific, so it's the application's own idea of maximum bandwidth ๐Ÿ”ฅ Usually this matches whatever is set on the app's "maximum bandwidth" control, if it has one. For RTP-based apps, AS gives the RTP "session bandwidth" as defined in Section 6.2 of [19].

Quick reminder: CT is a total for all the media at all sites, while AS is a figure for one media at one site, even though lots of sites might be sending at once ๐Ÿ‘‘

A prefix of "X-" is defined for <bwtype> names. It's only meant for experiments ๐Ÿงช For example:

b=X-YZ:128

Using the "X-" prefix is NOT RECOMMENDED. Instead, new modifiers SHOULD be registered with IANA in the standard namespace. SDP parsers MUST ignore bandwidth fields with unknown modifiers ๐Ÿ™ˆ Modifiers MUST be alphanumeric. There's no length limit, but it is recommended that they be short, because nobody wants a novel as a modifier ๐Ÿ’…

By default, the <bandwidth> is in kilobits per second. A new <bwtype> modifier MAY say that its bandwidth is in some other unit. (The "CT" and "AS" modifiers in this memo both use the default units, so no drama there ๐ŸŒธ)


5.9. Timing ("t=") โฐ

t=<start-time> <stop-time>

The "t=" lines set the start and stop times for a session. You can have multiple "t=" lines if the session is active at several irregularly spaced times, and each extra line adds one more active period โœจ If the session runs at regular times, you SHOULD use an "r=" line (more on that below) in addition to a "t=" line, and put it after the "t=" line. In that case, the "t=" line gives the start and stop of the repeat sequence ๐Ÿฆ‹

Multiple "t=" lines MAY be used if a session is active at multiple irregularly spaced times. Each additional "t=" line specifies an additional period of time for which the session will be active.

The first and second sub-fields are the start and stop times for the session. These are the decimal form of Network Time Protocol (NTP) time values, counted in seconds since 1900 [13]. To turn them into UNIX time, subtract the decimal number 2208988800 ๐Ÿ•ฐ๏ธ

NTP timestamps are usually stored as 64-bit values, which wrap around sometime in the year 2036. SDP uses an arbitrary-length decimal representation, so this should not be a problem ๐ŸŒˆ (SDP timestamps MUST keep counting seconds since 1900, and NTP will use the value modulo the 64-bit limit.)

If the <stop-time> is zero, the session is unbounded, but it won't become active until after the <start-time>. If the <start-time> is also zero, the session is permanent ๐Ÿ’œ

User interfaces SHOULD strongly discourage making unbounded and permanent sessions. They don't tell you when the session will end, which makes scheduling a nightmare ๐Ÿ˜ญ

When you show unbounded sessions to a user that haven't timed out, you may assume the session will only be active until half an hour from now or from the session start time, whichever is later. If you need different behaviour, an end-time SHOULD be given, and it should be updated when new information shows when the session should really end โญ

Permanent sessions may be shown to the user as never being active, unless there are repeat times that say exactly when the session is active ๐Ÿ™ƒ


5.10. Repeat Times ("r=") ๐Ÿ”

r=<repeat interval> <active duration> <offsets from start-time>

"r=" fields set the repeat times for a session. For example, say a session is active at 10am on Monday and 11am on Tuesday, for one hour each, every week for three months. Then the <start-time> in the matching "t=" field would be the NTP value for 10am on the first Monday. The <repeat interval> would be 1 week, the <active duration> would be 1 hour, and the offsets would be zero and 25 hours. The "t=" field's stop time would be the NTP value for the end of the last session, three months later ๐Ÿ“ By default, every field is in seconds, so the "r=" and "t=" fields could look like this:

t=3034423619 3042462419
r=604800 3600 0 90000

To keep things compact, you can also write times in days, hours, or minutes. You do this by writing a number right next to a single case-sensitive character. Fractional units are not allowed, so use a smaller unit instead. These unit characters are allowed:

  • d - days (86400 seconds)
  • h - hours (3600 seconds)
  • m - minutes (60 seconds)
  • s - seconds (allowed for completeness)

So the announcement above could also be written like this:

r=7d 1h 0 25h

Monthly and yearly repeats can't be set with a single SDP repeat time ๐Ÿ™…โ€โ™€๏ธ Instead, use separate "t=" fields to list the session times one by one.


5.11. Time Zones ("z=") ๐ŸŒ

z=<adjustment time> <offset> <adjustment time> <offset> ....

If you want a repeated session to cross a switch between daylight saving time and standard time (or the other way around), you need offsets from the base time ๐ŸŒž๐ŸŒ™ This is needed because different time zones change at different times of day, different countries switch to or from daylight saving time on different dates, and some countries don't use daylight saving time at all. It's a whole mess, honestly ๐Ÿ˜ญ

So to schedule a session that's at the same time in winter and in summer, you have to be able to say clearly whose time zone the session is scheduled by. To make life easier for receivers, the sender can give the NTP time when a time zone adjustment happens, along with the offset from when the session was first scheduled. The "z=" field lets the sender list these adjustment times and offsets from the base time ๐Ÿงฉ

Here's an example:

z=2882844526 -1h 2898848070 0

This means that at time 2882844526, the time base used for the session's repeat times moves back by 1 hour. Then at time 2898848070, the session's original time base comes back ๐Ÿ”™ Adjustments are always measured from the specified start time, and they are not cumulative ๐Ÿ™Œ Adjustments apply to every "t=" and "r=" line in a session description.

If a session is going to last several years, the session announcement is expected to be updated now and then, instead of sending several years' worth of adjustments in one announcement ๐Ÿ“…


5.12. Encryption Keys ("k=") ๐Ÿ”

k=<method>
k=<method>:<encryption key>

If it's sent over a secure and trusted channel, the Session Description Protocol MAY be used to convey encryption keys ๐Ÿ›ก๏ธ The key field ("k=") gives a simple way to exchange keys. It's mainly here for compatibility with older implementations, though, so its use is NOT RECOMMENDED. People are working on new key exchange mechanisms for SDP [27] [28], and new applications are expected to use those instead ๐Ÿ’…

A key field can go before the first media entry (in which case it applies to all media in the session), or it can go with each media entry as needed. The key format and how it's used are outside the scope of this document ๐Ÿ™ˆ The key field also has no way to say which encryption algorithm to use, what kind of key it is, or any other info about the key. That's assumed to come from the higher-level protocol that's using SDP. If you need to put that info in SDP itself, the extensions mentioned above SHOULD be used. Lots of security protocols need two keys, one for confidentiality and one for integrity, but this spec doesn't support sending two keys ๐Ÿฅบ

The method says how to get a usable key, either from outside or from the encoded key given. These methods are defined:

k=clear:<encryption key>

The encryption key is included as-is in the key field ๐Ÿ˜ฌ This method MUST NOT be used unless the SDP can be guaranteed to go over a secure channel. The encryption key is read as text according to the charset attribute. If you need to include characters that SDP doesn't allow, use the "k=base64:" method instead.

k=base64:<encoded encryption key>

The encryption key is in the key field, but it's been base64 encoded [12] because it has characters that SDP doesn't allow. This method MUST NOT be used unless the SDP can be guaranteed to go over a secure channel.

k=uri:<URI to obtain key>

A Uniform Resource Identifier goes in the key field ๐Ÿ—๏ธ The URI points to the data that holds the key, and getting the key may need extra authentication first. When someone requests the given URI, the reply SHOULD say how the key is encoded. The URI is often a Secure Socket Layer/Transport Layer Security (SSL/TLS)-protected HTTP URI ("https:"), but that's not required.

k=prompt

No key is included in this SDP description, but the session or media stream this key field refers to is encrypted ๐Ÿ”’ The user should be prompted for the key when they try to join the session, and that user-supplied key should then be used to decrypt the media streams. Using user-specified keys is NOT RECOMMENDED, since those keys tend to have weak security properties ๐Ÿฅ€

The key field MUST NOT be used unless the SDP can be guaranteed to go over a secure and trusted channel. Good examples of that are SDP embedded inside an S/MIME message, or a TLS-protected HTTP session ๐Ÿซถ It's really important that the secure channel is with the party who is allowed to join the session, and not with a middleman. If a caching proxy server is involved, make sure the proxy is either trusted or unable to access the SDP. No shortcuts here, bestie ๐Ÿšจ

5.13. Attributes ("a=") โœจ

okay so attributes are literally the main way SDP gets extended ๐Ÿงš bestie this is the glow-up section ๐Ÿ’–

a=<attribute>
a=<attribute>:<value>

Attributes are the primary means for extending SDP ๐Ÿ’…. They can be defined as "session-level" attributes, "media-level" attributes, or both ๐Ÿฆ‹.

A media description can have any number of a= fields that are media specific ๐ŸŽ€. These are called "media-level" attributes, and they add info about the media stream ๐ŸŒธ. You can also put attribute fields before the first media field too. These "session-level" attributes share info that applies to the whole conference, not just one media stream โœจ.

Attribute fields come in two forms ๐Ÿ“:

  • A property attribute is just a=<flag>. These are binary, so if it's there, it means the attribute is a property of the session ๐ŸŒˆ. An example is a=recvonly.
  • A value attribute looks like a=<attribute>:<value>. For example, a whiteboard could have the value attribute a=orient: landscape ๐ŸŽจ.

How attributes get interpreted depends on the media tool being invoked ๐Ÿ› ๏ธ. So receivers of session descriptions should be configurable in how they interpret session descriptions in general, and attributes in particular ๐Ÿ’œ.

Attribute names MUST use the US-ASCII subset of ISO-10646/UTF-8 ๐Ÿ”ฅ.

Attribute values are octet strings, and they MAY use any octet value except 0x00 (Nul), 0x0A (LF), and 0x0D (CR) ๐Ÿ™ˆ. By default, attribute values are interpreted as the ISO-10646 character set with UTF-8 encoding ๐ŸŒธ. Unlike other text fields, attribute values are not normally affected by the "charset" attribute, because that would make comparing against known values a total mess ๐Ÿ’€. However, when an attribute is defined, it can be defined to be charset dependent. In that case its value should be interpreted in the session charset instead of ISO-10646 ๐Ÿซถ.

Attributes MUST be registered with IANA (see Section 8) ๐Ÿ‘‘. If an attribute is received that isn't understood, it MUST be ignored by the receiver ๐Ÿฆ‹. No drama, just skip it ๐Ÿ’….


5.14. Media Descriptions ("m=") ๐ŸŒˆ

m=<media> <port> <proto> <fmt> ...

A session description can contain a bunch of media descriptions โœจ. Each one starts with an "m=" field and ends when the next "m=" field shows up, or when the session description ends ๐ŸŽ€. A media field has several sub-fields, so let's go through them ๐Ÿงš.

<media> is the media type ๐ŸŽฌ. Right now the defined media are "audio", "video", "text", "application", and "message", but the list may be extended in the future (see Section 8) ๐Ÿ”ฎ.

<port> is the transport port the media stream gets sent to ๐Ÿ“ฎ. What that port means depends on the network being used, as specified in the relevant "c=" field, and on the transport protocol in the <proto> sub-field of the media field ๐Ÿ›ฐ๏ธ. Other ports the media application uses, like the RTP Control Protocol (RTCP) port [19], MAY be derived algorithmically from the base media port ๐Ÿงฎ. Or they MAY be specified in a separate attribute, like "a=rtcp:" defined in [22] ๐Ÿ“.

If non-contiguous ports are used, or if they don't follow the parity rule of even RTP ports and odd RTCP ports, the "a=rtcp:" attribute MUST be used ๐Ÿ™…โ€โ™€๏ธ. Applications that are asked to send media to an odd <port> where "a=rtcp:" is present MUST NOT subtract 1 from the RTP port ๐Ÿ˜ญ. That means they MUST send the RTP to the port in <port>, and send the RTCP to the port in the "a=rtcp" attribute ๐Ÿซถ.

For hierarchically encoded streams sent to a unicast address, you might need to specify multiple transport ports ๐ŸŒธ. You do this with a notation similar to the one used for IP multicast addresses in the "c=" field:

m=<media> <port>/<number of ports> <proto> <fmt> ...

Which ports get used depends on the transport protocol ๐Ÿง . For RTP, the default is that only the even-numbered ports carry data, with the one-higher odd ports used for the RTCP belonging to the RTP session ๐ŸŽ€. The <number of ports> is the number of RTP sessions ๐Ÿ’–. For example:

m=video 49170/2 RTP/AVP 31

This would mean ports 49170 and 49171 form one RTP/RTCP pair, and 49172 and 49173 form the second pair ๐Ÿฆ‹. RTP/AVP is the transport protocol, and 31 is the format (see below) โœจ. If non-contiguous ports are required, they must be signalled using a separate attribute, like "a=rtcp:" defined in [22] ๐Ÿ™ƒ.

If multiple addresses are in the "c=" field and multiple ports are in the "m=" field, a one-to-one mapping from port to the matching address is implied ๐Ÿ—บ๏ธ. For example:

c=IN IP4 224.2.1.1/127/2
m=video 49170/2 RTP/AVP 31

This would imply that address 224.2.1.1 is used with ports 49170 and 49171, and address 224.2.1.2 is used with ports 49172 and 49173 ๐Ÿ’….

The semantics of multiple "m=" lines using the same transport address are undefined ๐Ÿคทโ€โ™€๏ธ. So unlike the limited past practice, there's no implicit grouping defined this way ๐Ÿ™ˆ. Instead, an explicit grouping framework (for example, [18]) should be used to express the intended semantics ๐Ÿ‘‘.

<proto> is the transport protocol ๐Ÿš€. What it means depends on the address type field in the relevant "c=" field, so a "c=" field of IP4 means the transport protocol runs over IP4 ๐ŸŒ. These transport protocols are defined, but they may be extended by registering new protocols with IANA (see Section 8) โœจ:

  • udp: denotes an unspecified protocol running over UDP.
  • RTP/AVP: denotes RTP [19] used under the RTP Profile for Audio and Video Conferences with Minimal Control [20] running over UDP ๐ŸŽง.
  • RTP/SAVP: denotes the Secure Real-time Transport Protocol [23] running over UDP ๐Ÿ”.

The main reason to specify the transport protocol as well as the media format is that the same standard media formats can be carried over different transport protocols, even when the network protocol is the same ๐ŸŒˆ. A historical example is vat Pulse Code Modulation (PCM) audio and RTP PCM audio. Another could be TCP/RTP PCM audio ๐ŸŽถ. Relays and monitoring tools that are transport-protocol-specific but format-independent are also possible ๐Ÿงš.

<fmt> is a media format description ๐ŸŽž๏ธ. The fourth and any subsequent sub-fields describe the format of the media, and how to interpret that format depends on the value of the <proto> sub-field ๐Ÿ’œ.

If the <proto> sub-field is "RTP/AVP" or "RTP/SAVP", the <fmt> sub-fields contain RTP payload type numbers ๐Ÿ”ข. When a list of payload type numbers is given, all of these payload formats MAY be used in the session. But the first one SHOULD be used as the default format for the session ๐Ÿฅ‡. For dynamic payload type assignments, the "a=rtpmap:" attribute (see Section 6) SHOULD be used to map an RTP payload type number to a media encoding name that identifies the payload format ๐Ÿ—๏ธ. The "a=fmtp:" attribute MAY be used to specify format parameters (see Section 6) ๐ŸŽ›๏ธ.

If the <proto> sub-field is "udp", the <fmt> sub-fields MUST reference a media type that describes the format under the "audio", "video", "text", "application", or "message" top-level media types ๐Ÿ“š. The media type registration SHOULD define the packet format for use with UDP transport ๐Ÿ“ฆ.

For media using other transport protocols, the <fmt> field is protocol specific ๐Ÿงฉ. Rules for interpreting the <fmt> sub-field MUST be defined when registering new protocols (see Section 8.2.2) ๐Ÿ“.


6. SDP Attributes โœจ

The following attributes are defined ๐Ÿ“–. Application writers can add new attributes whenever they need them, so this list isn't exhaustive ๐ŸŒท. Registration procedures for new attributes are defined in Section 8.2.4 ๐Ÿงพ.

a=cat:<category>

This attribute gives the dot-separated hierarchical category of the session ๐Ÿ—‚๏ธ. It lets a receiver filter out sessions it doesn't want by category ๐Ÿ™…โ€โ™€๏ธ. There's no central registry of categories ๐ŸŒ. It's a session-level attribute, and it's not dependent on charset ๐Ÿ’–.

a=keywds:<keywords>

Like the cat attribute, this helps the receiver find sessions it's into ๐Ÿ”. It lets a receiver pick interesting sessions based on keywords describing the purpose of the session ๐ŸŽฏ. There's no central registry of keywords either ๐Ÿคทโ€โ™€๏ธ. It's a session-level attribute, and it's charset-dependent, which means its value should be interpreted in the charset specified for the session description if one is specified. Otherwise, by default, it's ISO 10646/UTF-8 ๐ŸŒ.

a=tool:<name and version of tool>

This gives the name and version number of the tool used to create the session description ๐Ÿ› ๏ธ. It's a session-level attribute, and it's not dependent on charset โœจ.

a=ptime:<packet time>

This gives the length of time in milliseconds represented by the media in a packet โฑ๏ธ. It's probably only meaningful for audio data, but it may be used with other media types if it makes sense ๐ŸŽต. It shouldn't be necessary to know ptime to decode RTP or vat audio. It's intended as a recommendation for the encoding/packetisation of audio ๐ŸŽง. It's a media-level attribute, and it's not dependent on charset ๐Ÿ’œ.

a=maxptime:<maximum packet time>

This gives the maximum amount of media that can be encapsulated in each packet, expressed as time in milliseconds ๐Ÿ“. The time SHALL be calculated as the sum of the time the media present in the packet represents ๐Ÿงฎ. For frame-based codecs, the time SHOULD be an integer multiple of the frame size ๐ŸŽž๏ธ. This attribute is probably only meaningful for audio data, but it may be used with other media types if it makes sense ๐ŸŽถ. It's a media-level attribute, and it's not dependent on charset ๐ŸŒธ. Heads up, this attribute was introduced after RFC 2327, so non-updated implementations will ignore it ๐Ÿ™ˆ.

a=rtpmap:<payload type> <encoding name>/<clock rate> [/<encoding parameters>]

a=rtpmap:<payload type> <encoding name>/<clock rate> [/<encoding
   parameters>]

This attribute maps an RTP payload type number (as used in an "m=" line) to an encoding name that denotes the payload format to be used ๐Ÿ—บ๏ธ. It also gives info on the clock rate and encoding parameters ๐Ÿ•ฐ๏ธ. It's a media-level attribute that's not dependent on charset ๐Ÿ’–.

Although an RTP profile may make static assignments of payload type numbers to payload formats, it's more common for that assignment to happen dynamically using "a=rtpmap:" attributes ๐Ÿ”„. As an example of a static payload type, think of u-law PCM coded single-channel audio sampled at 8 kHz ๐ŸŽ™๏ธ. This is completely defined in the RTP Audio/Video profile as payload type 0, so there's no need for an "a=rtpmap:" attribute. The media for that stream, sent to UDP port 49232, can be specified like this:

m=audio 49232 RTP/AVP 0

An example of a dynamic payload type is 16-bit linear encoded stereo audio sampled at 16 kHz ๐ŸŽง. If we want to use the dynamic RTP/AVP payload type 98 for this stream, we need some extra info to decode it:

m=audio 49232 RTP/AVP 98
a=rtpmap:98 L16/16000/2

Okay so up to one rtpmap attribute can be defined for each media format listed. ๐Ÿ’– That means you could end up with something like this:

m=audio 49230 RTP/AVP 96 97 98
a=rtpmap:96 L8/8000
a=rtpmap:97 L16/8000
a=rtpmap:98 L16/11025/2

RTP profiles that use dynamic payload types MUST define the set of valid encoding names and/or a means to register encoding names if that profile is going to be used with SDP. ๐Ÿงš The "RTP/AVP" and "RTP/SAVP" profiles borrow media subtypes as their encoding names, under the top-level media type from the m= line. So in the example above, the media types are "audio/l8" and "audio/l16". It's giving organised. โœจ

For audio streams, <encoding parameters> tells you the number of audio channels. This parameter is OPTIONAL, and you can leave it out when the number of channels is one, as long as no additional parameters are needed. ๐ŸŽ€

For video streams, no encoding parameters are currently specified. ๐Ÿฆ‹

Additional encoding parameters MAY be defined in the future, but codec-specific parameters SHOULD NOT be added. ๐Ÿ™ˆ Parameters added to an a=rtpmap: attribute SHOULD only be the ones a session directory needs to pick the right media to join a session. Codec-specific parameters should go in other attributes instead (for example, a=fmtp:). Main character energy, sorted. ๐Ÿ‘‘

Note: RTP audio formats typically don't include info about the number of samples per packet. If you need a non-default packetisation (as defined in the RTP Audio/Video Profile), use the ptime attribute the way shown above. ๐Ÿ’…


a=recvonly

This tells the tools to start in receive-only mode where that applies. ๐ŸŒธ It can be a session-level or media-level attribute, and it doesn't depend on charset. Heads up though, recvonly only applies to the media, not to any associated control protocol. So an RTP-based system in recvonly mode SHOULD still send RTCP packets. ๐Ÿ’œ

a=sendrecv

This tells the tools to start in send and receive mode. It's necessary for interactive conferences with tools that default to receive-only mode. ๐Ÿ”ฅ It can be a session or media-level attribute, and it doesn't depend on charset.

If none of the attributes "sendonly", "recvonly", "inactive", and "sendrecv" is present, "sendrecv" SHOULD be assumed as the default for sessions that are not of the conference type "broadcast" or "H332" (see below). โœจ

a=sendonly

This tells the tools to start in send-only mode. ๐Ÿฆ‹ An example would be when a different unicast address is used for the traffic destination than for the traffic source. In that case, you could use two media descriptions, one sendonly and one recvonly. It can be a session or media-level attribute, but it would normally only be used as a media attribute. It doesn't depend on charset. Note that sendonly only applies to the media, and any associated control protocol (e.g., RTCP) SHOULD still be received and processed as normal. ๐Ÿซถ

a=inactive

This tells the tools to start in inactive mode. ๐Ÿ˜ญ It's necessary for interactive conferences where users can put other users on hold. No media is sent over an inactive media stream. Note that an RTP-based system SHOULD still send RTCP, even if it was started inactive. It can be a session or media-level attribute, and it doesn't depend on charset. ๐ŸŒˆ

a=orient:<orientation>

Normally this is only used for a whiteboard or presentation tool. ๐Ÿ“ It specifies the orientation of the workspace on the screen. It's a media-level attribute. Permitted values are "portrait", "landscape", and "seascape" (upside-down landscape). It doesn't depend on charset. Upside-down landscape is a whole mood. ๐Ÿ™ƒ

a=type:<conference type>

This specifies the type of the conference. Suggested values are "broadcast", "meeting", "moderated", "test", and "H332". โญ "recvonly" should be the default for "type:broadcast" sessions, "type:meeting" should imply "sendrecv", and "type:moderated" should indicate the use of a floor control tool, and that the media tools are started so as to mute new sites joining the conference. Very polite, very organised. ๐Ÿ’…

Specifying the attribute "type:H332" indicates that this loosely coupled session is part of an H.332 session as defined in the ITU H.332 specification [26]. Media tools should be started "recvonly". ๐ŸŽ€

Specifying the attribute "type:test" is suggested as a hint that, unless someone explicitly asks for otherwise, receivers can safely avoid displaying this session description to users. ๐Ÿ™ˆ

The type attribute is a session-level attribute, and it doesn't depend on charset. ๐ŸŒธ

a=charset:<character set>

This specifies the character set used to display the session name and information data. By default, the ISO-10646 character set in UTF-8 encoding is used. ๐Ÿงš If you need a more compact representation, other character sets may be used. For example, ISO 8859-1 is specified with this SDP attribute:

a=charset:ISO-8859-1

This is a session-level attribute and doesn't depend on charset. โœจ The charset specified MUST be one of those registered with IANA, such as ISO-8859-1. The character set identifier is a US-ASCII string and MUST be compared against the IANA identifiers using a case-insensitive comparison. If the identifier isn't recognised or supported, all strings that are affected by it SHOULD be regarded as octet strings. Ngl, that's a lot of rules, but they're all super important. ๐Ÿซถ

Note that a character set specified MUST still prohibit the use of bytes 0x00 (Nul), 0x0A (LF), and 0x0d (CR). Character sets that need these characters MUST define a quoting mechanism that stops these bytes from showing up inside text fields. ๐Ÿšซ

a=sdplang:<language tag>

This can be a session-level or media-level attribute. As a session-level attribute, it specifies the language for the session description. As a media-level attribute, it specifies the language for any media-level SDP information field associated with that media. ๐ŸŒ You can give multiple sdplang attributes at session or media level if the session description or media uses multiple languages. In that case, the order of the attributes shows how important each language is, from most important to least important.

In general, sending session descriptions with multiple languages is discouraged. ๐Ÿ™… Instead, multiple descriptions SHOULD be sent describing the session, one in each language. However, not every transport mechanism can do this, so multiple sdplang attributes are allowed, although NOT RECOMMENDED. Ugh, the compromise era. ๐Ÿ’€

The "sdplang" attribute value must be a single RFC 3066 language tag in US-ASCII [9]. It doesn't depend on the charset attribute. An "sdplang" attribute SHOULD be specified when a session is of sufficient scope to cross geographic boundaries where the language of recipients can't be assumed, or where the session is in a different language from the locally assumed norm. ๐ŸŒ

a=lang:<language tag>

This can be a session-level or media-level attribute. As a session-level attribute, it specifies the default language for the session being described. As a media-level attribute, it specifies the language for that media, overriding any session-level language. ๐Ÿ’– Multiple lang attributes can be given at session or media level if the session description or media uses multiple languages. The order of the attributes shows the importance of each language, from most important to least important.

The "lang" attribute value must be a single RFC 3066 language tag in US-ASCII [9]. It doesn't depend on the charset attribute. A "lang" attribute SHOULD be specified when a session is of sufficient scope to cross geographic boundaries where the language of recipients can't be assumed, or where the session is in a different language from the locally assumed norm. ๐Ÿซถ

a=framerate:<frame rate>

This gives the maximum video frame rate in frames/sec. ๐ŸŽฌ It's meant as a recommendation for encoding video data. Decimal representations of fractional values using the notation "<integer>.<fraction>" are allowed. It's a media-level attribute, defined only for video media, and it doesn't depend on charset.

a=quality:<quality>

This gives a suggestion for the quality of the encoding as an integer value. โœจ The point of the quality attribute for video is to ask for a non-default trade-off between frame rate and still-image quality. For video, the value is in the range 0 to 10, with these suggested meanings:

10 - the best still-image quality the compression scheme can
     give.
5  - the default behaviour given no quality suggestion.
0  - the worst still-image quality the codec designer thinks
     is still usable.

It's a media-level attribute, and it doesn't depend on charset. ๐ŸŒˆ

a=fmtp:<format> <format specific parameters>

This attribute lets you convey parameters that are specific to a particular format, in a way that SDP doesn't have to understand them. ๐Ÿง  The format MUST be one of the formats specified for the media. Format-specific parameters can be any set of parameters that need to be conveyed by SDP and passed unchanged to the media tool that will use this format. At most one instance of this attribute is allowed for each format. ๐Ÿ”’

It's a media-level attribute, and it doesn't depend on charset. ๐ŸŽ€

7. Security Considerations ๐Ÿ”โœจ

okay bestie, this is the section where we get serious for a sec ๐Ÿ’…. SDP usually shows up with the Session Initiation Protocol [15] using the offer/answer model [17] to agree on parameters for unicast sessions ๐Ÿ“ž. When it's used that way, the security considerations of those protocols apply too, so keep that in mind ๐Ÿฆ‹.

SDP is a session description format for multimedia sessions ๐ŸŽ€. Anyone receiving and acting on an SDP message SHOULD be aware that a session description can't be trusted unless it came over an authenticated transport protocol from a known and trusted source ๐Ÿšจ. Lots of transport protocols can carry session descriptions, and how the authentication works changes from one to the next ๐ŸŒˆ. Some transports often don't have security features turned on at all ๐Ÿ’€. If a session description wasn't obtained in a trusted way, the endpoint SHOULD be careful, because among other attacks, the media sessions it gets might not be the ones you meant to join, the place media gets sent to might not be the expected one, any of the session's parameters might be wrong, or the media security might be compromised ๐Ÿ˜ฑ. The endpoint has to make a sensible call based on the app's security risks and the user's preferences, and it's allowed to ask the user whether to accept the session ๐Ÿ™ˆ.

One transport that can carry session descriptions is the Session Announcement Protocol (SAP) ๐Ÿ“ข. SAP has both encryption and authentication mechanisms ๐Ÿ”, but because of how session announcements work, there are lots of times the person who sent an announcement can't be authenticated ๐Ÿ˜ญ. That's because they're often a total stranger to the receiver and there's no common public key infrastructure available ๐Ÿฅฒ.

When a session description comes in over an unauthenticated transport or from an untrusted party, the software parsing it should take a few precautions ๐Ÿง. Session descriptions hold the info needed to start software on the receiver's system ๐Ÿ‘€. Software that parses a session description MUST NOT be able to start any other software except the software specifically configured as appropriate for taking part in multimedia sessions ๐Ÿšซ. It's normally considered inappropriate for session-parsing software to start multimedia-session software on a user's system without the user being told first and giving their consent ๐Ÿ™…โ€โ™€๏ธ. So a session description arriving through a session announcement, email, session invitation, or WWW page MUST NOT drop the user into an interactive multimedia session unless they've explicitly pre-authorised that ๐Ÿ’–. Since it's not always easy to tell whether a session is interactive, apps that aren't sure should assume the session is interactive ๐Ÿซถ.

โš ๏ธ Heads up: in this specification there are no attributes that let a session description tell the recipient to start multimedia tools in a mode where they default to transmitting. It might make sense to define such attributes in certain situations. If anyone does, an app parsing a session description with those attributes SHOULD either ignore them or tell the user that joining the session will automatically send multimedia data ๐Ÿ“ฃ. The default behaviour for an unknown attribute is to ignore it ๐Ÿ™ˆ.

In some environments, it's become pretty common for middleman systems to intercept and analyse session descriptions carried inside other signalling protocols ๐Ÿ‘€. They do this for lots of reasons, including (but not limited to) opening holes in firewalls so media streams can pass, or marking, prioritising, or blocking traffic selectively ๐Ÿšง. Sometimes these middlemen modify the session description, like making its contents match NAT bindings that were created dynamically ๐Ÿ”. These behaviours are NOT RECOMMENDED unless the session description is carried in a way that lets the middleman properly check that it's authentic and that its source has the authority to set up those communication sessions ๐Ÿ•ต๏ธโ€โ™€๏ธ. SDP alone doesn't have enough info to make those checks happen, so they depend on the encapsulating protocol (for example, SIP or RTSP) ๐Ÿงฉ.

๐Ÿšจ๐Ÿšจ Major warning, bestie: using the "k=" field is a serious security risk, because it sends session encryption keys in the clear ๐Ÿ˜ฑ. SDP MUST NOT be used to convey key material unless you can guarantee that the channel the SDP travels over is both private and authenticated ๐Ÿ”’. Also, the "k=" line gives you no way to indicate or negotiate cryptographic key algorithms ๐Ÿ™ƒ. It only supports a single symmetric key instead of separate keys for confidentiality and integrity, so it's severely limited ๐Ÿ’€. Using the "k=" line is NOT RECOMMENDED, as discussed in Section 5.12 ๐ŸŒธ.

8. IANA Considerations ๐Ÿ“‹

8.1. The "application/sdp" Media Type ๐ŸŽ€

Okay so one media type registration from RFC 2327 is getting updated, and here's how ๐Ÿฆ‹.

   To: ietf-types@iana.org
   Subject: Registration of media type "application/sdp"

   Type name: application

   Subtype name: sdp

   Required parameters: None.

   Optional parameters: None.

   Encoding considerations:
      SDP files are primarily UTF-8 format text.  The "a=charset:"
      attribute may be used to signal the presence of other
      character sets in certain parts of an SDP file (see
      Section 6 of RFC 4566).  Arbitrary binary content cannot
      be directly represented in SDP.

   Security considerations:
      See Section 7 of RFC 4566

   Interoperability considerations:
      See RFC 4566

   Published specification:
      See RFC 4566

   Applications which use this media type:
      Voice over IP, video teleconferencing, streaming media, instant
      messaging, among others.  See also Section 3 of RFC 4566.

   Additional information:

   Magic number(s):   None.
   File extension(s): The extension ".sdp" is commonly used.
   Macintosh File Type Code(s): "sdp "

   Person & email address to contact for further information:
      Mark Handley  <M.Handley@cs.ucl.ac.uk>
      Colin Perkins <csp@csperkins.org>
      IETF MMUSIC working group <mmusic@ietf.org>

   Intended usage: COMMON

   Author/Change controller:
      Authors of RFC 4566
      IETF MMUSIC working group delegated from the IESG

8.2. Registration of Parameters ๐Ÿง

There are seven field names that can be registered with IANA โœจ. Using the terminology from the SDP specification's Backus-Naur Form (BNF), they are "media", "proto", "fmt", "att-field", "bwtype", "nettype", and "addrtype" ๐Ÿ’œ.

8.2.1. Media Types ("media") ๐ŸŽถ

The set of media types is meant to stay small ๐Ÿค, and SHOULD NOT be extended except in rare circumstances ๐Ÿ™…โ€โ™€๏ธ. Media names should follow the same rules as top-level media content types, and where possible the same name should be registered for SDP as for MIME ๐Ÿ“. For media that isn't an existing top-level media content type, a Standards Track RFC MUST be produced before a new top-level content type can be registered, and the registration MUST give a good justification for why no existing media name fits (this is the "Standards Action" policy of RFC 2434 [8]) ๐Ÿ›๏ธ.

This memo registers the media types "audio", "video", "text", "application", and "message" ๐ŸŽง๐ŸŽฅ๐Ÿ“„๐Ÿ’Œ.

Note: the media types "control" and "data" were listed as valid in the previous version of this specification [6] ๐Ÿ‘€. But their semantics were never fully specified and they aren't widely used ๐Ÿ˜ฌ. They've been removed in this specification, although they still count as valid media type capabilities for a SIP user agent as defined in RFC 3840 [24] ๐ŸŒˆ. If these media types end up being considered useful in the future, a Standards Track RFC MUST be produced to document their use ๐Ÿ“œ. Until that's done, applications SHOULD NOT use these types and SHOULD NOT declare support for them in SIP capabilities declarations (even though they exist in the registry created by RFC 3840) ๐Ÿ™ƒ.

8.2.2. Transport Protocols ("proto") ๐Ÿšš

The "proto" field describes the transport protocol being used ๐Ÿ›ฃ๏ธ. This SHOULD reference a standards-track protocol RFC โœ…. This memo registers three values: "RTP/AVP" is a reference to RTP [19] used under the RTP Profile for Audio and Video Conferences with Minimal Control [20] running over UDP/IP ๐ŸŽต. "RTP/SAVP" is a reference to the Secure Real-time Transport Protocol [23] ๐Ÿ”. And "udp" means an unspecified protocol over UDP ๐Ÿคทโ€โ™€๏ธ.

If other RTP profiles get defined in the future, their "proto" names SHOULD be specified in the same manner ๐Ÿงฉ. For example, an RTP profile whose short name is "XYZ" would be written as a "proto" field of "RTP/XYZ" ๐Ÿ’….

New transport protocols SHOULD be registered with IANA ๐Ÿ“ฌ. Registrations MUST reference an RFC describing the protocol ๐Ÿ“–. That RFC MAY be Experimental or Informational, although it's preferable for it to be Standards Track โญ. Registrations MUST also define the rules for how their "fmt" namespace is managed (see below) ๐Ÿ—‚๏ธ.

8.2.3. Media Formats ("fmt") ๐Ÿ“

Each transport protocol, defined by the "proto" field, has an associated "fmt" namespace that describes the media formats that can be carried by that protocol ๐Ÿงƒ. Formats cover all the possible encodings someone might want to transport in a multimedia session ๐ŸŽ.

RTP payload formats under the "RTP/AVP" and "RTP/SAVP" profiles MUST use the payload type number as their "fmt" value ๐Ÿ”ข. If the payload type number is dynamically assigned by this session description, an additional "rtpmap" attribute MUST be included to specify the format name and parameters as defined by the media type registration for the payload format ๐Ÿท๏ธ. It's RECOMMENDED that other RTP profiles registered (in combination with RTP) as SDP transport protocols specify the same rules for the "fmt" namespace ๐Ÿค.

For the "udp" protocol, new formats SHOULD be registered ๐Ÿ“. Using an existing media subtype for the format is encouraged ๐Ÿ’–. If no media subtype exists, it's RECOMMENDED that a suitable one be registered through the IETF process [31] by producing, or referencing, a standards-track RFC that defines the transport protocol for the format ๐ŸŒŸ.

For other protocols, formats MAY be registered according to the rules of the associated "proto" specification ๐Ÿฆ‹.

Registrations of new formats MUST specify which transport protocols they apply to ๐Ÿ“Œ.

8.2.4. Attribute Names ("att-field") โœจ

okay so attribute field names ("att-field") MUST be registered with IANA and documented ๐Ÿ’… because conflicting attributes under the same name have caused noticeable issues. unknown attributes in SDP just get ignored, but conflicting ones that fragment the protocol are a serious problem ๐Ÿ’€

new attribute registrations are accepted under the "Specification Required" policy of RFC 2434, as long as the spec includes this info:

  • contact name, email address, and telephone number
  • attribute name (as it will appear in SDP)
  • long-form attribute name in English
  • type of attribute (session level, media level, or both)
  • whether the attribute value is subject to the charset attribute
  • a one-paragraph explanation of the purpose of the attribute
  • a specification of appropriate attribute values for this attribute

that's the bare minimum IANA will accept ๐Ÿซถ attributes that are expected to see widespread use and interoperability SHOULD be documented with a standards-track RFC that specifies the attribute more precisely.

submitters of registrations should ensure that the spec is in the spirit of SDP attributes ๐Ÿฆ‹ most notably, the attribute should be platform independent, meaning it makes no implicit assumptions about operating systems and doesn't name specific pieces of software in a way that might inhibit interoperability.

IANA has registered the following initial set of attribute names ("att-field" values), with definitions as in Section 6 of this memo (these definitions update those in RFC 2327). the table is giving main character energy ๐ŸŒธ

Name      | Session or Media level? | Dependent on charset?
----------+-------------------------+----------------------
cat       | Session                 | No
keywds    | Session                 | Yes
tool      | Session                 | No
ptime     | Media                   | No
maxptime  | Media                   | No
rtpmap    | Media                   | No
recvonly  | Either                  | No
sendrecv  | Either                  | No
sendonly  | Either                  | No
inactive  | Either                  | No
orient    | Media                   | No
type      | Session                 | No
charset   | Session                 | No
sdplang   | Either                  | No
lang      | Either                  | No
framerate | Media                   | No
quality   | Media                   | No
fmtp      | Media                   | No

8.2.5. Bandwidth Specifiers ("bwtype") ๐ŸŽ€

a proliferation of bandwidth specifiers is strongly discouraged, bestie ๐Ÿ™ˆ

new bandwidth specifiers ("bwtype" fields) MUST be registered with IANA. the submission MUST reference a standards-track RFC specifying the semantics of the bandwidth specifier precisely, and indicating when it should be used, and why the existing registered bandwidth specifiers do not suffice.

IANA has registered the bandwidth specifiers "CT" and "AS" with definitions as in Section 5.8 of this memo (these definitions update those in RFC 2327) ๐Ÿ”ฅ


8.2.6. Network Types ("nettype") ๐ŸŒˆ

new network types (the "nettype" field) may be registered with IANA if SDP needs to be used in non-Internet environments. ngl these aren't normally IANA's thing ๐Ÿงš but there may be times when an Internet app needs to talk to a non-Internet app, like when gatewaying an Internet telephone call into the Public Switched Telephone Network (PSTN) ๐Ÿ“ž

the number of network types should be small and should be rarely extended. a new network type cannot be registered without registering at least one address type to be used with that network type. a new network type registration MUST reference an RFC that gives details of the network type and address type and specifies how and when they would be used.

IANA has registered the network type "IN" to represent the Internet, with definition as in Sections 5.2 and 5.7 of this memo (these definitions update those in RFC 2327) ๐ŸŒธ


8.2.7. Address Types ("addrtype") ๐Ÿ’œ

new address types ("addrtype") may be registered with IANA. an address type is only meaningful in the context of a network type, so any registration of an address type MUST specify a registered network type or be submitted along with a network type registration. a new address type registration MUST reference an RFC giving details of the syntax of the address type. address types aren't expected to be registered frequently, so it's not a hot-girl-summer thing ๐Ÿ˜ญ

IANA has registered the address types "IP4" and "IP6" with definitions as in Sections 5.2 and 5.7 of this memo (these definitions update those in RFC 2327) โœจ


8.2.8. Registration Procedure ๐Ÿ“

in the RFC documentation that registers SDP "media", "proto", "fmt", "bwtype", "nettype", and "addrtype" fields, the authors MUST include the following info for IANA to place in the appropriate registry:

  • contact name, email address, and telephone number
  • name being registered (as it will appear in SDP)
  • long-form name in English
  • type of name ("media", "proto", "fmt", "bwtype", "nettype", or "addrtype")
  • a one-paragraph explanation of the purpose of the registered name
  • a reference to the specification for the registered name (this will typically be an RFC number)

IANA may refer any registration to the IESG for review, and may request revisions to be made before a registration will be made. no skipping the homework ๐Ÿ“š๐Ÿ’…


8.3. Encryption Key Access Methods ๐Ÿ”

the IANA previously maintained a table of SDP encryption key access method ("enckey") names. this table is obsolete, since the "k=" line is not extensible. new registrations MUST NOT be accepted ๐Ÿ’€

9. SDP Grammar โœจ

okay so this is the full ABNF grammar for SDP, aka the formal rulebook that says exactly what a valid SDP message looks like ๐Ÿ“œ ABNF itself is defined in [4], so go check that out if you wanna see the rules for the rules ๐Ÿค“

; SDP Syntax
session-description = proto-version
                      origin-field
                      session-name-field
                      information-field
                      uri-field
                      email-fields
                      phone-fields
                      connection-field
                      bandwidth-fields
                      time-fields
                      key-field
                      attribute-fields
                      media-descriptions

proto-version =       %x76 "=" 1*DIGIT CRLF
                      ;this memo describes version 0

origin-field =        %x6f "=" username SP sess-id SP sess-version SP
                      nettype SP addrtype SP unicast-address CRLF

session-name-field =  %x73 "=" text CRLF

information-field =   [%x69 "=" text CRLF]

uri-field =           [%x75 "=" uri CRLF]

email-fields =        *(%x65 "=" email-address CRLF)

phone-fields =        *(%x70 "=" phone-number CRLF)

connection-field =    [%x63 "=" nettype SP addrtype SP
                      connection-address CRLF]
                      ;a connection field must be present
                      ;in every media description or at the
                      ;session-level

bandwidth-fields =    *(%x62 "=" bwtype ":" bandwidth CRLF)

time-fields =         1*( %x74 "=" start-time SP stop-time
                      *(CRLF repeat-fields) CRLF)
                      [zone-adjustments CRLF]

repeat-fields =       %x72 "=" repeat-interval SP typed-time
                      1*(SP typed-time)

zone-adjustments =    %x7a "=" time SP ["-"] typed-time
                      *(SP time SP ["-"] typed-time)

key-field =           [%x6b "=" key-type CRLF]

attribute-fields =    *(%x61 "=" attribute CRLF)

media-descriptions =  *( media-field
                      information-field
                      *connection-field
                      bandwidth-fields
                      key-field
                      attribute-fields )

media-field =         %x6d "=" media SP port ["/" integer]
                      SP proto 1*(SP fmt) CRLF

; sub-rules of 'o='
username =            non-ws-string
                      ;pretty wide definition, but doesn't
                      ;include space

sess-id =             1*DIGIT
                      ;should be unique for this username/host

sess-version =        1*DIGIT

nettype =             token
                      ;typically "IN"

addrtype =            token
                      ;typically "IP4" or "IP6"

; sub-rules of 'u='
uri =                 URI-reference
                      ; see RFC 3986

; sub-rules of 'e=', see RFC 2822 for definitions
email-address        = address-and-comment / dispname-and-address
                       / addr-spec
address-and-comment  = addr-spec 1*SP "(" 1*email-safe ")"
dispname-and-address = 1*email-safe 1*SP "<" addr-spec ">"

; sub-rules of 'p='
phone-number =        phone *SP "(" 1*email-safe ")" /
                      1*email-safe "<" phone ">" /
                      phone

phone =               ["+"] DIGIT 1*(SP / "-" / DIGIT)

; sub-rules of 'c='
connection-address =  multicast-address / unicast-address

; sub-rules of 'b='
bwtype =              token

bandwidth =           1*DIGIT

; sub-rules of 't='
start-time =          time / "0"

stop-time =           time / "0"

time =                POS-DIGIT 9*DIGIT
                      ; Decimal representation of NTP time in
                      ; seconds since 1900.  The representation
                      ; of NTP time is an unbounded length field
                      ; containing at least 10 digits.  Unlike the
                      ; 64-bit representation used elsewhere, time
                      ; in SDP does not wrap in the year 2036.

; sub-rules of 'r=' and 'z='
repeat-interval =     POS-DIGIT *DIGIT [fixed-len-time-unit]

typed-time =          1*DIGIT [fixed-len-time-unit]

fixed-len-time-unit = %x64 / %x68 / %x6d / %x73

; sub-rules of 'k='
key-type =            %x70 %x72 %x6f %x6d %x70 %x74 /     ; "prompt"
                      %x63 %x6c %x65 %x61 %x72 ":" text / ; "clear:"
                      %x62 %x61 %x73 %x65 "64:" base64 /  ; "base64:"
                      %x75 %x72 %x69 ":" uri              ; "uri:"

base64      =         *base64-unit [base64-pad]
base64-unit =         4base64-char
base64-pad  =         2base64-char "==" / 3base64-char "="
base64-char =         ALPHA / DIGIT / "+" / "/"

; sub-rules of 'a='
attribute =           (att-field ":" att-value) / att-field

att-field =           token

att-value =           byte-string

; sub-rules of 'm='
media =               token
                      ;typically "audio", "video", "text", or
                      ;"application"

fmt =                 token
                      ;typically an RTP payload type for audio
                      ;and video media

proto  =              token *("/" token)
                      ;typically "RTP/AVP" or "udp"

port =                1*DIGIT

; generic sub-rules: addressing
unicast-address =     IP4-address / IP6-address / FQDN / extn-addr

multicast-address =   IP4-multicast / IP6-multicast / FQDN
                      / extn-addr

IP4-multicast =       m1 3( "." decimal-uchar )
                      "/" ttl [ "/" integer ]
                      ; IPv4 multicast addresses may be in the
                      ; range 224.0.0.0 to 239.255.255.255

m1 =                  ("22" ("4"/"5"/"6"/"7"/"8"/"9")) /
                      ("23" DIGIT )

IP6-multicast =       hexpart [ "/" integer ]
                      ; IPv6 address starting with FF

ttl =                 (POS-DIGIT *2DIGIT) / "0"

FQDN =                4*(alpha-numeric / "-" / ".")
                      ; fully qualified domain name as specified
                      ; in RFC 1035 (and updates)

IP4-address =         b1 3("." decimal-uchar)

b1 =                  decimal-uchar
                      ; less than "224"

; The following is consistent with RFC 2373 [30], Appendix B.
IP6-address =         hexpart [ ":" IP4-address ]

hexpart =             hexseq / hexseq "::" [ hexseq ] /
                      "::" [ hexseq ]

hexseq  =             hex4 *( ":" hex4)

hex4    =             1*4HEXDIG

; Generic for other address families
extn-addr =           non-ws-string

; generic sub-rules: datatypes
text =                byte-string
                      ;default is to interpret this as UTF8 text.
                      ;ISO 8859-1 requires "a=charset:ISO-8859-1"
                      ;session-level attribute to be used

byte-string =         1*(%x01-09/%x0B-0C/%x0E-FF)
                      ;any byte except NUL, CR, or LF

non-ws-string =       1*(VCHAR/%x80-FF)
                      ;string of visible characters

token-char =          %x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39
                      / %x41-5A / %x5E-7E

token =               1*(token-char)

email-safe =          %x01-09/%x0B-0C/%x0E-27/%x2A-3B/%x3D/%x3F-FF
                      ;any byte except NUL, CR, LF, or the quoting
                      ;characters ()<>

integer =             POS-DIGIT *DIGIT

; generic sub-rules: primitives
alpha-numeric =       ALPHA / DIGIT

POS-DIGIT =           %x31-39 ; 1 - 9
decimal-uchar =       DIGIT
                      / POS-DIGIT DIGIT
                      / ("1" 2*(DIGIT))
                      / ("2" ("0"/"1"/"2"/"3"/"4") DIGIT)
                      / ("2" "5" ("0"/"1"/"2"/"3"/"4"/"5"))

; external references:
      ; ALPHA, DIGIT, CRLF, SP, VCHAR: from RFC 4234
      ; URI-reference: from RFC 3986
      ; addr-spec: from RFC 2822

10. Summary of Changes from RFC 2327 ๐Ÿฆ‹

okay so the memo got a whole glow-up ๐Ÿ’… it's been restructured and there are tons of clarifications added based on how people actually use it โœจ except for the stuff called out below, the changes are meant to be backward-compatible clarifications. BUT ๐Ÿ˜ญ because RFC 2327 had some inconsistencies and unclear definitions, some implementations probably read that memo in ways that don't match this version of SDP. so that's something to keep in mind ๐Ÿ‘€

the ABNF grammar in Section 9 got extensively revised and updated ๐ŸŽ€ it fixes a bunch of mistakes and brings in the RFC 3266 IPv6 extensions. known inconsistencies between the grammar and the spec text have been resolved too, so it's way more consistent now ๐Ÿซถ

a media type registration for SDP is included now ๐ŸŒธ the requirements for registering attributes and other parameters with IANA got clarified and tightened (Section 8). it's noted that "text" and "message" are valid media types for use with SDP, but "control" and "data" are under-specified and deprecated. ๐Ÿ’€

RFC 2119 terms are now used throughout to show requirement levels ๐Ÿ”ฅ some of those requirements, especially around parameter registration, are stricter than what RFC 2327 had, so heads up bestie ๐Ÿ™ˆ

the "RTP/SAVP" RTP profile and its "fmt" namespace are registered now ๐Ÿงš

the attributes a=inactive and a=maxptime were added โœจ

RFC 2327 said that either e= or p= was required. both are optional now, to match what actually happens in real life ๐Ÿ“

the significant limitations of the k= field are noted, and using it is deprecated ๐Ÿ’œ

most uses of the "x-" prefix notation for experimental parameters are disallowed, and the other uses are deprecated ๐Ÿ˜ญ


11. Acknowledgements ๐Ÿ’–

so many people in the IETF Multiparty Multimedia Session Control (MMUSIC) working group left comments and suggestions that helped shape this document ๐Ÿซถ shoutout to Eve Schooler, Steve Casner, Bill Fenner, Allison Mankin, Ross Finlayson, Peter Parnes, Joerg Ott, Carsten Bormann, Steve Hanna, Jonathan Lennox, Keith Drage, Sean Olson, Bernie Hoeneisen, Jonathan Rosenberg, John Elwell, Flemming Andreasen, Jon Peterson, and Spencer Dawkins ๐Ÿ‘‘โœจ


12. References ๐ŸŒˆ

12.1. Normative References

Okay bestie, these are the must-read docs ๐Ÿค“๐Ÿ“š Everything below is what this spec leans on, so you need these to get the full picture โœจ

[1] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, November 1987. ๐ŸŒ

[2] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987. ๐ŸŒธ

[3] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. ๐Ÿ”‘

[4] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 4234, October 2005. ๐Ÿงฉ

[5] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003. ๐ŸŒˆ

[6] Handley, M. and V. Jacobson, "SDP: Session Description Protocol", RFC 2327, April 1998. ๐Ÿ’œ This is the OG SDP doc, the one this whole spec is updating.

[7] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. ๐Ÿ”—

[8] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998. ๐Ÿ“‹

[9] Alvestrand, H., "Tags for the Identification of Languages", BCP 47, RFC 3066, January 2001. ๐Ÿ—ฃ๏ธ

[10] Olson, S., Camarillo, G., and A. Roach, "Support for IPv6 in Session Description Protocol (SDP)", RFC 3266, June 2002. ๐ŸŒ

[11] Faltstrom, P., Hoffman, P., and A. Costello, "Internationalizing Domain Names in Applications (IDNA)", RFC 3490, March 2003. ๐Ÿช„

[12] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 3548, July 2003. ๐Ÿ”ข

12.2. Informative References

Now the extra-credit reading ๐Ÿง โœจ These aren't required to implement the thing, but they're super useful for the bigger picture, so I'd still skim them ๐Ÿ’…

[13] Mills, D., "Network Time Protocol (Version 3) Specification, Implementation", RFC 1305, March 1992. โฐ

[14] Handley, M., Perkins, C., and E. Whelan, "Session Announcement Protocol", RFC 2974, October 2000. ๐Ÿ“ฃ

[15] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002. ๐Ÿ“ž

[16] Schulzrinne, H., Rao, A., and R. Lanphier, "Real Time Streaming Protocol (RTSP)", RFC 2326, April 1998. ๐ŸŽฌ

[17] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with Session Description Protocol (SDP)", RFC 3264, June 2002. ๐Ÿค

[18] Camarillo, G., Eriksson, G., Holler, J., and H. Schulzrinne, "Grouping of Media Lines in the Session Description Protocol (SDP)", RFC 3388, December 2002. ๐Ÿงบ

[19] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, July 2003. ๐Ÿš€

[20] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and Video Conferences with Minimal Control", STD 65, RFC 3551, July 2003. ๐ŸŽฅ

[21] Casner, S., "Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) Bandwidth", RFC 3556, July 2003. ๐Ÿ“ถ

[22] Huitema, C., "Real Time Control Protocol (RTCP) attribute in Session Description Protocol (SDP)", RFC 3605, October 2003. ๐ŸŽ›๏ธ

[23] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, "The Secure Real-time Transport Protocol (SRTP)", RFC 3711, March 2004. ๐Ÿ”

[24] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Indicating User Agent Capabilities in the Session Initiation Protocol (SIP)", RFC 3840, August 2004. ๐Ÿชช

[25] Westerlund, M., "A Transport Independent Bandwidth Modifier for the Session Description Protocol (SDP)", RFC 3890, September 2004. ๐Ÿชถ

[26] International Telecommunication Union, "H.323 extended for loosely coupled conferences", ITU Recommendation H.332, September 1998. ๐Ÿ›๏ธ

[27] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. Norrman, "Key Management Extensions for Session Description Protocol (SDP) and Real Time Streaming Protocol (RTSP)", RFC 4567, July 2006. ๐Ÿ—๏ธ

[28] Andreasen, F., Baugher, M., and D. Wing, "Session Description Protocol (SDP) Security Descriptions for Media Streams", RFC 4568, July 2006. ๐Ÿ›ก๏ธ

[29] Resnick, P., "Internet Message Format", RFC 2822, April 2001. โœ‰๏ธ

[30] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 2373, July 1998. ๐Ÿ 

[31] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", BCP 13, RFC 4288, December 2005. ๐Ÿ—‚๏ธ

Authors' Addresses โœจ

Here's who wrote this ๐Ÿซถ You can reach them at the emails below.

Mark Handley
University College London
Department of Computer Science
Gower Street
London  WC1E 6BT
UK

EMail: M.Handley@cs.ucl.ac.uk


Van Jacobson
Packet Design
2465 Latham Street
Mountain View, CA  94040
USA

EMail: van@packetdesign.com


Colin Perkins
University of Glasgow
Department of Computing Science
17 Lilybank Gardens
Glasgow  G12 8QQ
UK

EMail: csp@csperkins.org

Copyright (C) The Internet Society (2006). ๐ŸŒธ

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property ๐Ÿงพ

The IETF doesn't take a side on whether any Intellectual Property Rights or other rights that someone might claim over the tech in this document are valid or how far they reach. It also doesn't say whether a license for those rights is available, and it hasn't checked for any such rights itself. For the rules on rights in RFC documents, see BCP 78 and BCP 79.

Copies of IPR disclosures sent to the IETF Secretariat, any assurances that licenses will be available, and the results of any attempt to get a general license or permission for implementers or users of this spec can be found in the IETF's online IPR repository at http://www.ietf.org/ipr.

The IETF invites anyone to flag any copyrights, patents, patent applications, or other proprietary rights that might cover technology required to implement this standard. Send that info to the IETF at ietf-ipr@ietf.org. ๐Ÿ“ฌ

Acknowledgement ๐Ÿ™

Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA). ๐Ÿ’–

๐Ÿ“ฆ where this page comes from