Session description
The Session Description Protocol describes a session as a group of fields in a text-based format, one field per line.Lines are terminated by a carriage return and a line feed character, but implementations may relax this by omitting the carriage return. The form of each field is as follows.Where=
is a single case-sensitive character and
is structured text in a format that depends on the character. Values are typically UTF-8 encoded.The ''session information'' and ''session name'' values are subject to the encoding specified in any ''charset'' attribute of the section. 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)''
* ' (mandatory)
t= (time the session is active)
r=* (zero or more repeat times)
* ' (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.
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''),This session-level attribute also applies to the described media unless the value is overridden by a media-level attribute. 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= r=604800 3600 0 Or using typed time: t= r=7d 1h 0 When repeat times are specified, the start time of each repetition may need to be adjusted to compensate forNotes
References
External links
* {{Authority control Internet Standards Java specification requests VoIP protocols