Misplaced Pages

Session Description Protocol: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 16:49, 22 September 2020 editKvng (talk | contribs)Extended confirmed users, New page reviewers107,681 edits review: lets describe these as descriptions, not messagesTag: nowiki added← Previous edit Latest revision as of 00:48, 14 November 2024 edit undoKvng (talk | contribs)Extended confirmed users, New page reviewers107,681 editsm WP:ADOPTYPO boolean -> Boolean 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{short description|file format for describing networked audio and video streams}} {{Short description|Protocol for exchanging parameters of multimedia communication sessions}}
{{IPstack}} {{IPstack}}


The '''Session Description Protocol''' ('''SDP''') is a format for describing ] communication ] for the purposes of session announcement and session invitation.<ref name="RFC 4566"/> Its predominant use is in support of ] applications, such as ] (VoIP) and ]. SDP does not deliver any media streams itself but is used between endpoints for negotiation of network metrics, media types, and other associated properties. The set of properties and parameters is called a ''session profile''. The '''Session Description Protocol''' ('''SDP''') is a format for describing ] communication ] for the purposes of announcement and invitation.<ref name="RFC 4566"/> Its predominant use is in support of ] applications, such as ] (VoIP) and ]. SDP does not deliver any media streams itself but is used between endpoints for negotiation of network metrics, media types, and other associated properties. The set of properties and parameters is called a ''session profile''.


SDP is extensible for the support of new media types and formats. SDP was originally a component of the ] (SAP),<ref>{{cite book|url=https://books.google.com/books?id=EjCNhX2do6wC&pg=SA11-PA24|first=Apostolis K.|last=Salkintzis|publisher=CRC Press|isbn=0849316316|title=Mobile Internet: Enabling Technologies & Services|page=11: 24–25 |year=2004|accessdate=2019-07-11}}</ref> but found other uses in conjunction with the ] (RTP), the ] (RTSP), ] (SIP), and as a standalone protocol for describing ] sessions. SDP is extensible for the support of new media types and formats. SDP was originally a component of the ] (SAP),<ref>{{cite book|url=https://books.google.com/books?id=EjCNhX2do6wC&pg=SA11-PA24|first=Apostolis K.|last=Salkintzis|publisher=CRC Press|isbn=0849316316|title=Mobile Internet: Enabling Technologies & Services|page=11: 24–25 |year=2004|access-date=2019-07-11}}</ref> but found other uses in conjunction with the ] (RTP), the ] (RTSP), ] (SIP), and as a standalone protocol for describing ] sessions.


The ] published the original specification as a ] in April 1998,<ref>{{cite IETF |rfc=2327 |title=SDP: Session Description Protocol |last=Handley |first=Mark |author2=Van Jacobson |date=April 1998 |publisher=]}}</ref> and subsequently published a revised specification as RFC 4566 in July 2006.<ref name="RFC 4566">{{cite IETF |rfc=4566 |title=SDP: Session Description Protocol |last=Handley |first=Mark |author2=Van Jacobson |author3=Colin Perkins |date=July 2006 |publisher=]}}</ref> The ] published the original specification as a ] in April 1998 (RFC 2327).<ref>{{cite IETF |rfc=2327 |title=SDP: Session Description Protocol |last=Handley |first=Mark |author2=Van Jacobson |date=April 1998 |publisher=]}}</ref> Revised specifications were released in 2006 (RFC 4566),<ref name="RFC 4566">{{cite IETF |rfc=4566 |title=SDP: Session Description Protocol |last=Handley |first=Mark |author2=Van Jacobson |author3=Colin Perkins |date=July 2006 |publisher=]}}</ref> and in 2021 (RFC 8866).<ref>{{cite IETF | rfc=8866 |title=SDP: Session Description Protocol |last=Begen |first=Ali |author2=Mark Handley |author3=P. Kyvizat |author4=Colin Perkins |date=January 2021 |publisher=]}}</ref>


