<?xml version='1.0' ?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
  <!ENTITY rfc3261 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3261.xml'>
  <!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
  <!ENTITY rfc2141 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2141.xml'>
  <!ENTITY rfc2648 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2648.xml'>
  <!ENTITY rfc2474 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2474.xml'>
  <!ENTITY rfc3023 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3023.xml'>
  <!ENTITY rfc3264 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3264.xml'>
  <!ENTITY rfc4855 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4855.xml'>
  <!ENTITY rfc4856 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4856.xml'>
  <!ENTITY rfc4566 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4566.xml'>
  <!ENTITY rfc4629 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4629.xml'>
  <!ENTITY rfc3688 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml'>
  <!ENTITY rfc4574 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4574.xml'>
  <!ENTITY rfc4975 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4975.xml'>
  <!ENTITY rfc4976 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4976.xml'>
  <!ENTITY i-d.ietf-behave-turn PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-behave-turn.xml'>
  <!ENTITY w3c.REC-xml-20040204 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-xml-20040204.xml'>
  <!ENTITY w3c.REC-xml-names-19990114 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml4/reference.W3C.REC-xml-names-19990114'>
  <!ENTITY i-d.ietf-sipping-config-framework PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sipping-config-framework.xml'>
  <!ENTITY i-d.ietf-sip-session-policy-framework PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sip-session-policy-framework.xml'>
  <!ENTITY i-d.ietf-sipping-profile-datasets PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sipping-profile-datasets.xml'>

]>
<rfc ipr='trust200902' category='std' docName='draft-ietf-sipping-media-policy-dataset-08'>

<?rfc toc='yes'?>
<?rfc compact='yes'?>
<?rfc sortrefs='yes'?>

<front>
  <title abbrev='Media Policy Dataset'>A User Agent Profile Data Set for Media Policy</title>
  <author initials='V.H.' surname='Hilt' fullname='Volker Hilt'>
    <organization>Bell Labs/Alcatel-Lucent</organization>
    <address>
      <postal>
	<street>791 Holmdel-Keyport Rd</street>
	<city>Holmdel</city> <region>NJ</region>
	<code>07733</code>
	<country>USA</country>
      </postal> 
      <email>volkerh@bell-labs.com</email>
    </address>
  </author>
  <author initials='D.W.' surname='Worley' fullname='Dale R. Worley'>
    <organization>Nortel Networks Corp.</organization>
    <address>
      <postal>
	<street>600 Technology Park Dr.</street>
	<city>Billerica</city> <region>MA</region>
	<code>01821</code>
	<country>US</country>
      </postal> 
      <email>dworley@nortel.com</email>
    </address>
  </author>
  <author initials="G." surname="Camarillo" fullname="Gonzalo Camarillo">
    <organization>Ericsson</organization> 
    <address>
      <postal>
        <street>Hirsalantie 11</street>
	<code>02420</code> 
	<city>Jorvas</city> 
	<country>Finland</country>
      </postal>
      <email>Gonzalo.Camarillo@ericsson.com</email>
    </address>
  </author>
  <author initials='J.R.' surname='Rosenberg' fullname='Jonathan Rosenberg'>
    <organization>Cisco</organization>
    <address>
      <postal>
	<city>Edison</city><region>NJ</region>
	<country>USA</country>
      </postal> 
      <email>jdrosen@cisco.com</email>
    </address>
  </author>
  <date month='July' year='2009' />
  <area>Transport</area>
  <workgroup>SIPPING Working Group</workgroup>
  <keyword>SIP</keyword>
  <keyword>Session Policy</keyword>
  <keyword>Data Set</keyword>
  <abstract>
    <t>This specification defines a document format for the media
    properties of Session Initiation Protocol (SIP) sessions. Examples
    for media properties are the codecs or media types used in a
    session. This document format is based on XML and extends the
    Schema for SIP User Agent Profile Data Sets. It can be used to
    describe the properties of a specific SIP session or to define
    policies that are then applied to different SIP sessions.</t> 
  </abstract>
</front>

<middle>
  <section title="Introduction">

    <t>The Framework for Session Initiation Protocol (SIP) <xref
    target="RFC3261"/> User Agent Profile Delivery <xref
    target="I-D.ietf-sipping-config-framework" /> and the Framework
    for SIP Session Policies <xref
    target="I-D.ietf-sip-session-policy-framework" /> define
    mechanisms to convey session policies and configuration
    information from a network server to a user agent. An important 
    piece of the information conveyed to the user agent relates to the
    media properties of the SIP sessions set up by the user
    agent. Examples for these media properties are the codecs and
    media types used, the media-intermediaries to be traversed or the
    maximum bandwidth available for media streams.</t>

    <t>This specification defines a document format for media
    properties of SIP sessions, the Media Policy Dataset Format
    (MPDF). This format can be used in two ways: first, it can be used
    to describe the properties of a given SIP session (e.g., the media
    types and codecs used). These MPDF documents are called session
    info documents and they are usually created based on the session 
    description of a session. Second, the MPDF format can be used to
    define policies for SIP sessions in a session policy document. A
    session policy document defines properties (e.g., the media types)
    that can or can not be used in a session, independent of a
    specific session description.</t>

    <t>If used with the Framework for SIP Session Policies <xref
    target="I-D.ietf-sip-session-policy-framework" />, session info
    documents are used in conjunction with session-specific
    policies. A session info document is created by a UA based on the
    current session description and submitted to the policy
    server. The policy server examines the session info document,
    modifies it if necessary (e.g., by removing video streams if video
    is not permitted) and returns the possibly modified session info
    document to the UA. Session policy documents on the other hand are
    used to describe session-independent policies that can be
    submitted to the UA independent of a specific session.</t>

    <t>The two types of MPDF documents, session information and
    session policy documents, share the same set of XML elements to
    describe session properties. Since the usage of these elements
    differs between the two document types, they both use different
    root elements: &lt;session-info&gt; is the root element for
    session information documents and &lt;session-policy&gt; is the
    root element for session policy documents. This enables the
    recipient of a document to determine the document type and to
    correctly interpret the media properties defined. </t>

    <t>A user agent can receive multiple session policy documents from
    different sources. These documents need to be merged into a single
    document the user agent can work with. This document specifies
    rules for merging each of the XML elements defined. It should be
    noted that these merging rules are part of the semantics of the
    XML element. User agents implement the merging rules as part of
    implementing the element semantics. As a consequence, it is not
    possible to build an entity that can mechanically merge two
    session policy documents without understanding the semantics of
    all elements in the input documents. The <xref
    target="I-D.ietf-sipping-profile-datasets"> Schema for SIP User
    Agent Profile Data Sets  </xref> describes common merging rules
    that are referred to in this specification.</t>

    <t>Merging is not needed for session information documents since
    they are created by one source and describe a specific
    session.</t>

  </section>

  <section title="Terminology">

    <t>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
    <xref target="RFC2119">RFC 2119</xref>.</t>

  </section>

  <section title="Design Considerations">

    <t>This section discusses design considerations for the Media
    Policy Dataset Format.</t>

    <section title="Namespace and MIME Type">

      <t>The MPDF format is based on XML <xref
      target="W3C.REC-xml-20040204" />. A MPDF document MUST be
      well-formed and MUST be valid according to schemas, including
      extension schemas, available to the validator and applicable to
      the XML document. MPDF documents MUST be based on XML 1.0 and
      MUST be encoded using UTF-8.</t>

      <t>MPDF makes use of XML namespaces <xref
      target="W3C.REC-xml-names-19990114" />. The namespace URIs for
      schemas defined in this specification are <xref
      target="RFC2141">URNs</xref>, using the namespace identifier 
      'ietf' defined by <xref target="RFC2648" /> and extended by
      <xref target="RFC3688"/>. The namespace 
      URN for the MPDF schema is:</t>

      <t><list style="empty">
        <t>urn:ietf:params:xml:ns:mediadataset</t>
      </list></t>

      <t>The MIME type for the Media Policy Dataset Format is:</t> 

      <t><list style="empty">
        <t>application/media-policy-dataset+xml</t>
      </list></t>

    </section>

    <section title="Extensibility">

      <t>The MPDF format extends the  <xref
      target="I-D.ietf-sipping-profile-datasets">Schema for SIP User
      Agent Profile Data Sets </xref> by specifying a data set for
      media properties. Elements from the MPDF namespace can be used
      in conjunction with elements from other extensions of this
      schema.</t>

      <t>The MPDF format itself can also be extended using XML
      extension mechanisms if additional media properties are
      needed. In particular, elements from different XML 
      namespaces MAY be present within a MPDF document for the
      purposes of extensibility; elements or attributes from unknown
      namespaces MUST be ignored.</t>

    </section>

    <section title="Inheritance from the Profile Data Set" anchor="sec:attributes"> 

      <t>The MPDF format inherits the following attributes from the
      <xref target="I-D.ietf-sipping-profile-datasets">Profile Data
      Set Schema</xref>:</t>

      <t><list style='symbols'>
        <t>Property Access Control: 'visibility' attribute</t>  
        <t>Policies: 'policy' and 'excluded-policy' attribute</t> 
  	<t>Unidirectional Properties: 'direction' attribute</t> 
	<t>Preferences: 'q' attribute</t>
      </list></t>

      <t>The use of these attributes is defined individually for each
      element in the XML format below.</t>  

      <t>The MPDF format also uses merging algorithms that are defined
      in the Profile Data Set Schema. The use of these algorithms is
      defined individually for each element in the XML format
      below.</t>

    </section>

  </section>

  <section title="Session Info Documents">

    <t>Session info documents describe key properties of a SIP session
    such as the media streams used in the session. Session info
    documents are typically created based on an <xref
    target="RFC4566">SDP</xref> session description or an SDP
    offer/answer pair <xref target="RFC3264" />.</t>

    <t>Session info documents can be used for session-specific
    policies <xref target="I-D.ietf-sip-session-policy-framework"
    />. In this usage, a UA creates a session info document based on
    its SDP description(s) and sends this document to the policy
    server. The policy server modifies this document according to the
    policies that apply to the described session and returns a version
    of the session info document that is compliant to all
    policies. For example, if video streams are not permissible under
    current policies and the UA submits a session info document that
    contains a video stream, the policy server will remove the video
    stream from the XML markup and return the modified session info
    document to the UA.</t>

    <t>Session info documents use the &lt;session-info&gt;
    element.</t>

    <t>A policy server can completely reject a session by returning an
    session info document with an empty &lt;session-info&gt; element: </t>

    <t><list style="empty">
        <t>&lt;session-info&gt;&lt;\session-info&gt;</t>
    </list></t>

    <section title="The <session-info> Element">

      <t>The &lt;session-info&gt; element describes the properties of
      a specific SIP session. The &lt;session-info&gt; element MAY
      occur multiple times inside a &lt;property_set&gt; <xref
      target="I-D.ietf-sipping-profile-datasets" /> element.</t>

      <t>The &lt;session-info&gt; element MAY contain one optional
      &lt;streams&gt;, &lt;context&gt; and multiple (including zero)
      &lt;max-bw&gt;, &lt;max-session-bw&gt;, &lt;max-stream-bw&gt;,
      &lt;media-intermediaries&gt; 
      and &lt;qos-dscp&gt; elements as well as elements from other 
      namespaces. The MPDF elements are defined in <xref
      target="sec:elements" />.</t>

    </section>

    <section title="Mapping SDP to Session Info Documents">
    
      <t>If a UA has an SDP offer as well as an answer <xref
      target="RFC3264" /> and wants to create a session info document,
      the UA MUST use the answer to fill in the elements of the session
      info document except for the remote-host-port and
      local-host-port elements, which are taken from the remote and
      local session description respectively. The local 
      session description is the one created locally by the UA
      (i.e., the offer if the UA has initiated the offer/answer
      exchange). The remote session description is the one received
      from the remote UA.</t>

      <t>The following rules describe the creation of session info
      documents based on SDP description(s) for a few exemplary
      elements. Other elements are created following the same
      principles.</t>

      <t>A UA MUST create a separate &lt;stream&gt; element for each
      m= line in an SDP description. The UA MUST insert the media type
      from the m= line into a &lt;media-type&gt; element and MUST
      create a &lt;codec&gt; element for each codec listed in the m=
      line.</t>
      
      <t>The UA MUST create a &lt;local-host-port&gt; element for each
      stream using the port taken from the m= line and the address
      from the corresponding c= line of the local session
      description. The UA MUST create a &lt;remote-host-port&gt;
      element using the port and address from the m= and c= lines for
      the same stream taken from the remote session description if
      this session description is available.</t>

      <t>The mapping from a session info document to a SDP description 
      follows the same rules in the reverse direction.</t>

