RFC 4566 - SDP: Session Description Protocol(2)

时间:2006-11-02 来源: 作者: 点击:
5.3.SessionName("s=") s=sessionname The"s="fieldisthetextualsessionname.ThereMUSTbeoneand onlyone"s="fieldpersessiondescription.The"s="fieldMUSTNOT beemptyandSHOULDcontainISO10646characters(butseeals
  

5.3.  Session Name ("s=")

      s=<session name>

   The "s=" field is the textual session name.  There MUST be one and
   only one "s=" field per session description.  The "s=" field MUST NOT
   be empty and SHOULD contain ISO 10646 characters (but see also the
   "a=charset" attribute).  If a session has no meaningful name, the
   value "s= " SHOULD be used (i.e., a single space as the session
   name).

5.4.  Session Information ("i=")

      i=<session description>

   The "i=" field provides textual information 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 present, it specifies the character set used in the "i=" field.
   If the "a=charset" attribute is not present, the "i=" field MUST
   contain ISO 10646 characters in UTF-8 encoding.

   A single "i=" field MAY also be used for each media definition.  In
   media definitions, "i=" fields are primarily intended for labelling
   media streams.  As such, they are most likely to be useful when a
   single session has more than one distinct media stream of the same
   media type.  An example would be two different whiteboards, one for
   slides and one for feedback and questions.

   The "i=" field is intended to provide a free-form human-readable
   description of the session or the purpose of a media stream.  It is
   not suitable for parsing by automata.

5.5.  URI ("u=")

      u=<uri>

   A URI is a Uniform Resource Identifier as used by WWW clients [7].
   The URI should be a pointer to additional information about the
   session.  This field is OPTIONAL, but if it is present it MUST be
   specified before the first media field.  No more than one URI field
   is allowed per session description.

5.6.  Email Address and Phone Number ("e=" and "p=")

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

   The "e=" and "p=" lines specify contact information for the person
   responsible for the conference.  This is not necessarily the same
   person that created the conference announcement.

   Inclusion of an email address or phone number is OPTIONAL.  Note that
   the previous version of SDP specified that either an email field or a
   phone field MUST be specified, but this was widely ignored.  The
   change brings the specification into line with common usage.

   If an email address or phone number is present, it MUST be specified
   before the first media field.  More than one email or phone field can
   be given for a session description.

   Phone numbers SHOULD be given in the form of an international public
   telecommunication number (see ITU-T Recommendation E.164) preceded by
   a "+".  Spaces and hyphens may be used to split up a phone field to
   aid readability if desired.  For example:

      p=+1 617 555-6011

   Both email addresses and phone numbers can have an OPTIONAL free text
   string associated with them, normally giving the name of the person
   who may be contacted.  This MUST be enclosed in parentheses if it is
   present.  For example:

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

   The alternative RFC 2822 [29] name quoting convention is also 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, or alternatively in ISO-8859-1 or other encodings if
   the appropriate session-level "a=charset" attribute is set.

5.7.  Connection Data ("c=")

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

   The "c=" field contains 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 and additional "c="
   field(s) per media description, in which case the per-media values
   override the session-level settings for the respective media.

   The first sub-field ("<nettype>") is the network type, which is a
   text string giving the type of network.  Initially, "IN" is defined
   to have the meaning "Internet", but other values MAY be registered in
   the future (see Section 8).

   The second sub-field ("<addrtype>") is the address type.  This allows
   SDP to be used for sessions that are not IP based.  This memo only
   defines IP4 and IP6, but other values MAY be registered in the future
   (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 the value of the <addrtype> field.

   When the <addrtype> is IP4 and IP6, the connection address is defined
   as follows:

   o  If the session is multicast, the connection address will be an IP
      multicast group address.  If the session is not multicast, then
      the connection address contains the unicast IP address of the
      expected data source or data relay or data sink as determined by
      additional attribute fields.  It is not expected that unicast
      addresses will be given in a session description that is
      communicated by a multicast announcement, though this is not
      prohibited.

   o  Sessions using an IPv4 multicast connection address MUST also have
      a time to live (TTL) value present in addition to the multicast
      address.  The TTL and the address together define the scope with
      which multicast packets sent in this conference will be sent.  TTL
      values MUST be in the range 0-255.  Although the TTL MUST be
      specified, its use to scope multicast traffic is deprecated;

      applications SHOULD use an administratively scoped address
      instead.

   The TTL for the session is appended to the address using a slash as a
   separator.  An example is:

      c=IN IP4 224.2.36.42/127

   IPv6 multicast does not use TTL scoping, and hence the TTL value MUST
   NOT be present for IPv6 multicast.  It is expected that IPv6 scoped
   addresses will be used to limit the scope of conferences.

   Hierarchical or layered encoding schemes are data streams where the
   encoding from a single media source is split into a number of layers.
   The receiver can choose the desired quality (and hence bandwidth) by
   only subscribing to a subset of these layers.  Such layered encodings
   are normally transmitted in multiple multicast groups to allow
   multicast pruning.  This technique keeps unwanted traffic from sites
   only requiring certain levels of the hierarchy.  For applications
   requiring multiple multicast groups, we allow the following notation
   to be used for the connection address:

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

   If the number of addresses is not given, it is assumed to be one.
   Multicast addresses so assigned are contiguously allocated above the
   base address, so that, for example:

      c=IN IP4 224.2.1.1/127/3

   would state that addresses 224.2.1.1, 224.2.1.2, and 224.2.1.3 are to
   be used at a TTL of 127.  This is semantically identical to including
   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

   Similarly, an IPv6 example would be:

      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

   (remembering that the TTL field is not present in IPv6 multicast).

   Multiple addresses or "c=" lines MAY be specified on a per-media
   basis only if they provide 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.

5.8.  Bandwidth ("b=")

      b=<bwtype>:<bandwidth>

   This OPTIONAL field denotes the proposed bandwidth to be used by the
   session or media.  The <bwtype> is an alphanumeric modifier giving
   the meaning of the <bandwidth> figure.  Two values are defined in
   this specification, but other values MAY be registered in the future
   (see Section 8 and [21], [25]):

   CT If the bandwidth of a session or media in a session is different
      from the bandwidth implicit from the scope, a "b=CT:..." line
      SHOULD be supplied for the session giving the proposed upper limit
      to the bandwidth used (the "conference total" bandwidth).  The
      primary purpose of this is to give an approximate idea as to
      whether two or more sessions can coexist simultaneously.  When
      using the CT modifier with RTP, if several RTP sessions are part
      of the conference, the conference total refers to total bandwidth
      of all RTP sessions.

   AS The bandwidth is interpreted to be application specific (it will
      be the application’s concept of maximum bandwidth).  Normally,
      this will coincide with what is set on the application’s "maximum
      bandwidth" control if applicable.  For RTP-based applications, AS
      gives the RTP "session bandwidth" as defined in Section 6.2 of
      [19].

   Note that CT gives a total bandwidth figure for all the media at all
   sites.  AS gives a bandwidth figure for a single media at a single
   site, although there may be many sites sending simultaneously.

   A prefix "X-" is defined for <bwtype> names.  This is intended for
   experimental purposes only.  For example:

      b=X-YZ:128

   Use of 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 and, although no length limit is
   given, it is recommended that they be short.

   The <bandwidth> is interpreted as kilobits per second by default.
   The definition of a new <bwtype> modifier MAY specify that the
   bandwidth is to be interpreted in some alternative unit (the "CT" and
   "AS" modifiers defined in this memo use the default units).

5.9.  Timing ("t=")

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

   The "t=" lines specify the start and stop times for a session.
   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.  If
   the session is active at regular times, an "r=" line (see below)
   should be used in addition to, and following, a "t=" line -- in which
   case the "t=" line specifies the start and stop times of the repeat
   sequence.

   The first and second sub-fields give the start and stop times,
   respectively, for the session.  These values are the decimal
   representation of Network Time Protocol (NTP) time values in seconds
   since 1900 [13].  To convert these values to UNIX time, subtract
   decimal 2208988800.

   NTP timestamps are elsewhere represented by 64-bit values, which wrap
   sometime in the year 2036.  Since SDP uses an arbitrary length
   decimal representation, this should not cause an issue (SDP
   timestamps MUST continue counting seconds since 1900, NTP will use
   the value modulo the 64-bit limit).

   If the <stop-time> is set to zero, then the session is not bounded,
   though it will not become active until after the <start-time>.  If
   the <start-time> is also zero, the session is regarded as permanent.

   User interfaces SHOULD strongly discourage the creation of unbounded
   and permanent sessions as they give no information about when the
   session is actually going to terminate, and so make scheduling
   difficult.

   The general assumption may be made, when displaying unbounded
   sessions that have not timed out to the user, that an unbounded
   session will only be active until half an hour from the current time

   or the session start time, whichever is the later.  If behaviour
   other than this is required, an end-time SHOULD be given and modified
   as appropriate when new information becomes available about when the
   session should really end.

   Permanent sessions may be shown to the user as never being active
   unless there are associated repeat times that state precisely when
   the session will be active.

5.10.  Repeat Times ("r=")

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

   "r=" fields specify repeat times for a session.  For example, if a
   session is active at 10am on Monday and 11am on Tuesday for one hour
   each week for three months, then the <start-time> in the
   corresponding "t=" field would be the NTP representation of 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 corresponding "t=" field stop time would be the NTP
   representation of the end of the last session three months later.  By
   default, all fields are in seconds, so the "r=" and "t=" fields might
   be the following:

      t=3034423619 3042462419
      r=604800 3600 0 90000

   To make description more compact, times may also be given in units of
   days, hours, or minutes.  The syntax for these is a number
   immediately followed by a single case-sensitive character.
   Fractional units are not allowed -- a smaller unit should be used
   instead.  The following unit specification characters are allowed:

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

   Thus, the above session announcement could also have been written:

      r=7d 1h 0 25h

   Monthly and yearly repeats cannot be directly specified with a single
   SDP repeat time; instead, separate "t=" fields should be used to
   explicitly list the session times.

5.11.  Time Zones ("z=")

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

   To schedule a repeated session that spans a change from daylight
   saving time to standard time or vice versa, it is necessary to
   specify offsets from the base time.  This is required because
   different time zones change time at different times of day, different
   countries change to or from daylight saving time on different dates,
   and some countries do not have daylight saving time at all.

   Thus, in order to schedule a session that is at the same time winter
   and summer, it must be possible to specify unambiguously by whose
   time zone a session is scheduled.  To simplify this task for
   receivers, we allow the sender to specify the NTP time that a time
   zone adjustment happens and the offset from the time when the session
   was first scheduled.  The "z=" field allows the sender to specify a
   list of these adjustment times and offsets from the base time.

   An example might be the following:

      z=2882844526 -1h 2898848070 0

   This specifies that at time 2882844526, the time base by which the
   session’s repeat times are calculated is shifted back by 1 hour, and
   that at time 2898848070, the session’s original time base is
   restored.  Adjustments are always relative to the specified start
   time -- they are not cumulative.  Adjustments apply to all "t=" and
   "r=" lines in a session description.

   If a session is likely to last several years, it is expected that the
   session announcement will be modified periodically rather than
   transmit several years’ worth of adjustments in one session
   announcement.

5.12.  Encryption Keys ("k=")

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

   If transported over a secure and trusted channel, the Session
   Description Protocol MAY be used to convey encryption keys.  A simple
   mechanism for key exchange is provided by the key field ("k="),
   although this is primarily supported for compatibility with older
   implementations and its use is NOT RECOMMENDED.  Work is in progress
   to define new key exchange mechanisms for use with SDP [27] [28], and
   it is expected that new applications will use those mechanisms.

   A key field is permitted before the first media entry (in which case
   it applies to all media in the session), or for each media entry as
   required.  The format of keys and their usage are outside the scope
   of this document, and the key field provides no way to indicate the
   encryption algorithm to be used, key type, or other information about
   the key: this is assumed to be provided by the higher-level protocol
   using SDP.  If there is a need to convey this information within SDP,
   the extensions mentioned previously SHOULD be used.  Many security
   protocols require two keys: one for confidentiality, another for
   integrity.  This specification does not support transfer of two keys.

   The method indicates the mechanism to be used to obtain a usable key
   by external means, or from the encoded encryption key given.  The
   following methods are defined:

      k=clear:<encryption key>

         The encryption key is included untransformed in this key field.
         This method MUST NOT be used unless it can be guaranteed that
         the SDP is conveyed over a secure channel.  The encryption key
         is interpreted as text according to the charset attribute; use
         the "k=base64:" method to convey characters that are otherwise
         prohibited in SDP.

      k=base64:<encoded encryption key>

         The encryption key is included in this key field but has been
         base64 encoded [12] because it includes characters that are
         prohibited in SDP.  This method MUST NOT be used unless it can
         be guaranteed that the SDP is conveyed over a secure channel.

      k=uri:<URI to obtain key>

         A Uniform Resource Identifier is included in the key field.
         The URI refers to the data containing the key, and may require
         additional authentication before the key can be returned.  When
         a request is made to the given URI, the reply should specify
         the encoding for the key.  The URI is often an Secure Socket
         Layer/Transport Layer Security (SSL/TLS)-protected HTTP URI
         ("https:"), although this is not required.

      k=prompt

         No key is included in this SDP description, but the session or
         media stream referred to by this key field is encrypted.  The
         user should be prompted for the key when attempting to join the
         session, and this user-supplied key should then be used to

         decrypt the media streams.  The use of user-specified keys is
         NOT RECOMMENDED, since such keys tend to have weak security
         properties.

   The key field MUST NOT be used unless it can be guaranteed that the
   SDP is conveyed over a secure and trusted channel.  An example of
   such a channel might be SDP embedded inside an S/MIME message or a
   TLS-protected HTTP session.  It is important to ensure that the
   secure channel is with the party that is authorised to join the
   session, not an intermediary: if a caching proxy server is used, it
   is important to ensure that the proxy is either trusted or unable to
   access the SDP.

5.13.  Attributes ("a=")

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

   Attributes are the primary means for extending SDP.  Attributes may
   be defined to be used as "session-level" attributes, "media-level"
   attributes, or both.

   A media description may have any number of attributes ("a=" fields)
   that are media specific.  These are referred to as "media-level"
   attributes and add information about the media stream.  Attribute
   fields can also be added before the first media field; these
   "session-level" attributes convey additional information that applies
   to the conference as a whole rather than to individual media.

   Attribute fields may be of two forms:

   o  A property attribute is simply of the form "a=<flag>".  These are
      binary attributes, and the presence of the attribute conveys that
      the attribute is a property of the session.  An example might be
      "a=recvonly".

   o  A value attribute is of the form "a=<attribute>:<value>".  For
      example, a whiteboard could have the value attribute "a=orient:
      landscape"

   Attribute interpretation depends on the media tool being invoked.
   Thus receivers of session descriptions should be configurable in
   their interpretation of session descriptions in general and of
   attributes in particular.

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

   Attribute values are octet strings, and MAY use any octet value
   except 0x00 (Nul), 0x0A (LF), and 0x0D (CR).  By default, attribute
   values are to be interpreted as in ISO-10646 character set with UTF-8
   encoding.  Unlike other text fields, attribute values are NOT
   normally affected by the "charset" attribute as this would make
   comparisons against known values problematic.  However, when an
   attribute is defined, it can be defined to be charset dependent, in
   which case its value should be interpreted in the session charset
   rather than in ISO-10646.

   Attributes MUST be registered with IANA (see Section 8).  If an
   attribute is received that is not understood, it MUST be ignored by
   the receiver.

5.14.  Media Descriptions ("m=")

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

   A session description may contain a number of media descriptions.
   Each media description starts with an "m=" field and is terminated by
   either the next "m=" field or by the end of the session description.
   A media field has several sub-fields:

   <media> is the media type.  Currently defined media are "audio",
      "video", "text", "application", and "message", although this list
      may be extended in the future (see Section 8).

   <port> is the transport port to which the media stream is sent.  The
      meaning of the transport port depends on the network being used as
      specified in the relevant "c=" field, and on the transport
      protocol defined in the <proto> sub-field of the media field.
      Other ports used by the media application (such as the RTP Control
      Protocol (RTCP) port [19]) MAY be derived algorithmically from the
      base media port or MAY be specified in a separate attribute (for
      example, "a=rtcp:" as 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 requested to send
      media to a <port> that is odd and where the "a=rtcp:" is present
      MUST NOT subtract 1 from the RTP port: that is, they MUST send the
      RTP to the port indicated in <port> and send the RTCP to the port
      indicated in the "a=rtcp" attribute.

      For applications where hierarchically encoded streams are being
      sent to a unicast address, it may be necessary to specify multiple
      transport ports.  This is done using a similar notation to that
      used for IP multicast addresses in the "c=" field:

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

      In such a case, the ports used depend on the transport protocol.
      For RTP, the default is that only the even-numbered ports are used
      for data with the corresponding one-higher odd ports used for the
      RTCP belonging to the RTP session, and the <number of ports>
      denoting the number of RTP sessions.  For example:

         m=video 49170/2 RTP/AVP 31

      would specify that ports 49170 and 49171 form one RTP/RTCP pair
      and 49172 and 49173 form the second RTP/RTCP 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 (for example, "a=rtcp:" as defined in [22]).
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容