==Session description== ==Session description==
The Session Description Protocol describes a session as a group of fields in a text-based format, one field per line.<ref group="note"> Lines are terminated by a ] and a ] character, but implementations may relax this by omitting the carriage return.</ref> The form of each field is as follows. The Session Description Protocol describes a session as a group of fields in a text-based format, one field per line.<ref group="note">Lines are terminated by a ] and a ] character, but implementations may relax this by omitting the carriage return.</ref> The form of each field is as follows.
:<nowiki><character>=<value><CR><LF></nowiki> <pre><character>=<value><CR><LF></pre>
Where <nowiki><character></nowiki> is a single ] character and <nowiki><value></nowiki> is structured text in a format that depends on the character. Values are typically ] encoded.<ref group="note">The ''session information'' and ''session name'' values are subject to the encoding specified in any ''charset'' attribute of the section.</ref> ] is not allowed immediately to either side of the equal sign.<ref name="RFC 4566"/>{{rp|Section 5}} Where <code><nowiki><character></nowiki></code> is a single ] character and <code><nowiki><value></nowiki></code> is structured text in a format that depends on the character. Values are typically ] encoded.<ref group="note">The ''session information'' and ''session name'' values are subject to the encoding specified in any ''charset'' attribute of the section.</ref> ] is not allowed immediately to either side of the equal sign.<ref name="RFC 4566"/>{{rp|Section 5}}


Session descriptions consist of three sections: session, timing, and media descriptions. Each description may contain multiple timing and media descriptions. Names are only unique within the associated syntactic construct.<ref> {{webarchive|url=https://web.archive.org/web/20110713164318/http://www.konnetic.com/Documents/KonneticSDPTechnicalOverview.pdf |date=2011-07-13 }}</ref><!--]--> Session descriptions consist of three sections: session, timing, and media descriptions. Each description may contain multiple timing and media descriptions. Names are only unique within the associated syntactic construct.<ref> {{webarchive|url=https://web.archive.org/web/20110713164318/http://www.konnetic.com/Documents/KonneticSDPTechnicalOverview.pdf |date=2011-07-13 }}</ref>


Fields must appear in the order shown; optional fields are marked with an asterisk:
Optional values are specified with <code>=*</code> and each field must appear in the order shown below.
* ''Session description''

''Session description''
v= (protocol version number, currently only 0) v= (protocol version number, currently only 0)
o= (originator and session identifier : username, id, version number, network address) o= (originator and session identifier : username, id, version number, network address)
Line 27: Line 26:
c=* (connection information—not required if included in all media) c=* (connection information—not required if included in all media)
b=* (zero or more bandwidth information lines) b=* (zero or more bandwidth information lines)
''One or more '''Time descriptions''' ("t=" and "r=" lines; see below)'' ''One or more '''time descriptions''' ("t=" and "r=" lines; see ])''
z=* (time zone adjustments) z=* (time zone adjustments)
k=* (encryption key) k=* (encryption key)
a=* (zero or more session attribute lines) a=* (zero or more session attribute lines)
''Zero or more '''Media descriptions''' (each one starting by an "m=" line; see below)'' ''Zero or more '''Media descriptions''' (each one starting by an "m=" line; see ])''


''Time description'' (mandatory) * ''{{vanchor|Time description}}'' (mandatory)
t= (time the session is active) t= (time the session is active)
r=* (zero or more repeat times) r=* (zero or more repeat times)


''Media description'' (optional) * ''{{vanchor|Media description}}'' (optional)
m= (media name and transport address) m= (media name and transport address)
i=* (media title or information field) i=* (media title or information field)
Line 45: Line 44:
a=* (zero or more media attribute lines — overriding the Session attribute lines) a=* (zero or more media attribute lines — overriding the Session attribute lines)