<!--
      <t>If a b= line is present for a media stream, this line MUST be
      used to create the bandwidth elements.</t>
-->

    </section>

  </section>

  <section title="Session Policy Documents">

    <t>Session policy documents describe a policy for SIP
    sessions. Session policy documents are independent of a specific
    session description and express general policies for SIP
    sessions. A session policy document is used to determine if a
    SIP session is policy conformant and to modify this session, if
    needed, according to the described policies.</t>  

    <t>Session policy documents can be used to encode
    session-independent policies
    <xref target="I-D.ietf-sip-session-policy-framework" />. In this
    usage, a policy server creates a session policy document and
    passes this document to a UA. The UA applies the policies defined
    to the SIP sessions it is establishing. For example, a session
    policy document can contain an element that prohibits the use of
    video. To set up a session that is compliant to this policy, a UA
    does not include the media type video in its SDP offer or
    answer. </t> 

    <t>Session policy documents use the &lt;session-policy&gt;
    element.</t>

    <section title="The <session-policy> Element">

      <t>The &lt;session-policy&gt; element describes a policy that
      applies to SIP sessions. The &lt;session-policy&gt; element MAY
      occur multiple times inside a &lt;property_set&gt; <xref
      target="I-D.ietf-sipping-profile-datasets" /> element.</t>

      <t>The &lt;session-policy&gt; element MAY contain one optional
      &lt;context&gt; and &lt;local-ports&gt; element and multiple
      (including zero) &lt;media-types&gt;, &lt;codecs&gt;,
      &lt;max-bw&gt;, &lt;max-session-bw&gt;, &lt;max-stream-bw&gt;
      and &lt;qos-dscp&gt; elements as well as
      elements from other namespaces. The MPDF elements are defined in
      <xref target="sec:elements" />.</t>

    </section>

<!--
    <section title="Mapping Session Policy Documents to SDP">

      <t>TBD.</t>

    </section>
-->

  </section>

  <section title="Media Property Elements" anchor="sec:elements">

    <t>This section describes XML elements that are used in session
    info and session policy documents to encode the media properties
    of SIP sessions.</t>

<!--
    <section title="The 'stream-label' Attribute" anchor="sec:stream-label">

      <t>Some properties only apply to a specific media stream. The
      stream to which a property applies MUST be identifiable through
      a label <xref target="I-D.ietf-mmusic-sdp-media-label"
      />. Per-stream properties can be expressed by adding a
      'stream-label' attribute to the respective element. Such a
      property only applies to the identified stream. If there is no
      stream with this label, the element must be ignored.</t>

      <t>Per-stream properties require that the labels of media
      streams are known to the creator of a document (i.e., the profile
      delivery/policy server). These labels are part of the session
      description.</t>

    </section>
-->

    <section title="The <media-types> Element" anchor="sec:mediatypes">

      <t>The &lt;media-types&gt; element is a container that is used
      to define the set of media types (e.g., audio, video) that can or
      cannot be used in a session. A specific media type is included
      in the set by adding the corresponding &lt;media-type&gt;
      element to this container.</t> 

      <t>The &lt;media-types&gt; element can only be used in session
      policy document (i.e., inside the &lt;session-policy&gt;
      container).</t>

      <t>This element MAY have the following attributes (see <xref
      target="sec:attributes" />): direction, visibility,
      excluded-policy.</t> 

<!--
      The 'excluded-policy' attribute specifies the default policy for
      all media types that are not listed inside this element.</t>
-->

      <t>Multiple &lt;media-types&gt; elements MAY only be present in
      a container element if each applies to a different set of
      streams (e.g., one &lt;media-types&gt; element for incoming and
      one for outgoing streams). The &lt;media-types&gt; element MUST
      contain one or more &lt;media-type&gt; elements.</t>

      <t><list style="empty">
        <t>Merging of session-policy documents: &lt;media-types&gt;
        containers are merged using the "Multiple Enumerated Value
        Merging Algorithm" <xref
        target="I-D.ietf-sipping-profile-datasets"/>.</t>
      </list></t>

      <section title="The <media-type> Element" anchor="sec:mediatype">

	<t>The &lt;media-type&gt; element identifies a specific media
        type. The value of this element MUST be the name of a IANA
        registered media type (see <xref
        target="RFC4566">RFC4566</xref>), such as 'audio', 'video',
        'text', or 'application'. </t>

	<t>This element MAY have the following attribute (see <xref
	target="sec:attributes" />): q.</t>

	<t>If used inside a &lt;session-policy&gt; element, this
	element MAY have the following additional attribute (see <xref
	target="sec:attributes" />): policy. Media types that have the
	policy 'allowed' MAY be used and media types with the policy
	'disallowed' MUST NOT be used.</t>

      </section>

    </section>

    <section title="The <codecs> Element">

      <t>The &lt;codecs&gt; element is a container that is used to
      define the set of codecs that may or may not be used in a
      session. A policy MUST allow the use of at least one codec per
      media type. A specific codec is included in the set by adding
      the corresponding &lt;codec&gt; element to this container.</t> 

      <t>The &lt;codecs&gt; element can only be used in a session
      policy document (i.e., inside the &lt;session-policy&gt;
      container).</t>

      <t>The &lt;codecs&gt; element MAY have the following attributes
      (see <xref target="sec:attributes" />): direction, visibility,
      excluded-policy.</t>

      <t>Multiple &lt;codecs&gt; elements MAY only be present in a
      container element if each applies to a different set of streams
      (e.g., one &lt;codecs&gt; element for incoming and one for
      outgoing streams). The &lt;codecs&gt; element MUST contain one
      or more &lt;codec&gt; elements.</t>

      <t><list style="empty">
  	<t>Merging of session-policy documents: &lt;codecs&gt;
        containers are merged using the "Multiple Enumerated Value
        Merging Algorithm" <xref
        target="I-D.ietf-sipping-profile-datasets"/>.</t>
      </list></t>

      <section title="The <codec> Element">
	  
        <t>The &lt;codec&gt; element identifies a specific codec. The
        content of this element MUST be a registered MIME type <xref
        target="RFC4855" /> using media type and subtype
        (e.g., audio/PCMA <xref target="RFC4856"/> or video/H263 <xref
        target="RFC4629"/>) and possibly additional registered MIME
        type parameters.</t>

	<t>The &lt;codec&gt; element MAY have the following attribute
	(see <xref target="sec:attributes" />): q.</t> 

	<t>If used inside a &lt;session-policy&gt; element, the
        &lt;codec&gt; element MAY have the following additional
        attribute (see <xref target="sec:attributes" />):
        policy. Codecs that have the policy 'allowed' MAY be used and
        codecs with the policy 'disallowed' MUST NOT be used.</t>

	<t>The &lt;codec&gt; element MUST contain one
	&lt;mime-type&gt; element and MAY contain multiple optional
	&lt;mime-parameter&gt; elements.</t> 

        <section title="The <mime-type> Element">

	  <t>The &lt;mime-type&gt; element contains a MIME type that
          identifies a codec. The value of this element MUST be a
          combination of a registered MIME media type and subtype
          <xref target="RFC4855" /> separated by a "/"
          (e.g., audio/PCMA, audio/G726-16 <xref target="RFC4856"/> or
          video/H263 <xref target="RFC4629"/>). </t>

        </section>

        <section title="The <mime-parameter> Element">

	  <t>The &lt;mime-parameter&gt; element may be needed for some
          codecs to identify a particular encoding or profile. The
          value of this element MUST be a name-value pair containing
          the name and the value of a registered MIME type parameter
          for the codec <xref target="RFC4855" />. The name and value
          are separated by a "=". For example, the parameter
          "profile=0" can be used to specify a specific profile for
          the codec "video/H263-2000" <xref target="RFC4629"/>.</t>

        </section>

      </section>

    </section>

    <section title="The <streams> Element">

      <t>The &lt;streams&gt; element is a container that is used to
      describe the media streams used in a session. A &lt;streams&gt;
      element can contain multiple &lt;stream&gt; elements. Each 
      &lt;stream&gt; element describes the properties (e.g., media
      type, codecs and IP addresses and ports) of a single media
      stream.</t>

      <t>The &lt;streams&gt; element is only defined for session
      information documents (i.e., in a &lt;session-info&gt;
      container).</t>

      <t>The &lt;streams&gt; element MUST contain one or more
      &lt;stream&gt; elements.</t> 

      <section title="The <stream> Element">
	  
        <t>The &lt;stream&gt; element describes a specific media
	stream. It contains the media type, codecs and the
	hostname(s) or IP address(es) and port(s) of this stream.</t>
	
	<t>The hostname(s) or IP address(es) and port number(s)
	of a stream correspond to the ones listed in the session
	description(s). A UA that generates &lt;stream&gt; element
	MUST insert the hostname/port found in the local session 
	description for this media stream into the local-host-port
	element. The UA MUST insert the hostname/port of the remote
	session description into the remote-host-port element, if the
	remote session description is available to the UA. If not, the
	UA generates a stream element that only contains the
	local-host-port element. </t>

	<t>This element MAY have the following attributes (see <xref
	target="sec:attributes" />): direction, label.</t> 

        <t>The label attribute is used to identify a specific media
        stream in a session description. The value of the label
        attribute is a token. The token can be chosen freely, however,
        it MUST be unique among all &lt;stream&gt; element in a
        session-info document. If a label attribute <xref
        target="RFC4574"/> is present in the SDP description, its
        value MUST be carried over to the label attribute of the
        corresponding &lt;stream&gt; element.</t>

	<t>The &lt;stream&gt; element MUST contain one
        &lt;media-type&gt; element, one or more &lt;codec&gt; elements
        and one &lt;local-host-port&gt; element. The &lt;stream&gt;
        element MAY contain one &lt;remote-host-port&gt; element.</t> 

        <section title="The <local-host-port> Element">

	  <t>The &lt;local-host-port&gt; element contains the hostname
          or IP address and the port number of the media stream in the
          local session description. The hostname or IP address is
          separated from the port by a ":". An example is:
          "host.example.com:49562".</t>
	    
	  <t>The hostname or IP address of element is found in the c=
 	  element for the stream in the local SDP description. The
 	  port number is found in the m= element.</t>

        </section>

        <section title="The <remote-host-port> Element">

          <t>The &lt;remote-host-port&gt; element is structured exactly as
 	  the &lt;local-host-port&gt; element. However, it identifies
 	  the hostname or IP address and port number of the media
 	  stream in the remote session description.</t> 
	    
        </section>

      </section>

    </section>
 
    <section title="The <max-bw> Element">

      <t>The &lt;max-bw&gt; element defines the overall maximum
      bandwidth in kilobits per second an entity can/will use for
      media streams at any point in time. It defines an upper limit
      for the total bandwidth an entity can/will use for the
      transmission of media streams. The limit corresponds to the sum
      of the maximum session bandwidth of all sessions a UA may set up
      in parallel.</t>

      <t>The bandwidth limit given in the &lt;max-bw&gt;
      element includes the bandwidth needed for lower-layer transport
      and network protocols (e.g., UDP and IP).</t>

      <t>The &lt;max-bw&gt; element MAY have the following
      attribute (see <xref target="sec:attributes" />): direction.</t>  

      <t>If used in a &lt;session-policy&gt; element, the
      &lt;max-bw&gt; element MAY have the following additional
      attribute (see <xref target="sec:attributes" />): visibility.</t>

      <t>If the &lt;max-bw&gt; element occurs multiple times in
      a container element, each instance MUST apply to a different set
      of media streams (i.e., one &lt;max-bw&gt; element for
      outgoing and one for incoming streams).</t>

      <t><list style="empty">
        <t>Merging of session-policy documents: the lowest
        max-bw value is used.</t> 
      </list></t>

    </section>

<!--
    <section title="The <max-bw-ti> Element">

      <t>The &lt;max-bw-ti&gt; element defined as the &lt;max-bw&gt;
      element with the following exceptions.</t>
      
      <t>The given bandwidth limit is transport independent and
      therefore does not include include the bandwidth needed for
      lower-layer transport and network protocols (e.g., UDP and
      IP).</t>

      <t>The bandwidth limit is given in bits per second (i.e., not in 
      kilobits per second).</t>

      <t>The &lt;max-bw-ti&gt; element MAY have the following
      attribute (see <xref target="sec:attributes" />): pprate.</t>  

      <t>The &lt;max-bw-ti&gt; element has an optional attribute
      'maxprate'. The "maxprate" value is the maximum packet rate
      calculated over all the declared media streams.  If this can't
      be measured (stored media) or estimated (live), the sum of all
      media level values provides a ceiling value.</t>

      <t>All other attributes and merging rules are defined as for the 
      &lt;max-bw&gt; element.</t>

    </section>