Below is a sample session description from RFC 4566. This session is originated by the user 'jdoe', at IPv4 address 10.47.16.5. Its name is "SDP Seminar" and extended session information ("A Seminar on the session description protocol") is included along with a link for additional information and an email address to contact the responsible party, Jane Doe. This session is specified to last for two hours using NTP timestamps, with a connection address (which indicates the address clients must connect to or — when a multicast address is provided, as it is here — subscribe to) specified as IPv4 224.2.17.12 with a TTL of 127. Recipients of this session description are instructed to only receive media. Two media descriptions are provided, both using RTP Audio Video Profile. The first is an audio stream on port 49170 using RTP/AVP payload type 0 (defined by as PCMU), and the second is a video stream on port 51372 using RTP/AVP payload type 99 (defined as "dynamic"). Finally, an attribute is included which maps RTP/AVP payload type 99 to format h263-1998 with a 90kHz clock rate. RTCP ports for the audio and video streams of 49171 and 51373, respectively, are implied. Below is a sample session description from RFC 4566. This session is originated by the user "jdoe", at IPv4 address 10.47.16.5. Its name is "SDP Seminar" and extended session information ("A Seminar on the session description protocol") is included along with a link for additional information and an email address to contact the responsible party, Jane Doe. This session is specified to last for two hours using NTP timestamps, with a connection address (which indicates the address clients must connect to or — when a multicast address is provided, as it is here — subscribe to) specified as IPv4 224.2.17.12 with a ] of 127. Recipients of this session description are instructed to only receive media. Two media descriptions are provided, both using RTP Audio Video Profile. The first is an audio stream on port 49170 using RTP/AVP payload type 0 (defined by RFC 3551 as ]), and the second is a video stream on port 51372 using RTP/AVP payload type 99 (defined as "dynamic"). Finally, an attribute is included which maps RTP/AVP payload type 99 to format h263-1998 with a 90&nbsp;kHz clock rate. ] ports for the audio and video streams of 49171 and 51373, respectively, are implied.
<div class="plainlinks">

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

The SDP specification does not incorporate any transport protocol; it is purely a format for session description. It is intended to use different transport protocols as necessary, including ], ], and ]. SDP could even be transmitted by email or as an HTTP payload. The SDP specification is purely a format for session description. It is intended to be distributed over different transport protocols as necessary, including ], ], and ]. SDP could even be transmitted by email or as an HTTP payload.


==Attributes== ==Attributes==
SDP uses attributes to extend the core protocol. Attributes can appear within the Session or Media sections and are scoped accordingly as ''session-level'' or ''media-level''. New attributes are added to the standard occasionally through registration with IANA.<ref></ref> SDP uses attributes to extend the core protocol. Attributes can appear within the Session or Media sections and are scoped accordingly as ''session-level'' or ''media-level''. New attributes are added to the standard occasionally through registration with IANA.<ref>{{cite web |url=https://www.iana.org/assignments/sdp-parameters |title=Registry of the SDP Parameters |publisher=Internet Assigned Numbers Authority |access-date=2021-01-15}}</ref>


Attributes take two forms: Attributes are either properties or values:
* A property form: <code>'''a='''''flag''</code> conveys a simple boolean property of the media or session. *Property: a=''flag'' conveys a Boolean property of the media or session.
* A value form: <code>'''a='''''attribute''''':'''''value''</code> provides a named parameter. *Value: a=''attribute'':''value'' provides a named parameter.


Two of these attributes are specially defined: Two of these attributes are specially defined:
* a=charset:''encoding'' is used in the session or media sections to specify a different character encoding (as registered in the IANA registry<ref>{{cite web| url = https://www.iana.org/assignments/character-sets| title = Registry of the Character Sets Encodings, on the Internet Assigned Numbers Authority site}}</ref>) from the recommended default value (''UTF-8'') for standard protocol keys. These values contain a text that is intended to be displayed to a user.
* <code>'''a='''charset:''encoding''</code>
* a=sdplang:''code'' is used to specify the language of text. Alternate text in multiple languages may be carried in the session, and selected automatically by the user agent according to user preferences.{{clarify|date=March 2021}}
* <code>'''a='''sdplang:''code''</code>
The first one is used in the Session or Media sections to specify another character encoding (as registered in the IANA registry<ref></ref>) than the default one highly recommended (UTF-8) where it is used in standard protocol keys whose values are containing a text intended to be displayed to a user. The second one is used to specify in which language it is written (alternate texts in multiple languages may be carried in the protocol, and selected automatically by the user agent according to user preferences. In both cases, each textual field in the protocol which are not interpreted symbolically by the protocol itself, will be interpreted as opaque strings, but rendered to the user or application with the values indicated in the last occurrence of the <code>charset</code> and <code>sdplang</code> in the current Media section, or otherwise their last value in the Session section). In both cases, text fields intended to be displayed to a user are interpreted as opaque strings, but rendered to the user or application with the values indicated in the last occurrence of the fields ''charset'' and ''sdplang'' in the current media section, or otherwise their last value in the session section.


The parameters ''v'', ''s'', and ''o'' are mandatory, must not be empty, and should be UTF-8-encoded. They are used as identifiers and are not intended to be displayed to users.
The first 3 mandatory parameters ('''v=''', '''s=''' and '''o='''), even though they seem to contain displayable text, are not intended to be displayed to users and translated. The fields present in their values are considered in the protocol as opaque strings, they are used as identifiers, just like paths in an URL or filenames in a file system: the SDP standard indicates that they must be all non empty and should be UTF-8 encoded.


A few other attributes (described as part the standard SDP specifications in the same RFC) are also shown in the example above, either as a session-level attribute (such as the attribute in property form <code>'''a='''recvonly</code>) which also applies to the described medias unless they override their value, or as a media-level attribute (such as the attribute in value form <code>'''a='''rtpmap:99 h263-1998/90000</code> for the video media in the example). A few other attributes are also present in the example, either as a session-level attribute (such as the attribute in property form ''a=recvonly''),<ref group="note">This session-level attribute also applies to the described media unless the value is overridden by a media-level attribute.</ref> or as a media-level attribute (such as the attribute in value form ''a=rtpmap:99 h263-1998/90000'' for the video in the example).


==Time formats and repetitions== ==Time formats and repetitions==
Absolute times are represented in ] (NTP) format (the number of seconds since 1900). If the stop time is 0 then the session is "unbounded." If the start time is also zero then the session is considered "permanent." Unbounded and permanent sessions are discouraged but not prohibited. Absolute times are represented in ] (NTP) format (the number of seconds since 1900). If the stop time is 0 then the session is ''unbounded''. If the start time is also zero then the session is considered ''permanent''. Unbounded and permanent sessions are discouraged but not prohibited.
Intervals can be represented with NTP times or in typed time: a value and time units (days ('d'), hours ('h'), minutes ('m') and seconds ('s')) sequence. Intervals can be represented with NTP times or in typed time: a value and time units (days: ''d'', hours: ''h'', minutes: ''m'' and seconds: ''s'') sequence.


Thus an hour meeting from 10 am UTC on 1 August 2010, with a single repeat time a week later at the same time can be represented as: Thus an hour meeting from 10 am UTC on 1 August 2010, with a single repeat time a week later at the same time can be represented as:

t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-08-08T11:00Z}} t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-08-08T11:00Z}}
r=604800 3600 0 r=604800 3600 0


Or using typed time: Or using typed time:

t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-08-08T11:00Z}} t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-08-08T11:00Z}}
r=7d 1h 0 r=7d 1h 0


When repeat times are specified, the start time of each repetition may need to be adjusted so that it will occur at the same local time in a specific time zone throughout the period between the start time and the stop time (which are still specified in NTP format in UTC). When repeat times are specified, the start time of each repetition may need to be adjusted to compensate for ] changes so that it will occur at the same local time in a specific time zone throughout the period between the start time and the stop time.


Instead of specifying this time zone and having to support a database of time zones for knowing when and where daylight adjustments will be needed, the repeat times are assumed to be all defined within the same time zone, and SDP supports the indication of NTP absolute times when a daylight offset (expressed in seconds or using a type time) will need to be applied to the repeated start time or end time falling at or after each daylight adjustment. All these offsets are relative to the start time, they are not cumulative. NTP supports this with the z= field which indicates a series of pairs, whose first item is the NTP absolute time when a daylight adjustment will occur, and the second item indicates the offset to apply relative to the absolute times computed with the r= field. Instead of specifying this time zone and having to support a database of time zones for knowing when and where daylight adjustments will be needed, the repeat times are assumed to be all defined within the same time zone, and SDP supports the indication of NTP absolute times when a daylight offset (expressed in seconds or using a type time) will need to be applied to the repeated start time or end time falling at or after each daylight adjustment. All these offsets are relative to the start time, they are not cumulative. NTP supports this with field ''z'', which indicates a series of pairs whose first item is the NTP absolute time when a daylight adjustment will occur, and the second item indicates the offset to apply relative to the absolute times computed with the field ''r''.