-->

    <section title="The <max-session-bw> Element">

      <t>The &lt;max-session-bw&gt; element defines the maximum
      bandwidth in kilobits per second an entity can/will use for
      media streams in the described session. It defines an upper
      limit for the total bandwidth of a single session. This limit
      corresponds to the sum of the maximum stream bandwidth of all
      media streams in a session.</t> 

      <t>The bandwidth limit given in the &lt;max-session-bw&gt;
      element includes the bandwidth needed for lower-layer transport
      and network protocols (e.g., UDP and IP).</t>

      <t>The value of the &lt;max-session-bw&gt; element is
      equivalent to the CT bandwidth in the b= line of an <xref 
      target="RFC4566">SDP</xref> announcement.</t>

      <t>The &lt;max-session-bw&gt; element MAY have the
      following attribute (see <xref target="sec:attributes" />):
      direction.</t>  

      <t>If used in a &lt;session-policy&gt; element, the
      &lt;max-session-bw&gt; element MAY have the following
      additional attribute (see <xref target="sec:attributes" />):
      visibility.</t>

      <t>If the &lt;max-session-bw&gt; element occurs multiple
      times in a container element, each instance MUST apply to a
      different set of media streams (i.e., one
      &lt;max-session-bw&gt; element for outgoing and one for
      incoming streams).</t>

      <t><list style="empty">
        <t>Merging of session-policy documents: the lowest
        max-session-bw value is used.</t> 
      </list></t>

    </section>

    <section title="The <max-stream-bw> Element">

      <t>The &lt;max-stream-bw&gt; element defines the maximum
      bandwidth in kilobits per second an entity can/will use for each
      media stream in the described session.</t>

      <t>The bandwidth limit given in the &lt;max-stream-bw&gt;
      element includes the bandwidth needed for lower-layer transport
      and network protocols (e.g., UDP and IP).</t>

      <t>The value of the &lt;max-stream-bw&gt; element is
      equivalent to the AS bandwidth in the b= line of an <xref 
      target="RFC4566">SDP</xref> announcement.</t>

      <t>The &lt;max-stream-bw&gt; element MAY have the
      following attribute (see <xref target="sec:attributes" />):
      direction, media-type.</t>

      <t>If used in a &lt;session-policy&gt; element, the
      &lt;max-stream-bw&gt; element MAY have the following
      additional attribute (see <xref target="sec:attributes" />):
      visibility.</t>  

      <t>If used in a &lt;session-info&gt; element, the
      &lt;max-stream-bw&gt; element MAY have the following additional
      attribute: label.</t> 

      <t>The media-type attribute is used to define that the
      &lt;max-stream-bw&gt; element only applies to streams of
      a certain media type. For example, it may only apply to audio
      streams. The value of the 'media-type' attribute MUST be the
      name of a IANA registered media type (see <xref
      target="RFC4566">RFC4566</xref>), such as 'audio', 'video',
      'text', or 'application'.</t>

      <t>The label attribute is used to define a bandwidth limit for a
      specific media stream. The use of this attribute requires that
      the &lt;stream&gt; element that represents the media stream to
      which this bandwidth limit applies also has a label attribute. A
      &lt;max-stream-bw&gt; element with a label attribute applies
      only to the stream element that has a label attribute with the
      same value. If no matching &lt;stream&gt; element exists, then
      the &lt;max-stream-bw&gt; element MUST be ignored.</t>

      <t>If the &lt;max-stream-bw&gt; element occurs multiple
      times in a container element, each instance MUST apply to a
      different set of media streams (i.e., one
      &lt;max-stream-bw&gt; element for outgoing and one for
      incoming streams).</t>

      <t><list style="empty">
        <t>Merging of session-policy documents: the lowest
        max-stream-bw value is used.</t> 
      </list></t>

    </section>

    <section title="The <media-intermediaries> Element">

      <t>The &lt;media-intermediaries&gt; element expresses a policy
      for routing a media stream through a media intermediary. The
      purpose of the &lt;media-intermediaries&gt; element is to tell
      the UA to send a media stream through one (or a chain of) media
      intermediaries. Instead of sending the media directly to its
      final destination, the UA specifies a source route, which
      touches each intermediary and then reaches the final
      recipient. If there are N hops, including the final recipient, 
      there needs to be a way for the media stream to specify N
      destinations.</t> 

      <t>The &lt;media-intermediaries&gt; element is a container that
      lists all media intermediaries to be traversed. Media
      intermediaries should be traversed in the order in which they
      appear in this list. The topmost entry should be traversed
      first, the last entry should be traversed last. </t>   

      <t>Different types of intermediaries exist. These intermediaries
      are not necessarily interoperable and it may not be possible to
      chain them in an arbitrary order. A &lt;media-intermediaries&gt;
      element SHOULD therefore only contain intermediary elements of
      the same type.</t>  

      <t>This element MAY have the following attributes (see <xref 
      target="sec:attributes" />): direction.</t>

      <t>Multiple &lt;media-intermediaries&gt; elements MAY only be
      present in a container if each applies to a different set of
      streams (e.g., one &lt;media-intermediaries&gt; element for
      incoming and one for outgoing streams). The
      &lt;media-intermediaries&gt; element MUST contain one or more
      elements defining a specific media intermediary, such as
      &lt;fixed-intermediary&gt; or &lt;turn-intermediary&gt;.</t>

      <t><list style="empty">
        <t>Merging of session-policy documents: the intermediaries
        defined in all policies are traversed. In general, local
        intermediaries should be traversed before remote
        intermediaries. During the merging process,
        &lt;media-intermediaries&gt; element values from different
        servers are ordered using the "Closest Value First Merging
        Algorithm" <xref
        target="I-D.ietf-sipping-profile-datasets"/>. The 
        intermediaries should be traversed in this order.</t> 
      </list></t>

      <t><list style="empty">
        <t>Note: it is not intended that the
        &lt;media-intermediaries&gt; element replaces connectivity
        discovery mechanisms such as ICE. Instead of finding media
        relays that provide connectivity, this element defines a
        policy for media intermediaries that should be traversed. The
        set of intermediaries defined in the
        &lt;media-intermediaries&gt; element and the ones discovered
        through ICE may overlap but don't have to.</t>  
      </list></t>

      <section title="The <fixed-intermediary> Element">

        <t>A fixed intermediary relies on pre-configured forwarding
        rules. The user agent simply sends media to the first media
        intermediary listed. It can assume that this media
        intermediary has been pre-configured with a forwarding rule
        for the media stream and knows where to forward the packets
        to. The configuration of forwarding rules in the intermediary
        must be done through other means.</t>

	<t>The contents of a &lt;fixed-intermediary&gt; element MUST
	be echoed to all policy servers that provide policies for a
	session. I.e., if multiple policy servers provide policies for
	the same session, this element needs to be forwarded to all of
	them, possibly in a second round of session-specific policy
	subscriptions as described in
	<xref target="I-D.ietf-sip-session-policy-framework" /> in 
	section Contacting the Policy Server.</t>

	<t>The &lt;fixed-intermediary&gt; element MUST contain one
        &lt;int-host-port&gt; element and MAY contain multiple optional
        &lt;int-addl-port&gt; elements.</t>

        <section title="The <int-host-port> Element">

          <t>The &lt;int-host-port&gt; element contains the hostname
 	  or IP address and port number of a media intermediary. The
 	  UA uses this hostname/IP address and port to send its media
 	  streams to the intermediary. The hostname or IP address is
 	  separated from the port by a ":".</t>

	  <t>If a protocol uses multiple subsequent ports (e.g., RTP),
 	  the lowest port number SHOULD be included in the
 	  &lt;int-host-port&gt; element. All additional port numbers 
 	  SHOULD be identified in &lt;int-addl-port&gt; elements.</t>

        </section>

        <section title="The <int-addl-port> Element">

          <t>If a protocol uses multiple subsequent ports (e.g., RTP),
	  the lowest port number SHOULD be included in the
	  &lt;int-host-port&gt; element. All additional port numbers
	  SHOULD be identified in &lt;int-addl-port&gt; elements.</t> 

        </section>

      </section>

      <section title="The <turn-intermediary> Element">
	
        <t>The TURN <xref target="I-D.ietf-behave-turn"/> protocol 
        provides a mechanism for inserting a relay into the media
        path. Although the main purpose of TURN is NAT traversal, it
        is possible for a TURN relay to perform other media
        intermediary functionalities. The user agent establishes a
        binding on the TURN server and uses this binding to transmit
        and receive media.</t> 

        <t>The &lt;turn-intermediary&gt; element MUST contain one
        &lt;int-host-port&gt; element and MAY contain multiple optional
	&lt;int-addl-port&gt; elements and zero or one each of the
        &lt;shared-secret&gt;, &lt;user&gt;, and &lt;transport&gt;
        elements. If no &lt;transport&gt; element is present, UDP is
        assumed.</t>

        <section title="The <shared-secret> Element">

	  <t>The &lt;shared-secret&gt; element contains the shared
	  secret needed to authenticate at the media intermediary.</t> 

        </section>

	<section title="The <user> element">
 
	  <t>The &lt;user&gt; element contains the user ID needed to
          authenticate to the media intermediary.</t>

	</section> 

	<section title="The <transport> Element">

	  <t>The &lt;transport&gt; element contains the name of the
          transport to be used for communicating with the TURN server.
          This document defines the values "tcp" and "udp" for use in
          the &lt;transport&gt; element. Other specifications may
          define additional values.</t>

        </section> 

      </section>

      <section title="The <msrp-intermediary> Element">
	
	<t>The MSRP Relay Extensions <xref target="RFC4976"/> define a
        means for incorporating relays into the media path of an MSRP
        <xref target="RFC4975"/> session. MSRP is explicitly designed
        for a variety of purposes, including policy enforcement.</t>

	<t>The &lt;msrp-intermediary&gt; element MUST contain one
        &lt;msrp-uri&gt; element, and may contain zero or one each of
        the &lt;shared-secret&gt; and &lt;user&gt; elements.</t>

        <section title="The <msrp-uri> Element">
  
	  <t>The &lt;msrp-uri&gt; element contains a URI that
          indicates the MSRP server to use for an intermediary. The UA
          uses this URI to authenticate with the MSRP relay, and then
          uses the URI it learns through that authentication process
          for any MSRP media it sends or receives. Only URIs with a
          scheme of "msrps:" are valid in the &lt;msrp-uri&gt;
          element.</t>

	</section>

      </section>

    </section>

    <section title="The <qos-dscp> Element">

      <t>The &lt;qos-dscp&gt; element contains an Differentiated
      Services Codepoint (DSCP) <xref target="RFC2474" /> value that
      should be used to populate the IP DS field of media packets. The
      &lt;qos-dscp&gt; contains an integer value that represents a 6
      bit field and therefore ranges from 0 to 63.</t> 

      <t>This element MAY have the following attributes (see <xref
      target="sec:attributes" />): direction, media-type.</t>  

      <t>If used in a &lt;session-policy&gt; element, the
      &lt;qos-dscp&gt; element MAY have the following additional
      attribute (see <xref target="sec:attributes" />):
      visibility.</t>

      <t>The media-type attribute is used to define that
      &lt;qos-dscp&gt; element only applies to streams of a certain
      media type. For example, it may only apply to audio streams. The
      value of the 'media-type' attribute MUST be the name of a IANA
      registered media type (see <xref
      target="RFC4566">RFC4566</xref>), such as 'audio', 'video',
      'text', or 'application'.</t>

<!--
      <t><list style="empty">
        <t>Open issue: need a better way to express per-stream
        qos-dscps.</t>
      </list></t>
-->

      <t>The &lt;qos-dscp&gt; element is optional and MAY occur
      multiple times inside a container. If the &lt;qos-dscp&gt;
      element occurs multiple times, each instance MUST apply to a
      different media stream (i.e., one &lt;qos-dscp&gt; element for
      audio and one for video streams).</t> 

      <t><list style="empty">
        <t>Merging of session-policy documents: the domain that is
        first traversed by the media stream has precedence and its
        DSCP value is used. During the merging process,
        &lt;qos-dscp&gt; element values from different servers are
        ordered using the "Closest Value First Merging Algorithm"
        <xref target="I-D.ietf-sipping-profile-datasets"/>. The DSCP
        value from the closest server is used.</t> 
      </list></t>

    </section>

    <section title="The <local-ports> Element">
        
      <t>Domains often require that a user agent only uses ports in a
      certain range for media streams. The &lt;local-ports&gt; element
      defines a policy for the ports a user agent can use for
      media. The value of this element consists of a start port and an
      end port separated by a "-". The start/end port is the
      first/last port that can be used.</t>

      <t>This element MAY have the following attributes (see <xref
      target="sec:attributes" />): visibility.</t>  

      <t>The &lt;local-ports&gt; element is only defined for session
      policy documents (i.e., in a &lt;session-policy&gt;
      container).</t>

      <t><list style="empty">
        <t>Merging of session-policy documents: the domain that is
        first traversed by the media stream has precedence and its
        local ports value is used. During the merging process,
        &lt;local-ports&gt; element values from different servers are
        ordered using the "Closest Value First Merging Algorithm" <xref
        target="I-D.ietf-sipping-profile-datasets"/>. The value from
        the closest server is used.</t> 
      </list></t>

    </section>

    <section title="The <context> Element">

      <t>The &lt;context&gt; element provides context information
      about a session policy or session information document.</t>

      <t>The &lt;context&gt; element MAY contain multiple
      &lt;contact&gt; and one &lt;info&gt; element.</t>  

      <t>If used in a &lt;session-policy&gt; element, the
      &lt;context&gt; element MAY also contain a
      &lt;policy-server-URI&gt; element.</t> 

      <t>If used in a &lt;session-info&gt; element, the
      &lt;context&gt; element MAY also contain a &lt;request-URI&gt;
      and a &lt;token&gt; element.</t> 

      <t><list style="empty">
        <t>Merging of session-policy documents: the &lt;context&gt;
        element is not subject to merging.</t>
      </list></t>

      <section title="The <policy-server-URI> Element">

        <t>The &lt;policy-server-URI&gt; element contains the URI of
        the policy server that has issued this policy.</t>

	<t>The &lt;policy-server-URI&gt; element is only defined
	inside a &lt;session-policy&gt; element.</t>

      </section> 

      <section title="The <contact> Element">

        <t>The &lt;contact&gt; element contains a contact address
        (e.g., a SIP URI or email address) under which the issuer of
        this document can be reached.</t>

      </section> 

      <section title="The <info> Element">

        <t>The &lt;info&gt; element provides a short textual
        description of the policy or session that should be
        intelligible to the human user.</t>

      </section> 

<!--
      <section title="The <call-ID> Element">

        <t>The &lt;call-ID&gt; element contains the call-ID (as
        defined in <xref target="RFC3261">RFC3261</xref>) of the
        session that is described in this document. The
        &lt;call-ID&gt; element is only defined inside a
        &lt;session-info&gt; element.</t>

  	<t>The &lt;dialog-ID&gt; element is optional in a
        &lt;context&gt; element. The &lt;dialog-ID&gt; element MUST
        contain a &lt;call-ID&gt; and a &lt;local-tag&gt; and MAY
        contain a &lt;remote-tag&gt; element.</t>

	  <t>The &lt;local-tag&gt; element contains the local tag (as
	  defined in <xref target="RFC3261">RFC3261</xref>) of the
	  session the policies are for.</t> 

	  <t>The &lt;remote-tag&gt; element contains the remote tag (as
	  defined in <xref target="RFC3261">RFC3261</xref>) of the
	  session the policies are for. If the remote tag element is
	  omitted, the policies apply to all sessions that have the
	  given call-ID and local tag.</t>

	  <t>Local and remote tags are defined from the viewpoint of the
	  recipient of the document. </t>
      </section> 
-->

      <section title="The <request-URI> Element">

        <t>The &lt;request-URI&gt; element identifies the request-URI
        the dialog initiating request of a session is sent to.</t>

	<t>The &lt;request-URI&gt; element is only defined inside a
	&lt;session-info&gt; element.</t> 

      </section> 

      <section title="The <token> Element">

        <t>The &lt;token&gt; element provides a mechanism for a policy
        server to return an opaque token to a UA. This is sometimes
        needed to ensure that all requests for a session are routed to
        the same policy server. The use of this token is described in
        the Framework for SIP Session Policies <xref
        target="I-D.ietf-sip-session-policy-framework" />.</t>

	<t>The &lt;token&gt; element is only defined inside a
	&lt;session-info&gt; element.</t> 

      </section> 

    </section>

    <section title="Other Session Properties">

      <t>A number of additional elements have been proposed for a
      media property language. These elements are deemed to be outside
      the scope of this format. However, they may be defined in
      extensions of MPDF or other profile data sets.</t>

      <t><list style="symbols">
        <t>maximum number of streams</t>
        <t>maximum number of sessions</t>
        <t>maximum number of streams per session</t>
        <t>external address and port</t>
        <t>media transport protocol</t>
        <t>outbound proxy</t>
        <t>SIP methods</t>
        <t>SIP option tags</t>
        <t>SIP transport protocol</t>
        <t>body disposition</t>
        <t>body format</t>
        <t>body encryption</t>
      </list></t>
	  
    </section>

  </section>

<!--
  <section title="Media-Intermediaries"  anchor="sec:intermediaries">

    <t>A media policy can require that media streams traverse through
    an intermediary. This can be achieved using session-specific
    policies <xref target="I-D.ietf-sip-session-policy-framework" />
    and policy-info documents. </t>
    
    <t>When a policy server receives a session-info document, it
    allocates an internal and external port on the media intermediary
    for each media stream listed. The policy server configures each
    allocated external port such that data arriving on this port is
    forwarded to one of the local addresses/ports provided by the UA 
    in the session-info document. Effectively, the policy server binds
    an external address/port on the intermediary to a local
    address/port provided by the UA. The policy server then modifies
    the session-info document by replacing the local address/port with
    the corresponding external address/port on the media intermediary. </t>

    <t>After receiving a session-info document that contains the
    remote address/port, the policy server configures each allocated
    internal port on the intermediary such that all data arriving on
    this port is forwarded to one of the remote addresses/ports. It
    replaces the remote address/port in the session-info document with
    the corresponding internal address/port.</t>

    <t>This way, all media streams are set up so that incoming and
    outgoing streams traverse the media intermediary. An example for
    the insertion of a media intermediary is given in <xref
    target="sec:example2" />.</t>

  </section>
-->

  <section title="Examples">

    <section title="Session Policy Documents">

      <t>The following example describes a session policy document
      that allows the use of audio and video and prohibits the use of
      other media types. It allows the use of any codec except G.723
      and G.729.</t>  

      <t><figure><artwork><![CDATA[
<property-set>
  <session-policy>
    <context>
      <policy-server-URI>policy@biloxi.example.com</policy-server-URI>
      <contact>sip:policy_manager@example.com</contact>
      <info>Access network policies</info>
    </context>
    <media-types excluded-policy="disallow">
      <media-type policy="allow">audio</media-type> 
      <media-type policy="allow">video</media-type> 
    </media-types>
    <codecs excluded-policy="allow">
      <codec policy="disallow">
        <mime-type>audio/G729</mime-type>
      </codec>
      <codec policy="disallow">
        <mime-type>audio/G723</mime-type>
      </codec>
    </codecs>
  </session-policy>
</property-set>
]]></artwork></figure></t>

<!--
It requires that
      outgoing media streams are sent through a media intermediary
      using IP-in-IP tunneling.

  <codecs policy="allow">
    <codec policy="allow" q="0.8">PCMA</codec>
    <codec policy="allow" q="0.2">G729</codec>
    <codec policy="disallow">G723</codec>
  </codecs>
  <media-intermediary direction="sendonly" policy="mandatory">
    <int-host-port>192.0.2.0:6000</int-host-port>
    <int-lroute>ip-in-ip</int-lroute>
  </media-intermediary>
-->

    </section>

    <section title="Session Information Documents">

      <t>The following examples contain session descriptions and the
      session information documents that represent these
      sessions. </t>

      <section title="Example 1">

        <t>In this example, a session info document is created based
        on one session description. This session info document would
        be created, for example, by a UA that has composed an offer
        and is now contacting a policy server.</t>

	<t>Local SDP session description:</t>

        <figure><artwork><![CDATA[
v=0
o=alice 2890844526 2890844526 IN IP4 host.somewhere.example
s=
c=IN IP4 host.somewhere.example
t=0 0
m=audio 49562 RTP/AVP 0 1 3
a=rtpmap:0 PCMU/8000
a=rtpmap:1 1016/8000
a=rtpmap:3 GSM/8000
m=video 51234 RTP/AVP 31 34
a=rtpmap:31 H261/90000
a=rtpmap:34 H263/90000
]]></artwork></figure>

	<t>MPDF document:</t>

        <figure><artwork><![CDATA[
<property-set>
  <session-info>
    <context>
      <contact>sip:alice@somewhere.example</contact>
      <info>session information</info>
    </context>
    <streams>
      <stream>
        <media-type>audio</media-type>
        <codec><mime-type>audio/PCMU</mime-type></codec>
        <codec><mime-type>audio/1016</mime-type></codec>
        <codec><mime-type>audio/GSM</mime-type></codec>
        <local-host-port>host.somewhere.example:49562</local-host-port>
      </stream>
      <stream>
        <media-type>video</media-type>
        <codec><mime-type>video/H261</mime-type></codec>
        <codec><mime-type>video/H263</mime-type></codec>
        <local-host-port>host.somewhere.example:51234</local-host-port>
      </stream>
    </streams>
  </session-info>
</property-set>
]]></artwork></figure>

      </section>

      <section title="Example 2" anchor="sec:example2">

        <t>In this example, a session info document is created that
        represents two session descriptions (i.e., an offer and
        answer). This session info document would be created, for
        example, by a UA that has received an answer from another UA
        and is now contacting a policy server.</t>

        <t>Local SDP session description:</t>

        <figure><artwork><![CDATA[
v=0
o=alice 2890844526 2890844526 IN IP4 host.somewhere.example
s=
c=IN IP4 host.somewhere.example
t=0 0
m=audio 49562 RTP/AVP 0 1 3
a=rtpmap:0 PCMU/8000
a=rtpmap:1 1016/8000
a=rtpmap:3 GSM/8000
m=video 51234 RTP/AVP 31 34
a=rtpmap:31 H261/90000
a=rtpmap:34 H263/90000
]]></artwork></figure>

        <t>Remote SDP session description:</t>

        <figure><artwork><![CDATA[
v=0
o=bob 2890844730 2890844730 IN IP4 host.anywhere.example
s=
c=IN IP4 host.anywhere.example
t=0 0
m=audio 52124 RTP/AVP 0 3
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
m=video 50286 RTP/AVP 31
a=rtpmap:31 H261/90000
]]></artwork></figure>

        <t>MPDF document that represents the local and the remote
	session description:</t>

        <figure><artwork><![CDATA[
<property-set>
  <session-info>
    <context>
      <contact>sip:alice@somewhere.example</contact>
      <info>session information</info>
    </context>
    <streams>
      <stream>
        <media-type>audio</media-type>
        <codec><mime-type>audio/PCMU</mime-type></codec>
        <codec><mime-type>audio/GSM</mime-type></codec>
        <local-host-port>host.somewhere.example:49562</local-host-port>
        <remote-host-port>host.anywhere.example:52124</remote-host-port>
      </stream>
      <stream>
        <media-type>video</media-type>
        <codec><mime-type>video/H261</mime-type></codec>
        <local-host-port>host.somewhere.example:51234</local-host-port>
        <remote-host-port>host.anywhere.example:50286</remote-host-port>
      </stream>
    </streams>
  </session-info>
</property-set>
]]></artwork></figure>

        <t>The following MPDF document is a modified version of the
        above document, which can be returned by a policy server. This
        document reflects a policy that defines a maximum session
        bandwidth of 192 kbit and a maximum bandwidth for the H261
        video stream of 128 kbit. </t>
<!--
In addition, it requires the media
        to be sent through a media intermediary.This is indicated
        through changed remote and local addresses, as described in
        <xref target="sec:intermediaries" />.</t> 
-->

        <figure><artwork><![CDATA[
<property-set>
  <session-info>
    <context>
      <contact>sip:alice@somewhere.example</contact>
      <info>modified session information</info>
    </context>
    <streams>
      <stream label='1'>
        <media-type>audio</media-type>
        <codec><mime-type>audio/PCMU</mime-type></codec>
        <codec><mime-type>audio/GSM</mime-type></codec>
        <local-host-port>host.somewhere.example:49562</local-host-port>
        <remote-host-port>host.anywhere.example:52124</remote-host-port>
      </stream>
      <stream label='2'>
        <media-type>video</media-type>
        <codec><mime-type>video/H261</mime-type></codec>
        <local-host-port>host.somewhere.example:51234</local-host-port>
        <remote-host-port>host.anywhere.example:50286</remote-host-port>
      </stream>
    </streams>
    <max-stream-bw label='2'>128</max-stream-bw>
    <max-session-bw>192</max-session-bw>
  </session-info>
</property-set>
]]></artwork></figure>
      </section>

<!--
      <section title="Example 3">

        <t><figure><artwork><![CDATA[
Local SDP session description:
v=0
o=alice 2890844526 2890844526 IN IP4 host.anywhere.com
s=
c=IN IP4 host.anywhere.com
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
m=video 51372 RTP/AVP 31
a=rtpmap:31 H261/90000
m=video 53000 RTP/AVP 32
a=rtpmap:32 MPV/90000

MPDF document:
<property-set>
  <session-info>
    <context>
      <contact>sip:alice@atlanta.com</contact>
      <info>session information</info>
    </context>
    <streams>
      <stream>
        <media-type>audio</media-type>
        <codec><mime-type>audio/PCMU</mime-type></codec>
        <local-host-port>host.anywhere.com:49170</local-host-port>
      </stream>
      <stream>
        <media-type>video</media-type>
        <codec><mime-type>video/H261</mime-type></codec>
        <local-host-port>host.anywhere.com:51372</local-host-port>
      </stream>
      <stream>
        <media-type>video</media-type>
        <codec><mime-type>video/MPV</mime-type></codec>
        <local-host-port>host.anywhere.com:53000</local-host-port>
      </stream>
    </streams>
  </session-info>
</property-set>
]]></artwork></figure></t>

      </section>
-->

    </section>

  </section>

  <section title="Relax NG Definition">

    <t>TBD: This relax NG definition needs to be updated and aligned with <xref
    target="I-D.ietf-sipping-profile-datasets" />.</t>

    <t><figure> <artwork><![CDATA[
?xml version="1.0"?>
 <grammar xmlns="http://relaxng.org/ns/structure/1.0"
  ns="urn:ietf:params:xml:ns:mediadataset"
  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

    <include href="uaprofile.rng"/>
      
    <define name="PropertySetExtension" combine="interleave">
       <choice> 
             <element name="session-info">
                 <ref name="SettingContainerAttributes"/>
                 <optional>
                     <ref name="ElementContext"/>
                 </optional>
                 <optional>
                     <ref name="ElementStreams"/>
                 </optional>
                 <zeroOrMore>
                     <ref name="ElementMaxBandwidth"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementMaxSessionBandwidth"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementMaxStreamBandwidth"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementMediaIntermediaries"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementQoSDSCP"/>
                 </zeroOrMore>
             </element>
             
             <element name="session-policy">
                 <ref name="SettingContainerAttributes"/>
                 <optional>
                     <ref name="ElementContext"/>
                 </optional>
                 <optional>
                     <ref name="ElementLocalPorts"/>
                 </optional>
                 <zeroOrMore>
                     <ref name="ElementMediaTypes"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementCodecs"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementMaxBandwidth"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementMaxSessionBandwidth"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementMaxStreamBandwidth"/>
                 </zeroOrMore>
                 <zeroOrMore>
                     <ref name="ElementQoSDSCP"/>
                 </zeroOrMore>
             </element>
         </choice>
     </define>

     <define name="ElementMediaTypes">
         <element name="media-types">
             <ref name="PolicyGeneralAttributes"/> 
             <optional>
                <ref name="SettingContainerAttributes"/>
             </optional>
             <zeroOrMore>
                <ref name="ElementMediaType"/>
             </zeroOrMore>
         </element>
     </define>

     <define name="ElementMediaType">
         <element name="media-type">
             <data type="string" />
             <optional>
               <ref name="AttributeQ"/>
             </optional>
             <optional>
               <ref name="AttributePolicy"/>
             </optional>
	     <optional>
               <ref name="AttributeGeneric"/>
	     </optional>
         </element>
     </define>

     <define name="ElementCodecs">
         <element name="codecs">
           <ref name="PolicyGeneralAttributes"/>
             <optional>
                <ref name="SettingContainerAttributes"/>
             </optional>
             <zeroOrMore>
                <ref name="ElementCodec"/>
             </zeroOrMore>
         </element>
     </define>

     <define name="ElementCodec">
         <element name="codec">
             <optional>
               <ref name="AttributeQ"/>
             </optional>
             <optional>
               <ref name="AttributePolicy"/>
             </optional>
             <optional>
               <ref name="AttributeGeneric"/>
	     </optional>
             <element name="mime-type">
               <data type="string" />
             </element>
             <zeroOrMore>
               <element name="mime-parameter">
                 <data type="string" />
               </element>
             </zeroOrMore>
         </element>
     </define>

     <define name="ElementStreams">
         <element name="streams">
	     <optional>
               <ref name="AttributeGeneric"/>
	     </optional>
             <oneOrMore>
               <ref name="ElementStream"/>
             </oneOrMore>
         </element>
     </define>

     <define name="ElementStream">
         <element name="stream">
             <optional>
               <ref name="AttributeDirection"/>
             </optional>
             <optional>
               <ref name="AttributeLabel"/>
             </optional>
	     <optional>
               <ref name="AttributeGeneric"/>
	     </optional>
             <ref name="ElementMediaType"/>
             <oneOrMore>
               <ref name="ElementCodec"/>
             </oneOrMore>
             <element name="local-host-port">
               <data type="string" />
             </element>
             <optional>
               <element name="remote-host-port">
                 <data type="string" />
               </element>
             </optional>
         </element>
     </define>

     <define name="ElementMaxBandwidth">
         <element name="max-bw">
             <data type="integer" />
             <ref name="PolicyGeneralAttributes"/>
         </element>
     </define>

     <define name="ElementMaxSessionBandwidth">
         <element name="max-session-bw">
             <data type="integer" />
             <ref name="PolicyGeneralAttributes"/>
         </element>
     </define>

     <define name="ElementMaxStreamBandwidth">
         <element name="max-stream-bw">
             <data type="integer" />
             <ref name="PolicyGeneralAttributes"/>
             <optional>
               <ref name="AttributeMediaType"/>
             </optional>
             <optional>
               <ref name="AttributeLabel"/>
             </optional>
         </element>
     </define>

     <define name="ElementMediaIntermediaries">
         <element name="media-intermediaries">
            <ref name="PolicyGeneralAttributes"/>
             <oneOrMore>
               <choice>
                 <element name="fixed-intermediary">
                   <element name="int-host-port">
                     <data type="string" />
                   </element>
                   <zeroOrMore>
                     <element name="int-addl-port">
                       <data type="integer" />
                     </element>
                   </zeroOrMore>
                 </element>

                 <element name="turn-intermediary">
                   <element name="int-host-port">
                     <data type="string" />
                   </element>
                   <zeroOrMore>
                     <element name="int-addl-port">
                       <data type="integer" />
                     </element>
                   </zeroOrMore>
                   <zeroOrMore>
                     <element name="shared-secret">
                       <data type="string" />
                     </element>
                   </zeroOrMore>
                 </element>
               </choice>
             </oneOrMore>
         </element>
     </define>

     <define name="ElementQoSDSCP">
         <element name="qos-dscp">
             <data type="integer" />
             <ref name="PolicyGeneralAttributes"/>
             <optional>
               <ref name="AttributeMediaType"/>
             </optional>
         </element>
     </define>

     <define name="ElementLocalPorts">
         <element name="local-ports">
             <data type="string" />
             <interleave>
               <optional>
                 <ref name="AttributeVisibility"/>
               </optional>
	       <optional>
                 <ref name="AttributeGeneric"/>
	       </optional>
            </interleave>
         </element>
     </define>

     <define name="ElementContext">
         <element name="context">
             <interleave>
             <optional>
               <element name="info">
                 <data type="string" />
               </element>
             </optional>
             <optional>
               <element name="domain">
                 <data type="string" />
               </element>
             </optional>
             <optional>
              <element name="request-URI">
                 <data type="string" />
               </element>
             </optional>
             <optional>
              <element name="token">
                 <data type="string" />
               </element>
             </optional>
             <zeroOrMore>
               <element name="contact">
                  <data type="string" />
               </element>
             </zeroOrMore>
             </interleave>
         </element>
     </define>

     <define name="PolicyGeneralAttributes">
               <optional>
                 <ref name="AttributeVisibility"/>
               </optional>
               <optional>
                 <ref name="AttributeDirection"/>
               </optional>
	       <optional>
                 <ref name="AttributeGeneric"/>
	       </optional>
     </define>

    <define name="AttributeMediaType">
        <attribute name="media-type">
          <data type="string" />
        </attribute>
    </define>

    <define name="AttributeLabel">
        <attribute name="label">
          <data type="string" />
        </attribute>
    </define>

 </grammar>
]]></artwork></figure></t>

<!--
    <t><figure> <artwork><![CDATA[
<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" 
 ns="urn:ietf:params:xml:ns:mediadataset"
 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

    <include href="uaprofile.rng">
        <define name="ElementGenericSetting">
            <ref name="ElementGenericMediaSetting"/>
        </define>
        <define name="ElementGenericSettingContainer">
            <ref name="ElementGenericMediaSettingContainer"/>
        </define>
    </include>

    <define name="ElementGenericMediaSettingContainer">
        <element>
            <anyName>
                <except>
                    <nsName ns="urn:ietf:params:xml:ns:uaprof"/>
                    <nsName ns="urn:ietf:params:xml:ns:mediadataset"/>
                    <nsName ns=""/>
                </except>
            </anyName>
            <ref name="SettingContainerAttributes"/>

            <!-- container can have containers or settings not both -->
            <choice>
                <zeroOrMore>
                    <ref name="ElementGenericMediaSetting"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementGenericMediaSettingContainer"/>
                </zeroOrMore>
            </choice>
        </element>
    </define>
    <define name="ElementGenericMediaSetting">
        <element>
            <anyName>
                <except>
                    <nsName ns="urn:ietf:params:xml:ns:uaprof"/>
                    <nsName ns="urn:ietf:params:xml:ns:mediadataset"/>
                    <nsName ns=""/>
                </except>
            </anyName>
            <ref name="SettingAttributes"/>
            <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
            </zeroOrMore>
            <zeroOrMore>
                <choice>
                    <text/>
                    <ref name="ElementGenericMediaSetting"/>
                </choice>
            </zeroOrMore>
        </element>
    </define>
    <define name="PropertySetExtensionInfo" combine="interleave">
        <optional>
            <element name="session-info">
                <ref name="SettingContainerAttributes"/>
                <optional>
                    <ref name="ElementContext"/>
                </optional>
                <optional>
                    <ref name="ElementStreams"/>
                </optional>
                <zeroOrMore>
                    <ref name="ElementMaxBandwidth"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMaxSessionBandwidth"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMaxStreamBandwidth"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMediaIntermediaries"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementQosDSCP"/>
                </zeroOrMore>
            </element>
        </optional>
    </define>
    <define name="PropertySetExtensionPolicy" combine="interleave">
        <optional>
            <element name="session-policy">
                <ref name="SettingContainerAttributes"/>
                <optional>
                    <ref name="ElementContext"/>
                </optional>
                <optional>
                    <ref name="ElementLocalPorts"/>
                </optional>
                <zeroOrMore>
                    <ref name="ElementMediaTypes"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementCodecs"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMaxBandwidth"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMaxSessionBandwidth"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMaxStreamBandwidth"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementMediaIntermediaries"/>
                </zeroOrMore>
                <zeroOrMore>
                    <ref name="ElementQosDSCP"/>
                </zeroOrMore>
            </element>
        </optional>
    </define>

    <define name="ElementMediaTypes">
        <element name="media-types">
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <optional>
                <ref name="AttributeExcludedPolicy"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
            <ref name="ElementMediaType"/>
        </element>
    </define>

    <define name="ElementMediaType">
        <element name="media-type">
            <data type="string" />
            <interleave>
              <optional>
                <ref name="AttributeQ"/>
              </optional>
              <optional>
                <ref name="AttributePolicy"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
        </element>
    </define>

    <define name="ElementCodecs">
        <element name="codecs">
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <optional>
                <ref name="AttributeExcludedPolicy"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
            <ref name="ElementCodec"/>
        </element>
    </define>

    <define name="ElementCodec">
        <element name="codec">
            <interleave>
              <optional>
                <ref name="AttributeQ"/>
              </optional>
              <optional>
                <ref name="AttributePolicy"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
            <element name="mime-type">
              <data type="string" />
            </element>
            <zeroOrMore>
              <element name="mime-parameter">
                <data type="string" />
              </element>
            </zeroOrMore>
        </element>
    </define>

    <define name="ElementStreams">
        <element name="streams">
            <zeroOrMore>
              <ref name="AttributeGenericAttributes"/>
            </zeroOrMore>
            <oneOrMore>
              <ref name="ElementStream"/>
            </oneOrMore>
        </element>
    </define>

    <define name="ElementStream">
        <element name="stream">
            <optional>
              <ref name="AttributeDirection"/>
            </optional>
            <zeroOrMore>
              <ref name="AttributeGenericAttributes"/>
            </zeroOrMore>
            <ref name="ElementMediaType"/>
	    <oneOrMore>
              <ref name="ElementCodec"/>
	    </oneOrMore>
            <element name="local-host-port">
              <data type="string" />
            </element>
            <optional>
              <element name="remote-host-port">
                <data type="string" />
              </element>
            </optional>
        </element>
    </define>

    <define name="ElementMaxBandwidth">
        <element name="max-bw">
            <data type="integer" />
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
        </element>
    </define>

    <define name="ElementSessionMaxBandwidth">
        <element name="max-session-bw">
            <data type="integer" />
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
        </element>
    </define>

    <define name="ElementMaxStreamBandwidth">
        <element name="max-stream-bw">
            <data type="integer" />
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
        </element>
    </define>

    <define name="ElementMediaIntermediaries">
        <element name="media-intermediaries">
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
            <oneOrMore>
	      <choice>
                <element name="fixed-intermediary">
                  <element name="int-host-port">
                    <data type="string" />
                  </element>
                  <zeroOrMore>
                    <element name="int-addl-port">
                      <data type="integer" />
                    </element>
                  </zeroOrMore>
                </element>
                <element name="turn-intermediary">
                  <element name="int-host-port">
                    <data type="string" />
                  </element>
                  <zeroOrMore>
                    <element name="int-addl-port">
                      <data type="integer" />
                    </element>
                  </zeroOrMore>
                  <zeroOrMore>
                    <element name="shared-secret">
                      <data type="string" />
                    </element>
                  </zeroOrMore>
                </element>
              </choice>
            </oneOrMore>
        </element>
    </define>

    <define name="ElementQoSDSCP">
        <element name="qos-dscp">
            <data type="integer" />
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <optional>
                <ref name="AttributeDirection"/>
              </optional>
              <optional>
                <ref name="AttributeMediaType"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
        </element>
    </define>

    <define name="ElementLocalPorts">
        <element name="local-ports">
            <data type="string" />
            <interleave>
              <optional>
                <ref name="AttributeVisibility"/>
              </optional>
              <zeroOrMore>
                <ref name="AttributeGenericAttributes"/>
              </zeroOrMore>
            </interleave>
        </element>
    </define>

    <define name="ElementContext">
        <element name="context">
            <interleave>
            <optional>
              <element name="info">
                <data type="string" />
              </element>
            </optional>
            <optional>
              <element name="domain">
                <data type="string" />
              </element>
            </optional>
            <optional>
              <element name="request-URI">
                <data type="string" />
              </element>
            </optional>
            <zeroOrMore>
              <element name="contact">
                 <data type="string" />
              </element>
            </zeroOrMore>
            </interleave>
        </element>
    </define>

</grammar>
]]></artwork></figure></t>
-->

<!--

    <t><figure> <artwork><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:mediadataset"
      xmlns:tns="urn:ietf:params:xml:ns:mediadataset"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:spds="http://sipfoundry.org/schema/profile-data-sets-00">


  <xs:attributeGroup name="single_stream_attributes" >
    <xs:attribute name="stream-label" 
                  type="xs:string" use="optional"/>
  </xs:attributeGroup>

  <xs:attributeGroup name="media_type_attributes" >
    <xs:attribute name="media-type" 
                  type="xs:string" use="optional"/>
  </xs:attributeGroup>


  <xs:element name="session-policy">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="tns:context" 
          minOccurs="0" maxOccurs="1"/>
        <xs:element ref="tns:media-types" 
          minOccurs="0" maxOccurs="unbounded"/> 
        <xs:element ref="tns:codecs" 
          minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="tns:media-intermediaries" 
          minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="tns:max-bw"
          minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="tns:qos-dscp"
          minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="tns:local-ports"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>


  <xs:element name="context">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="domain" type="xs:anyURI" minOccurs="0"
          maxOccurs="1"/> 
        <xs:element name="contact" type="xs:anyURI" minOccurs="0"
          maxOccurs="unbounded"/>
        <xs:element name="info" type="xs:string" 
           minOccurs="0" maxOccurs="1"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="media-types" 
              substitutionGroup="spds:setting_container">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="tns:media-type"  
          minOccurs="1" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:directional_setting_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="codecs" 
              substitutionGroup="spds:setting_container">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="tns:codec" 
          minOccurs="1" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:directional_setting_attributes" />
      <xs:attributeGroup ref="tns:single_stream_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="media-intermediaries" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="tns:fixed-intermediary" 
          minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="tns:turn-intermediary" 
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:directional_setting_attributes" />
      <xs:attributeGroup ref="tns:single_stream_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="max-bw" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:positiveInteger" />
      </xs:simpleContent>
      <xs:attributeGroup ref="spds:directional_setting_attributes" />
      <xs:attributeGroup ref="tns:media_type_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="qos-dscp" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:simpleContent>
        <xs:restriction base="xs:integer" >
          <xs:minInclusive value="0" />
          <xs:maxInclusive value="63" />
        </xs:restriction>
      </xs:simpleContent>
      <xs:attributeGroup ref="spds:directional_setting_attributes" />
      <xs:attributeGroup ref="tns:single_stream_attributes" />
      <xs:attributeGroup ref="tns:media_type_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="local-ports" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:simpleContent>
        <xs:restriction base="xs:string" />
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name="media-type" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:simpleContent>
        <xs:restriction base="xs:string" />
      </xs:simpleContent>
      <xs:attributeGroup ref="spds:multi_setting_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="codec" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="mime-type" type="xs:string" 
          minOccurs="1" maxOccurs="1"/>
        <xs:element name="mime-parameter" type="xs:string"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:multi_setting_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="fixed-intermediary" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="int-uri" type="xs:anyURI" 
          minOccurs="1" maxOccurs="1"/>
        <xs:element name="int-addl-port" 
          type="xs:positiveInteger"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:multi_setting_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="turn-intermediary" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="int-uri" type="xs:anyURI" 
          minOccurs="1" maxOccurs="1"/>
        <xs:element name="int-addl-port" 
          type="xs:positiveInteger"
          minOccurs="0" maxOccurs="unbounded"/>
        <xs:element name="shared-secret" type="xs:string" 
          minOccurs="0" maxOccurs="1"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:multi_setting_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="ipinip-intermediary" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="int-uri" type="xs:anyURI" 
          minOccurs="1" maxOccurs="1"/>
        <xs:element name="int-addl-port" 
          type="xs:positiveInteger"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:multi_setting_attributes" />
    </xs:complexType>
  </xs:element>

  <xs:element name="iploose-intermediary" 
              substitutionGroup="spds:setting">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="int-uri" type="xs:anyURI" 
          minOccurs="1" maxOccurs="1"/>
        <xs:element name="int-addl-port" 
          type="xs:positiveInteger"
          minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attributeGroup ref="spds:multi_setting_attributes" />
    </xs:complexType>
  </xs:element>


</xs:schema>
]]></artwork></figure></t>
-->

  </section>

  <section title="Security Considerations" anchor="sec:security">

    <t>Session policy information can be sensitive information. The
    protocol used to distribute session policy information SHOULD
    ensure privacy, message integrity and authentication. Furthermore,
    the protocol SHOULD provide access controls which restrict who can
    see who else's session policy information. </t>

  </section>

  <section title="IANA Considerations" anchor="sec:iana">

    <t>This document registers a new MIME type,
    application/media-policy-dataset+xml, and a new XML 
    namespace. </t> 

    <section title="MIME Registration">

      <t>MIME media type name: application</t>

      <t>MIME subtype name: media-policy-dataset+xml</t>

      <t>Mandatory parameters: none</t>

      <t>Optional parameters: Same as charset parameter
      application/xml as specified in <xref target="RFC3023">RFC
      3023</xref>.</t> 

      <t>Encoding considerations: Same as encoding considerations of
      application/xml as specified in <xref target="RFC3023">RFC
      3023</xref>. </t>

      <t>Security considerations: See Section 10 of <xref
      target="RFC3023">RFC 3023</xref> and <xref
      target="sec:security"/> of this specification. </t> 

      <t>Interoperability considerations: none.</t>

      <t>Published specification: This document.</t>

      <t>Applications which use this media type: This document type 
      has been used to convey media policy information between SIP user
      agents and a domain.</t> 

      <t>Additional Information:</t>

      <t>Magic Number: None</t>

      <t>File Extension: .mpf or .xml</t>

      <t>Macintosh file type code: "TEXT"</t>

      <t>Personal and email address for further information: Volker
      Hilt, 
      <![CDATA[<volkerh@bell-labs.com>]]>
      </t>

      <t>Intended usage: COMMON</t>

      <t>Author/Change controller: The IETF.</t>

    </section>

    <section title="URN Sub-Namespace Registration">

      <t>This section registers a new XML namespace, as per the 
      guidelines in <xref target="RFC3688"/></t>

      <t>URI: The URI for this namespace is
      urn:ietf:params:xml:ns:mediadataset.</t>

      <t>Registrant Contact: IETF, SIPPING working
      group, <![CDATA[<sipping@ietf.org>]]>, Volker Hilt, 
      <![CDATA[<volkerh@bell-labs.com>]]> </t>

      <t>
<figure> <artwork><![CDATA[
XML:

     BEGIN
     <?xml version="1.0"?>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
               "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
     <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
       <meta http-equiv="content-type"
             content="text/html;charset=iso-8859-1"/>
       <title>Media Policy Dataset Namespace</title>
     </head>
     <body>
       <h1>Namespace for Media Policy Datasets</h1>
       <h2>urn:ietf:params:xml:ns:mediadataset</h2>
       <p>See <a href="[[[URL of published RFC]]]">RFCXXXX</a>.</p>
     </body>
     </html>
     END
]]></artwork></figure> 
</t>

    </section>

  </section>

</middle>

<back>

<references title='Normative References'>

&rfc2119;

&rfc4855;

&rfc4566;

&w3c.REC-xml-names-19990114;

&rfc3688;

&rfc4574;

&rfc2141;

&rfc3023;

&rfc3264;

&rfc2474;

&rfc4975;

&rfc4976;

&i-d.ietf-sipping-profile-datasets;

<!--
<reference anchor='I-D.petrie-sipping-profile-datasets'>
<front>
  <title abbrev='SIP UA Data Sets'>A Schema and Guidelines for Defining Session Initiation Protocol User Agent Profile Data Sets</title>
  <author initials="D." surname="Petrie" fullname="Daniel Petrie">
    <organization>SIPez LLC.</organization>
  </author>
  <author initials="S." surname="Lawrence" fullname="Scott Lawrence">
    <organization>Pingtel Corp.</organization>
  </author>
  <author initials="M." surname="Dolly" fullname="Martin Dolly">
    <organization>AT&amp;T Labs</organization>
  </author>
  <author initials='V.H.' surname='Hilt' fullname='Volker Hilt'>
    <organization>Bell Labs/Alcatel-Lucent</organization>
  </author>
  <date month='October' year='2006' />
</front>
<seriesInfo name='Internet-Draft' value='draft-petrie-sipping-profile-datasets-04' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-petrie-sipping-profile-datasets-04.txt' />
</reference>
-->

&i-d.ietf-behave-turn;

&w3c.REC-xml-20040204;

</references>

<references title='Informative References'>

&i-d.ietf-sip-session-policy-framework;

&i-d.ietf-sipping-config-framework;

&rfc2648;

&rfc4856;

&rfc4629;

<!--
<reference anchor='I-D.ietf-sipping-session-policy-req'>
<front>
<title>Requirements for Session Policy for the Session Initiation Protocol (SIP)</title>
<author initials='J' surname='Rosenberg' fullname='Jonathan Rosenberg'>
    <organization />
</author>
<date month='July' day='20' year='2004' />
<abstract><t>The proxy server plays a central role as an intermediary
in the establishment of sessions in the Session Initiation Protocol
(SIP). In that role, they can define and impact policies on call
routing, rendezvous, and other call features. However, there is no
standard means by which proxies can have any influence on session
policies, such as the codecs that are to be used. As such, ad-hoc and
non-conformant techniques have been deployed to allow for such policy
mechanisms. There is a need for a standards-based and complete
mechanism for session policies. This document defines a set of
requirements for such a mechanism.</t></abstract> 
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-sipping-session-policy-req-02' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-sipping-session-policy-req-02.txt' />
</reference>
-->

&rfc3261;

</references>

<section title="Acknowledgements">

  <t>Many thanks to Allison Mankin, Dan Petrie, Martin Dolly, Adam
  Roach and Ben Campbell for the discussions and suggestions. Many
  thanks to Roni Even and Mary Barnes for reviewing the draft and to
  Jari Urpalainen for helping with the Relax NG schema.</t>

</section> 

</back>

</rfc>


 