For example, if a daylight adjustment will subtract 1 hour on 31 October 2010 at 3 am UTC (i.e. 60 days minus 7 hours after the start time on Sunday 1 August 2010 at 10am UTC), and this will be the only daylight adjustment to apply in the scheduled period which would occur between 1 August 2010 up to the 28 November 2010 at 10 am UTC (the stop time of the repeated 1h session which is repeated each week at the same local time, which occurs 88 days later), this can be specified as:


For example, if a daylight adjustment will subtract 1 hour on 31 October 2010 at 3&nbsp;am UTC (i.e. 60 days minus 7 hours after the start time on Sunday 1 August 2010 at 10am UTC), and this will be the only daylight adjustment to apply in the scheduled period which would occur between 1 August 2010 up to the 28 November 2010 at 10&nbsp;am UTC (the stop time of the repeated 1-hour session which is repeated each week at the same local time, which occurs 88 days later), this can be specified as:
t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-11-28T10:00Z}} t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-11-28T10:00Z}}
r=7d 1h 0 r=7d 1h 0
z={{#time:U|2010-10-31T03:00Z}} -1h z={{#time:U|2010-10-31T03:00Z}} -1h


If the weekly 1-hour session was repeated every Sunday for full one year, i.e. from Sunday 1 August 2010 3 am UTC to Sunday 26 June 2011 4 am UTC (stop time of the last repeat, i.e. 360 days plus 1 hour later, or 31107600 seconds later), so that it would include the transition back to Summer time on Sunday 27 March 2011 at 2 am (1 hour is added again to local time so that the second daylight transition would occur 209 days after the first start time): If the weekly 1-hour session was repeated every Sunday for one full year, i.e. from Sunday 1 August 2010 3 am UTC to Sunday 26 June 2011 4 am UTC (stop time of the last repeat, i.e. 360 days plus 1 hour later, or 31107600 seconds later), so that it would include the transition back to Summer time on Sunday 27 March 2011 at 2&nbsp;am (1 hour is added again to local time so that the second daylight transition would occur 209 days after the first start time):

t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-11-28T10:00Z}} t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-11-28T10:00Z}}
r=7d 1h 0 r=7d 1h 0
Line 110: Line 105:
As SDP announcements for repeated sessions should not be made to cover very long periods exceeding a few years, the number of daylight adjustments to include in the z= parameter should remain small. As SDP announcements for repeated sessions should not be made to cover very long periods exceeding a few years, the number of daylight adjustments to include in the z= parameter should remain small.


Sessions may be repeated irregularly over a week but scheduled the same way for all weeks in the period, by adding more tuples in the ''r'' parameter. For example, to schedule the same event also on Saturday (at the same time of the day) you would use : Sessions may be repeated irregularly over a week but scheduled the same way for all weeks in the period, by adding more tuples in the ''r'' parameter. For example, to schedule the same event also on Saturday (at the same time of the day) you would use:

t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-11-28T10:00Z}} t={{#time:U|2010-08-01T10:00Z}} {{#time:U|2010-11-28T10:00Z}}
r=7d 1h 0 6d r=7d 1h 0 6d
Line 125: Line 119:


==External links== ==External links==
* {{cite web|url=http://tools.ietf.org/html/rfc3264 |title=An Offer/Answer Model with the Session Description Protocol(RFC 3264) |accessdate=2010-07-25 |last=Rosenberg |first=J. |author2=Schulzrinne, H. |date=June 2002 |publisher=] }} * {{cite IETF |rfc=3264 |title=An Offer/Answer Model with the Session Description Protocol |last=Rosenberg |first=J. |author2=Schulzrinne, H. |date=June 2002 |publisher=] }}

{{Authority control}}


] ]

Latest revision as of 00:48, 14 November 2024

Protocol for exchanging parameters of multimedia communication sessions
Internet protocol suite
Application layer
Transport layer
Internet layer
Link layer

The Session Description Protocol (SDP) is a format for describing multimedia communication sessions for the purposes of announcement and invitation. Its predominant use is in support of streaming media applications, such as voice over IP (VoIP) and video conferencing. SDP does not deliver any media streams itself but is used between endpoints for negotiation of network metrics, media types, and other associated properties. The set of properties and parameters is called a session profile.

SDP is extensible for the support of new media types and formats. SDP was originally a component of the Session Announcement Protocol (SAP), but found other uses in conjunction with the Real-time Transport Protocol (RTP), the Real-time Streaming Protocol (RTSP), Session Initiation Protocol (SIP), and as a standalone protocol for describing multicast sessions.

The IETF published the original specification as a Proposed Standard in April 1998 (RFC 2327). Revised specifications were released in 2006 (RFC 4566), and in 2021 (RFC 8866).

Session description

The Session Description Protocol describes a session as a group of fields in a text-based format, one field per line. The form of each field is as follows.

<character>=<value><CR><LF>

Where <character> is a single case-sensitive character and <value> is structured text in a format that depends on the character. Values are typically UTF-8 encoded. Whitespace is not allowed immediately to either side of the equal sign.

Session descriptions consist of three sections: session, timing, and media descriptions. Each description may contain multiple timing and media descriptions. Names are only unique within the associated syntactic construct.

Fields must appear in the order shown; optional fields are marked with an asterisk:

  • Session description
    v=  (protocol version number, currently only 0)
    o=  (originator and session identifier : username, id, version number, network address)
    s=  (session name : mandatory with at least one UTF-8-encoded character)
    i=* (session title or short information)
    u=* (URI of description)
    e=* (zero or more email address with optional name of contacts)
    p=* (zero or more phone number with optional name of contacts)
    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 (each one starting by an "m=" line; see below)
  • Time description (mandatory)
    t=  (time the session is active)
    r=* (zero or more repeat times)
  • Media description (optional)
    m=  (media name and transport address)
    i=* (media title or information field)
    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 — overriding the Session attribute lines)

Below is a sample session description from RFC 4566. This session is originated by the user "jdoe", at IPv4 address 10.47.16.5. Its name is "SDP Seminar" and extended session information ("A Seminar on the session description protocol") is included along with a link for additional information and an email address to contact the responsible party, Jane Doe. This session is specified to last for two hours using NTP timestamps, with a connection address (which indicates the address clients must connect to or — when a multicast address is provided, as it is here — subscribe to) specified as IPv4 224.2.17.12 with a TTL of 127. Recipients of this session description are instructed to only receive media. Two media descriptions are provided, both using RTP Audio Video Profile. The first is an audio stream on port 49170 using RTP/AVP payload type 0 (defined by RFC 3551 as PCMU), and the second is a video stream on port 51372 using RTP/AVP payload type 99 (defined as "dynamic"). Finally, an attribute is included which maps RTP/AVP payload type 99 to format h263-1998 with a 90 kHz clock rate. RTCP ports for the audio and video streams of 49171 and 51373, respectively, are implied.

    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

The SDP specification is purely a format for session description. It is intended to be distributed over different transport protocols as necessary, including SAP, SIP, and RTSP. SDP could even be transmitted by email or as an HTTP payload.

Attributes

SDP uses attributes to extend the core protocol. Attributes can appear within the Session or Media sections and are scoped accordingly as session-level or media-level. New attributes are added to the standard occasionally through registration with IANA.

Attributes are either properties or values:

  • Property: a=flag conveys a Boolean property of the media or session.
  • Value: a=attribute:value provides a named parameter.

Two of these attributes are specially defined:

  • a=charset:encoding is used in the session or media sections to specify a different character encoding (as registered in the IANA registry) from the recommended default value (UTF-8) for standard protocol keys. These values contain a text that is intended to be displayed to a user.
  • a=sdplang:code is used to specify the language of text. Alternate text in multiple languages may be carried in the session, and selected automatically by the user agent according to user preferences.

In both cases, text fields intended to be displayed to a user are interpreted as opaque strings, but rendered to the user or application with the values indicated in the last occurrence of the fields charset and sdplang in the current media section, or otherwise their last value in the session section.

The parameters v, s, and o are mandatory, must not be empty, and should be UTF-8-encoded. They are used as identifiers and are not intended to be displayed to users.

A few other attributes are also present in the example, either as a session-level attribute (such as the attribute in property form a=recvonly), or as a media-level attribute (such as the attribute in value form a=rtpmap:99 h263-1998/90000 for the video in the example).

Time formats and repetitions

Absolute times are represented in Network Time Protocol (NTP) format (the number of seconds since 1900). If the stop time is 0 then the session is unbounded. If the start time is also zero then the session is considered permanent. Unbounded and permanent sessions are discouraged but not prohibited. Intervals can be represented with NTP times or in typed time: a value and time units (days: d, hours: h, minutes: m and seconds: s) sequence.

Thus an hour meeting from 10 am UTC on 1 August 2010, with a single repeat time a week later at the same time can be represented as:

        t=1280656800 1281265200
        r=604800 3600 0

Or using typed time:

        t=1280656800 1281265200
        r=7d 1h 0

When repeat times are specified, the start time of each repetition may need to be adjusted to compensate for daylight saving time changes so that it will occur at the same local time in a specific time zone throughout the period between the start time and the stop time.

Instead of specifying this time zone and having to support a database of time zones for knowing when and where daylight adjustments will be needed, the repeat times are assumed to be all defined within the same time zone, and SDP supports the indication of NTP absolute times when a daylight offset (expressed in seconds or using a type time) will need to be applied to the repeated start time or end time falling at or after each daylight adjustment. All these offsets are relative to the start time, they are not cumulative. NTP supports this with field z, which indicates a series of pairs whose first item is the NTP absolute time when a daylight adjustment will occur, and the second item indicates the offset to apply relative to the absolute times computed with the field r.

For example, if a daylight adjustment will subtract 1 hour on 31 October 2010 at 3 am UTC (i.e. 60 days minus 7 hours after the start time on Sunday 1 August 2010 at 10am UTC), and this will be the only daylight adjustment to apply in the scheduled period which would occur between 1 August 2010 up to the 28 November 2010 at 10 am UTC (the stop time of the repeated 1-hour session which is repeated each week at the same local time, which occurs 88 days later), this can be specified as:

        t=1280656800 1290938400
        r=7d 1h 0
        z=1288494000 -1h

If the weekly 1-hour session was repeated every Sunday for one full year, i.e. from Sunday 1 August 2010 3 am UTC to Sunday 26 June 2011 4 am UTC (stop time of the last repeat, i.e. 360 days plus 1 hour later, or 31107600 seconds later), so that it would include the transition back to Summer time on Sunday 27 March 2011 at 2 am (1 hour is added again to local time so that the second daylight transition would occur 209 days after the first start time):

        t=1280656800 1290938400
        r=7d 1h 0
        z=1288494000 -1h 1269655200 0

As SDP announcements for repeated sessions should not be made to cover very long periods exceeding a few years, the number of daylight adjustments to include in the z= parameter should remain small.

Sessions may be repeated irregularly over a week but scheduled the same way for all weeks in the period, by adding more tuples in the r parameter. For example, to schedule the same event also on Saturday (at the same time of the day) you would use:

        t=1280656800 1290938400
        r=7d 1h 0 6d
        z=1288494000 -1h 1269655200 0

The SDP protocol does not support repeating sessions monthly and yearly schedules with such simple repeat times, because they are irregularly spaced in time; instead, additional t/r tuples may be supplied for each month or year.

Notes

  1. Lines are terminated by a carriage return and a line feed character, but implementations may relax this by omitting the carriage return.
  2. The session information and session name values are subject to the encoding specified in any charset attribute of the section.
  3. This session-level attribute also applies to the described media unless the value is overridden by a media-level attribute.

References

  1. ^ Handley, Mark; Van Jacobson; Colin Perkins (July 2006). SDP: Session Description Protocol. IETF. doi:10.17487/RFC4566. RFC 4566.
  2. Salkintzis, Apostolis K. (2004). Mobile Internet: Enabling Technologies & Services. CRC Press. p. 11: 24–25. ISBN 0849316316. Retrieved 2019-07-11.
  3. Handley, Mark; Van Jacobson (April 1998). SDP: Session Description Protocol. IETF. doi:10.17487/RFC2327. RFC 2327.
  4. Begen, Ali; Mark Handley; P. Kyvizat; Colin Perkins (January 2021). SDP: Session Description Protocol. IETF. doi:10.17487/RFC8866. RFC 8866.
  5. An In-Depth Overview of SDP Archived 2011-07-13 at the Wayback Machine
  6. "Registry of the SDP Parameters". Internet Assigned Numbers Authority. Retrieved 2021-01-15.
  7. "Registry of the Character Sets Encodings, on the Internet Assigned Numbers Authority site".

External links

Categories: