Session Initiation Proposal                                      V. Hilt
Investigation Working Group                Bell Labs/Lucent Technologies
Internet-Draft                                              J. Rosenberg
Expires: April 18, 2004                                      dynamicsoft
                                                        October 19, 2003


 A Framework for Session-Specific Intermediary Session Policies in SIP
               draft-hilt-sipping-session-spec-policy-00

Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups. Note that other
   groups may also distribute working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time. It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at http://
   www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on April 18, 2004.

Copyright Notice

   Copyright (C) The Internet Society (2003). All Rights Reserved.

Abstract

   Proxy servers play a central role as an intermediary in the
   establishment of sessions in the Session Initiation Protocol (SIP).
   In that role, they define and impact policies on call routing,
   rendezvous, and other call features. However, there is currently no
   standard means by which network elements can have any influence on
   session policies, such as the codecs that are to be used. In this
   document, we propose a complete and standards-based framework that
   enables intermediaries to request the use of policies in a SIP
   session.





Hilt & Rosenberg         Expires April 18, 2004                 [Page 1]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


Table of Contents

   1.    Introduction . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.    Terminology  . . . . . . . . . . . . . . . . . . . . . . . .  5
   3.    Framework for Session-Specific Policies  . . . . . . . . . .  6
   3.1   Requesting Policies using Request/Response/ACK . . . . . . .  7
   3.1.1 Constructing the INVITE/UPDATE Request . . . . . . . . . . .  7
   3.1.2 Proxy Processing of Requests . . . . . . . . . . . . . . . .  8
   3.1.3 Processing Requests and Generating Responses . . . . . . . .  9
   3.1.4 Proxy Processing of Responses  . . . . . . . . . . . . . . . 10
   3.1.5 Processing Responses and Generating ACKs . . . . . . . . . . 11
   3.1.6 Processing ACKs  . . . . . . . . . . . . . . . . . . . . . . 11
   3.1.7 Applying Policies  . . . . . . . . . . . . . . . . . . . . . 11
   3.2   Requesting Policies using Response/ACK . . . . . . . . . . . 12
   3.2.1 Creating the INVITE Response . . . . . . . . . . . . . . . . 12
   3.2.2 Proxy Processing Responses . . . . . . . . . . . . . . . . . 13
   3.2.3 Processing Responses and Generating ACKs . . . . . . . . . . 13
   3.2.4 Proxy Processing of ACKs/PRACKs  . . . . . . . . . . . . . . 13
   3.2.5 Processing ACKs/PRACKs . . . . . . . . . . . . . . . . . . . 13
   3.3   "Media-Interface" header usage . . . . . . . . . . . . . . . 13
   3.4   "Media-Filter" header usage  . . . . . . . . . . . . . . . . 14
   3.5   "Reverse-Media-Filter" header usage  . . . . . . . . . . . . 15
   4.    Session-Specific Policy Packages . . . . . . . . . . . . . . 16
   4.1   Media Interface Object . . . . . . . . . . . . . . . . . . . 16
   4.2   Media Filter Object  . . . . . . . . . . . . . . . . . . . . 16
   5.    Example Policy Package: Network-based Codec Selection  . . . 17
   5.1   Session-Specific Codec Selection . . . . . . . . . . . . . . 17
   5.1.1 Media Interface Object . . . . . . . . . . . . . . . . . . . 17
   5.1.2 Media Filter Object  . . . . . . . . . . . . . . . . . . . . 18
   6.    Security Considerations  . . . . . . . . . . . . . . . . . . 20
   7.    IANA Considerations  . . . . . . . . . . . . . . . . . . . . 21
   8.    Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
   8.1   Header Fields  . . . . . . . . . . . . . . . . . . . . . . . 22
   9.    Open Issues  . . . . . . . . . . . . . . . . . . . . . . . . 23
         Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 24
         References . . . . . . . . . . . . . . . . . . . . . . . . . 24
   A.    Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26
         Intellectual Property and Copyright Statements . . . . . . . 27













Hilt & Rosenberg         Expires April 18, 2004                 [Page 2]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


1. Introduction

   The Session Initiation Protocol (SIP) [9] was designed to support
   establishment and maintenance of end-to-end sessions. Proxy servers
   provide call routing, authentication and authorization, mobility, and
   other signaling services that are independent of the session.
   Effectively, proxies provide signaling policy enforcement. However,
   numerous scenarios have arisen which require the involvement of
   proxies in some aspect of the session policy. One scenario is in the
   traversal of a firewall or NAT. The midcom group has defined a
   framework for control of firewalls and NATs (generically,
   middleboxes) [10]. In this model, a midcom agent, typically a proxy
   server, interacts with the middlebox to open and close media
   pinholes, obtain NAT bindings, and so on. In this role as a midcom
   agent, the proxy will need to examine and possibly modify the session
   description in the body of the SIP message. This modification is to
   achieve a specific policy objective: to force the media to route
   through an intermediary.

   In another application, SIP is used in a wireless network. The
   network provider has limited resources for media traffic. During
   periods of high activity, the provider would like to restrict codec
   usage on the network to lower rate codecs. In existing approaches,
   this is frequently accomplished by having the proxies examine the SDP
   [4] in the body and remove the higher rate codecs or reject the call
   and require the UA to start over with a different set of codecs.

   In yet a third application, SIP is used in a network that has
   gateways which support a single codec type (say, G.729). When
   communicating with a partner network that uses gateways with a
   different codec (say, G.723), the network modifies the SDP to route
   the session through a converter that changes the G.729 to G.723.

   The desire to impact aspects of the session occurs in domains where
   the administrator of a SIP domain is also the owner and administrator
   of an IP network over which it is known that the sessions will
   traverse. This includes enterprises, Internet access providers, and
   in some cases, backbone providers. Typical session policies
   established in such domains influence NAT/firewall traversal or
   control bandwidth usage by selecting low-rate codecs. The desire to
   impact aspects of a session also occurs in domains that provide
   services to a user. Typical session policies enable the inclusion of
   a media intermediary in the media path such as a transcoding gateway
   or a call recording server.

   In general, session policies enable a domain to impact aspects of a
   session description, ask a UA to perform extra steps when
   establishing a session (e.g. contact a NAT/firewall) or request the



Hilt & Rosenberg         Expires April 18, 2004                 [Page 3]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   exposure of details about session that is being set up or modified to
   a proxy. Since SIP is the protocol by which the details of these
   sessions are negotiated, it is natural for providers to wish to
   impose their session policies through some kind of SIP means.  To
   date, this has been accomplished through SDP editing, a process where
   proxies dig into the bodies of SIP messages, and modify them in order
   to impose their policies. However, this SIP editing technique has
   many drawbacks as discussed in [7].

   Our solution is to introduce a framework that allows intermediary
   elements to request session policies from user agents when a session
   is being set up or modified. It enables proxies to examine aspects of
   the session description currently being used and to dynamically
   create the policies that apply to this session. Policies, that are
   independent of a certain session description and may affect multiple
   sessions, can be requested using the framework described in [2]. This
   framework satisfies the requirements listed in [7].

   This document is structured as follows: Section 3 introduces a
   framework for requesting session-specific policies during the
   establishment or modification of a session. Section 4 discusses the
   creation of policy packages for this framework and Section 5
   describes an example policy package for selecting codecs. Section 6
   discusses Security and Section 7 IANA considerations. Section 8
   describes the syntax of SIP extensions defined in this document.
   Section 9 talks about open issues.

























Hilt & Rosenberg         Expires April 18, 2004                 [Page 4]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


2. Terminology

   In this document, the key words "MUST", "MUST NOT", "REQUIRED",
   "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
   RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as
   described in BCP 14, RFC 2119 [3] and indicate requirement levels for
   compliant implementations.












































Hilt & Rosenberg         Expires April 18, 2004                 [Page 5]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


3. Framework for Session-Specific Policies

   This framework for session-specific policies enables proxy servers to
   request session policies from UAs during the creation or modification
   of a session. The syntax and semantics of a specific session policy
   is not part of this framework and needs to be defined in a separate
   session policy package (see Section 4). An example can be found in
   Section 5.

   The basic operation of the framework consists of two steps: first,
   UAs expose aspects of their session description to proxies in Media
   Interface Objects (MIOs). For example, a UA can create an MIO
   describing the IP addresses and ports of each media stream and
   another MIO describing the set of codecs it supports. Having this
   information in an MIO frees proxies from the burden of finding and
   understanding session descriptions in message bodies. In the second
   step, the proxies request session policies for a session by creating
   Media Filter Objects (MFOs). An MFO contains a set of rules, the UA
   is requested to execute on a certain media aspect. For example, an
   MFO could contain a list of codecs allowed in a session. Each proxy
   on the way can request policies independently. MIOs and MFOs are only
   useful in conjunction with a session description and must travel in
   the same SIP message (e.g. in a INVITE request and a 200 OK
   response).

   Policies are set up independently for media streams in both
   directions. An INVITE request with an SDP offer can establish the
   policies for media streams sent from UAS to UAC whereas the
   corresponding INVITE response establishes policies for media streams
   sent from UAC to UAS. It is important to note that, the policies for
   each direction can be completely independent of each other. For
   example, the media streams from UAS to UAC could be directed through
   a firewall whereas the media streams from UAC to UAS could be sent
   directly. This differs from session descriptions, where the answer is
   always based on the contents of the offer.

   Summing up, the following steps are executed to request policies for
   media streams in one direction:

   1.  The receiver of a media stream creates MIOs and inserts them into
       the SIP messages, that carries the corresponding session
       description.

   2.  Proxies inspect those MIOs insert MFOs.

   3.  The sender of the media stream receives the SIP message, examines
       the session description and the MFOs and decides whether it wants
       to accept or reject the the requested policies. It applies the



Hilt & Rosenberg         Expires April 18, 2004                 [Page 6]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


       accepted policies.

   4.  The accepted policies are conveyed back to the receiver of a
       media stream.


3.1 Requesting Policies using Request/Response/ACK

   Proxies can request policies in INVITE and UPDATE [6] transactions,
   in which the session description offer is carried in the request and
   an answer is carried in the response. The basic message flow is
   depicted in Figure 1.



   +-----+                      +-------+                   +-----+
   |     | INVITE/offer         |       | INVITE/offer      |     |
   |     | + MIO1               |       | + MIO1 + MFO1     |     |
   |     |--------------------->|       |------------------>|     |
   |     | OK/answer            |       | OK/answer         |     |
   | UAC | + MIO2 + MFO2 + MFO1 | proxy | + MIO2 + MFO1     | UAS |
   |     |<---------------------|       |<------------------|     |
   |     |                      |       |                   |     |
   |     | ACK + MFO2           |       | ACK + MFO2        |     |
   |     |--------------------->|       |------------------>|     |
   +-----+                      +-------+                   +-----+



                                Figure 1


3.1.1 Constructing the INVITE/UPDATE Request

   The UAC composes an INVITE or UPDATE request as usual. In addition to
   the session description, it creates MIOs for those aspects of the
   session, it wishes to permit the network to examine. For example, if
   the UAC wants to allow the network to examine the media codecs, it
   would insert MIOs representing these codecs. The UAC SHOULD expose as
   much information as possible in MIOs.

   Since the MIOs are meant to be inspected by proxies, and since they
   are provided to enable a SIP feature (proxy insertion of session
   policy), the MIOs are carried as SIP headers (see Section 3.3).

   A UAC that supports this framework MUST insert a SIP Supported header
   with the option tag "policy".




Hilt & Rosenberg         Expires April 18, 2004                 [Page 7]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


3.1.2 Proxy Processing of Requests

   As the request traverses proxies, the proxies can insert Media Filter
   Objects (MFOs). MFOs contain the policies, the proxy wants to
   request. A proxy can generate MFOs in response to information
   contained in a specific MIO in the request. These MFOs represent
   "diffs" that the proxy wants to apply to the MIO. For example, if an
   MIO contains an IP address and port for receiving an audio stream, a
   proxy can insert an MFO which changes that address and port to that
   of a media intermediary. A proxy may inspect MFOs that have been
   inserted by previous proxies to determine, which policies are already
   requested. However, MFOs created by a proxy MUST represent the
   differences to the original MIO. A proxy can also generate MFOs
   independent of the MIOs contained in the request. Such an MFO
   describes a general policy applicable to the current session. For
   example, an MFO could contain a list of audio codecs that are allowed
   in the current session.

   The session description contained in an INVITE/UPDATE request
   describes media streams transmitted from UAS to UAC. Consequently,
   MFOs inserted into an INVITE/UPDATE request MUST contain policies for
   media streams transmitted in this direction.

   The proxy does not modify the MIO - that is fundamental. By
   specifying the requested modifications in MFOs rather than directly
   modifying MIOs and the session description, we enable an explicit
   consent and knowledge model. The UAs can know exactly, which policies
   where requested against the session.

   A proxy MAY only insert MFOs (or other policy related headers) into
   the INVITE/UPDATE request, if the UAC has indicated its support for
   policies by including a Supported header with the value "policy" into
   the request. If no such Supported header was present and the proxy
   insists on the use of policies, it MAY return a 421 (Extension
   Required) response. However, this behavior is NOT RECOMMENDED as it
   generally breaks interoperability.

   A proxy MAY insert a Require header with the option tag "policy" if
   it wants to make sure that the request fails in case the UAS does not
   support session policies. A proxy MUST insert a policy Require header
   if it has marked some policies as required in the MFO (see Section
   3.4). However, not all session policies will be mandatory. Policies
   could be optional, in which case none of the inserted MFOs would
   contain a required policy and a policy Require header would not be
   inserted.

   If an MIO contained in the request is not acceptable to the proxy, it
   MAY insert an MFO indicating the failure or it MAY reject the request



Hilt & Rosenberg         Expires April 18, 2004                 [Page 8]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   by returning a 488 (Not Acceptable Here) response. This enables a
   proxy to inform the UAC that the information in the MIO is not
   acceptable under the current policies or that information required by
   the current policy was not exposed in an MIO. For example, a proxy,
   which wants to route a media stream through a firewall, would not
   accept MIOs containing no information about the transport address.
   The failure MFO SHOULD explain the reason, why the MIO was not
   acceptable. Similarly, the 488 response SHOULD include a Warning
   header field value explaining why the request was rejected. The proxy
   SHOULD copy the MFOs that caused the problems from the request into
   the 488 response. This allows the UAC to know exactly why the request
   has failed and if it can attempt to retry with different MIOs.

   [TBD: define warning codes and texts.]

   To achieve backwards compatibility with devices that do not support
   policies, the proxy MUST NOT return a 488 response to requests that
   do not include a Supported header with the value "policy". However, a
   proxy SHOULD reject requests if the UAC has indicated its support for
   policies and knows how to correct the problem and re-try the request.
   Rejecting a request is a quick way for the proxy to inform a
   policy-enabled UAC about policy related problems. It prevents that
   the request is forwarded to the UAS, which would then reject it
   because of an included failure MFO. Returning a 488 response can't be
   used to enforce a policy. Such an enforcement would not be effective
   since it can be circumvented by a UAC, for example by creating fake
   MIOs.

   In addition to adding an MFO, a proxy MAY generate an MFO-Reason
   header. This header contains the domain name of the proxy and
   explains the reasoning behind the session policy. The end device may
   present this text string to a human when querying whether the
   requested policies should be accepted or not.

   [TBD: define the format to this header.]

   A proxy that supports forking of requests, MAY generate a different
   set of MFOs for each target the request is sent to.

3.1.3 Processing Requests and Generating Responses

   When the INVITE/UPDATE request reaches the UAS, the UAS will know
   exactly what the UAC indicated in MIOs, and which policies have been
   requested by intermediate domains. The UAS decides if it wants to
   accept some or all of these policies. If it decides to reject a
   policy that is marked as required or if the message contains a
   failure MFO, the UAS MUST reject the request with a 488 (Not
   Acceptable Here) response. This response SHOULD include a Warning



Hilt & Rosenberg         Expires April 18, 2004                 [Page 9]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   header field value explaining, why the policies were not acceptable
   and a copy of the declined MFOs or the failure MFO.

   If all required (and possibly some optional) policies are acceptable
   to the UAS, it will eventually generate a response which contains a
   session description answer. If both user agents support reliable
   provisional responses [8], it is RECOMMENDED that the UAS returns the
   answer in a reliable provisional response. Using a reliable
   provisional response has the advantage that the UAC has the chance to
   reject policies before the session is established.

   The UAS then inserts its own set of MIOs for its side of the session
   into the response. It MUST copy all MFOs it has accepted (required
   and optional) from the request into the response. The copied MFOs are
   purely informational, for the benefit of the proxy and the UAC. They
   inform proxies which policies have been accepted. They also ensure
   that proxies cannot establish policies without having the UAC become
   aware of them. The copied MFOs are end-to-end, and not meant for
   modification by proxies. They MAY be protected by end-to-end security
   mechanisms.

   A UAS MUST NOT apply the procedures defined in this specification to
   INVITE/UPDATE requests, that don't contain a Supported header with
   value "policy". If a UAS applies this specification, it MUST insert a
   Require header with the value "policy" into the response it creates.
   A Supported header with the value "policy" MUST be included in every
   response to an INVITE/UPDATE request.

3.1.4 Proxy Processing of Responses

   If the response contains a Require header with the value "policy",
   the proxy knows that the UAC and the UAS support the use of session
   policies and that it may apply this extension. The proxy can
   determine which policies have been accepted by the UAS by examining
   the list of MFOs, the UAS has copied into the response.

   The proxy can insert MFOs containing policies for media streams
   transmitted from UAC to UAS into the response to an INVITE request.
   These MFOs are created and formatted identically to those inserted
   into the request. If the MIOs contained in the response are not
   acceptable to a proxy, it may insert a failure MFO.

   A proxy could also insert MFOs into the response to an UPDATE
   request. However, these MFOs would not be copied back to the UAS
   since UACs do not PRACK or ACK UPDATE responses. Thus, the proxy
   would not be informed which policies have been accepted and the UAS
   would not become aware of these policies. Such a behavior violates
   the requirement that both UAs need to know the set of policies



Hilt & Rosenberg         Expires April 18, 2004                [Page 10]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   requested along the call path and that the proxy needs to be informed
   about accepted policies. It is therefore NOT RECOMMENDED.

   [Open issue: would it make sense to send an additional message from
   UAC to UAS or to get rid of sending MFOs back. See Section 9.]

3.1.5 Processing Responses and Generating ACKs

   After receiving a 1xx or 2xx response, the UAC examines if a Requires
   header with the value "policy" is present and if the response
   contains MFOs. If so, it can either reject or accept the policies. If
   it accepts all policies marked required, the UAC MUST copy the MFOs,
   that were accepted, into the PRACK or ACK. These MFOs are
   informational to the proxy and the UAS. They may be protected by
   end-to-end integrity mechanisms. Due to forking of requests in
   proxies, the UAC may receive multiple responses from different UASs
   for one request, which may contain different policies. If the
   response did not contain a policy Requires header, the UAC must
   ignore all policy related information in the response (e.g. MFOs).

   If the UAC decides to reject some of the required policies or if the
   response contained a failure MFO, the UAC should terminate the dialog
   associated with this response. If the UAS has responded with a 2xx
   response, the UAC must send an ACK and then terminate the dialog with
   a BYE. If the UAS has responded with a reliable provisional response,
   the UAC can terminate the dialog without fully establishing it by
   generating a CANCEL (after sending a PRACK, of course). The UAC does
   not copy the MFOs from the request into the PRACK or ACK. Instead,
   the declined MFOs SHOULD be copied into the BYE or CANCEL requests
   together with a Reason header [5] explaining why the policies were
   rejected.

   [TBD: need to define reason code, phrases etc.]

   If the UAC receives a 488 response and the reason explains that
   existing or missing MIOs caused the rejection, the UAC MAY try to
   correct the problem (e.g. by adding an additional MIO) and re-send
   the request.

3.1.6 Processing ACKs

   If the MFOs contained in a PRACK or ACK message are not acceptable to
   the UAS, it may decline them by terminating the dialog with a CANCEL
   or BYE. The CANCEL or BYE SHOULD contain a copy of the declined MFOs
   and a Reason header [5] explaining why these policies were rejected.

3.1.7 Applying Policies




Hilt & Rosenberg         Expires April 18, 2004                [Page 11]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   If both UAs have accepted the policies, they MUST apply them to the
   media streams they generate. This may involve, for example, sending
   media to an intermediary indicated in an MFO. Since the user agents
   know about the full set of intermediaries, they have many options in
   the event of a failure (detected through an ICMP error, for example).
   The endpoint can try to send the media to the next intermediary on
   the path. Or, if the MFO specifies the intermediaries as a FQDN
   instead of an IP address, the endpoint can attempt to use DNS to find
   an alternative, and begin routing media through that.

3.2 Requesting Policies using Response/ACK

   Proxies may also request policies in INVITE transactions, which carry
   a session description offer in the response and an answer in the
   following ACK request. The basic message flow is depicted in Figure
   2.



   +-----+                   +-------+                   +-----+
   |     | INVITE            |       | INVITE            |     |
   |     |------------------>|       |------------------>|     |
   |     | OK/offer          |       | OK/offer          |     |
   |     | + MIO1 + MFO1     |       | + MIO1            |     |
   | UAC |<------------------| proxy |<------------------| UAS |
   |     |                   |       |                   |     |
   |     | ACK/answer        |       | ACK/answer        |     |
   |     | + MFO1            |       | + MFO1            |     |
   |     |------------------>|       |------------------>|     |
   +-----+                   +-------+                   +-----+



                                Figure 2


3.2.1 Creating the INVITE Response

   The UAS creates the response as usual. It applies this extension to
   the response, if the request contains a Supported header with the
   value "policy". The UAS MUST insert a Require header with the value
   "policy" and SHOULD insert all MIOs it can create for its side of the
   session description. A Supported header with the value "policy" MUST
   be included in every response to an INVITE/UPDATE request.

   It is RECOMMENDED that the UAS generates a reliable provisional
   response [8] if supported by both UAs.




Hilt & Rosenberg         Expires April 18, 2004                [Page 12]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


3.2.2 Proxy Processing Responses

   The proxy MAY add MFOs to responses that contain a Requires header
   with the value "policy". If an MIO contained in the response is not
   acceptable for the proxy, it MAY insert a failure MFO.

3.2.3 Processing Responses and Generating ACKs

   The UAC may or may not accept the policies contained in the response.
   If it accepts all required policies, it MUST copy the accepted MFOs
   into the PRACK or ACK. It may protect these MFOs with end-to-end
   integrity mechanisms. If it declines at least one of the required
   policies or if the response contained a failure MFO, the UAC does not
   copy these MFOs into the PRACK or ACK and SHOULD terminate the dialog
   associated with this response.

3.2.4 Proxy Processing of ACKs/PRACKs

   The proxy could insert MFOs into the PRACK or ACK. However, these
   MFOs would not be copied back to the UAC, which would violate the
   requirement that both UAs and the proxy should know the set of
   policies used in a session. This behavior is therefore NOT
   RECOMMENDED.

3.2.5 Processing ACKs/PRACKs

   If the MFOs contained in a PRACK or ACK message are not acceptable to
   the UAS, it may decline them by terminating the dialog.

3.3 "Media-Interface" header usage

   The Media-Interface header value contains Media Interface Objects
   (MIOs) created by a UA. The structure and semantics of MIOs needs to
   be defined in a policy package. However, the following general rules
   apply to Media-Interface header values:

   The Media-Interface header value MUST consist of the policy package
   name, under which the MIO was created.

   The Media-Interface header MAY contain a signature parameter which
   enables proxies to verify the identity of the UA and the integrity of
   the MIOs.

   A UA creates a separate Media-Interface header value for each policy
   package it supports. A policy package MAY require the creation of
   multiple Media-Interface headers with different MIOs. The UAC SHOULD
   create MIOs for all policy packages it supports. MIOs SHOULD contain
   as much information about the session as possible.



Hilt & Rosenberg         Expires April 18, 2004                [Page 13]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   In the following example, the UA supports the packages foo and bar.
   It exposes data1 and data2 for package foo and data3 for package bar
   in MIOs.

   Media-Interface: foo;foo_param1=data1;foo_param2=data2,
   bar;bar_param=data3


3.4 "Media-Filter" header usage

   Media-Filter headers serve as a container for Media Filter Objects
   (MFOs). Each MFO is contained in a separate Media-Filter header
   value. Media-Filter header values implement a stack, which enables
   each proxy on the way to "push" its MFOs on top of the set of
   existing MFOs. The Media-Filter headers implement one single stack,
   which contains the MFOs for all packages. If a proxy wants to insert
   an MFO, it inserts the respective Media-Filter header value before
   the topmost Media-Filter header value.

   A UA, which receives a SIP message containing MFOs, processes them
   one after another and removes the processed element from the stack.

   The structure and semantics of MFOs needs to be defined in a policy
   package. However, the following general rules apply to Media-Filter
   header values:

   The Media-Filter header value MUST consist of the policy package
   name, under which the MFO was created.

   The following general parameters are defined for Media-Filter
   headers. They provide basic information about the MFO to UAs even if
   they don't support the policy package used.

   o  domain. The domain parameter carries the identity of the domain,
      which requested the policy. It MUST be present in each MFO.

   o  cns (consequences). The cns parameter is be used by the proxy to
      indicate the consequences of rejecting the policy to the UA. This
      parameter also enables a UA to determine if the acceptance of a
      policy is mandatory for establishing the session or not. The cns
      parameter contains a consequences code, which has a "required" and
      an "optional" range. An MFO SHOULD contain a consequences code. An
      MFO is optional if the cns parameter is not present.

   o  signature. A MFO MAY contain a signature, generated by the domain
      that inserted the MFO. This allows the endpoints to verify the
      identities of the domains, which have requested session policy,
      and the integrity of those policies.



Hilt & Rosenberg         Expires April 18, 2004                [Page 14]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   [TBD: define consequence codes.]

   A failure MFO is a special MFO, which indicates that the session is
   not acceptable to the proxy. A failure MFO is an MFO with consequence
   code 999. Additional package specific parameters MAY be present in a
   failure MFOs.

   [TBD: define reason codes and texts for failure MFOs.]

   In the following example, the proxy in domain example1.com has
   requested policies for package foo and the proxy in domain
   example2.com has requested policies for the packages foo and bar.

   Media-Filter: foo;domain=example2.com;cns=100;foo_param=data1,
   bar;domain=example2.com;cns=300;bar_param=data1,
   foo;domain=example1.com;foo_param=data2,


3.5 "Reverse-Media-Filter" header usage

   The Reverse-Media-Filter header is used to convey the MFOs, a UA has
   accepted, back to the peer UA. A Reverse-Media-Filter header contains
   a copy of the accepted MFOs and has the same structure as the
   Media-Filter header.



























Hilt & Rosenberg         Expires April 18, 2004                [Page 15]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


4. Session-Specific Policy Packages

   This section describes aspects that need to be considered when
   session-specific policy packages are defined.

4.1 Media Interface Object

   This section MUST be present in a policy package. It defines the
   structure of Media Interface Objects used within this package.

   A policy package MUST describe the semantics of an MIO. It MUST
   describe how proxies are supposed to interpret the information
   contained in an MIO.

4.2 Media Filter Object

   This section MUST be present in a policy package. It defines the
   structure of Media Filter Objects used within this package.

   Media Filter Objects (MFOs) may define the differences to an existing
   MIO. However, it is very important that MFOs don't just define a diff
   to an MIO, in the Unix sense. This is because it is important that
   the endpoints understand the semantics of a requested policy, not
   just the syntactical change that is needed to affect that policy. A
   MFO may also define a general policy which is independent of an MIO.

   A policy package MUST describe exactly how a UA is supposed to apply
   the policy contained in an MFO. In particular, the policy package
   MUST describe how the information in the MFO is applied to the
   session description and if additional steps need to be taken when
   accepting the policy. This process MUST enable a UA to determine the
   consequences of accepting the policy before actually executing the
   necessary steps.


















Hilt & Rosenberg         Expires April 18, 2004                [Page 16]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


5. Example Policy Package: Network-based Codec Selection

5.1 Session-Specific Codec Selection

   This policy package enables a proxy to influence the codecs that are
   used within a session. The UAs are enabled to expose the codecs they
   support in MIOs. The MFOs created by the proxy contain the list of
   codecs allowed in the domain. The package is currently defined based
   on session descriptions in SDP [4] format. However, it is not
   restricted to SDP and can be used with other session description
   formats respectively.

   The name of this package is "codec". This package name is carried in
   the Media-Interface, the Media-Filter and the Reverse-Media-Filter
   header as defined in this specification.

5.1.1 Media Interface Object

   A codec MIO describes the codecs that are supported by the UA
   creating the MIO.

   This policy package defines a media type parameter for codec MIOs (in
   addition to the general parameters for MIOs).

   The parameter name consists of the media type, for which this MIO
   provides a policy. If used with a SDP session description, it MUST
   have the same value as the media name attribute in the media
   description (m=) of the corresponding SDP announcement. Typical
   values are "audio", "video", "application" and "data".

   The value of this parameter consists of a media stream id and one or
   more codec formats. The media stream id provides an identifier for a
   media stream. It MUST have a value that is unique within the scope of
   the session description. The media stream id MUST be present in each
   codec MIO and it MUST NOT be zero. The codec format describes the
   codecs allowed for this media type. The format of the value is
   specific to each media type and has the same structure as the SDP
   rtpmap parameter. A UA SHOULD list all codecs is has listed for the
   media stream in the corresponding session description. All elements
   of the parameter value are concatenated with a "+" symbol.

   An example for a Media-Interface header containing a codec MIO is

   Media-Interface: codec;audio=7736ai+pcmu/8000/1+pcma/8000/1+
   eg711u/8000/1;video=hha9s8sd0+h261/90000

   This header specifies two media streams, an audio and a video stream.
   The available audio codecs are pcmu, pcma, and eg711u. The only video



Hilt & Rosenberg         Expires April 18, 2004                [Page 17]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   codec supported is h261.

   A proxy would create the following SDP announcement template from
   this MIO:

   m=audio <port1> RTP/AVP 0 8 <no1>
   a=rtpmap:0 pcmu/8000/1
   a=rtpmap:8 pcma/8000/1
   a=rtpmap:<no1> eg711u/8000/1
   m=video <port2> RTP/AVP 31
   a=rtpmap:31 h261/90000


5.1.2 Media Filter Object

   A codec MFO describes the list of codecs that are allowed under this
   session policy.

   In addition to the general header parameters, this policy package
   defines a media type parameter, which is structured exactly as the
   media type parameter in codec MIOs. The semantics of this parameter
   is as follows:

   The media stream id MUST refer to a media stream contained in an MIO
   or contain the value zero. If the media stream id refers to a media
   stream in an MIO, the codec policy applies only to the referred media
   stream. If the media stream id is zero, the policy apply to all
   streams of the respective media type. A proxy MAY insert multiple
   media type parameters with different media stream id's for the same
   media type, if it wants to define different policies for different
   streams of the same type.

   The media format element MUST list all codecs that are allowed under
   the current policy. It MAY contain codecs that are not listed in a
   respective MIO.

   [TBD: Define consequence codes.]

   An example for a Media-Filter header containing a codec MFO is

   Media-Filter: codec;domain=example1.com;
   audio=0+pcmu/8000/1+eg711u/8000/1,
   codec;domain=example2.com;cns=100;
   audio=0+eg711u/8000/1;video=0

   This header contains two MFOs, one inserted by proxy example1.com and
   one by example2.com. The policy of domain example1.com is that the
   set of allowed audio codecs is limited to pcmu and eg711u.



Hilt & Rosenberg         Expires April 18, 2004                [Page 18]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   Consequences for UAs rejecting this policy are not defined, which
   also indicates that this policy is optional. Domain example1.com has
   no policy for video codecs. The policy of domain example2.com is that
   only audio codec eg711u and no video can be used. Consequence of
   rejecting this policy is code 100, which indicates that the policy is
   mandatory. All policies apply to audio and video streams in general
   and are not bound to a stream listed in the MIO.

   A UA would create the following SDP filter from these MFOs:

   m=audio <port1> RTP/AVP <no1>
   a=rtpmap:<no1> eg711u/8000/1
   m=video <port2> RTP/AVP

   A UA, that accepts this policy, removes all audio and video codecs
   that are not listed in the SDP filter.



































Hilt & Rosenberg         Expires April 18, 2004                [Page 19]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


6. Security Considerations

   [TBD.]
















































Hilt & Rosenberg         Expires April 18, 2004                [Page 20]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


7. IANA Considerations

   [TBD.]
















































Hilt & Rosenberg         Expires April 18, 2004                [Page 21]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


8. Syntax

   This section describes the syntax extensions required for session
   policies.

8.1 Header Fields

   This table expands on tables 2 and 3 in SIP [9] and on table 1 and
   table 2 in Reliability of Provisional Responses in SIP [8].

   Header field         where proxy ACK BYE CAN INV OPT REG PRACK
   ---------------------------------------------------------------
   Media-Interface              r    o   -   -   o   -   -   o
   Media-Filter                 a    o   -   -   o   -   -   o
   Reverse-Media-Filter   r          -   -   -   o   -   -   -
   Reverse-Media-Filter              o   -   -   -   -   -   o



































Hilt & Rosenberg         Expires April 18, 2004                [Page 22]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


9. Open Issues

   The following issues are still open:

   o  Three way vs. two way. The current draft proposes a three way
      exchange to set up policies. The third way is purely informative
      and is needed to satisfy the following two requirements (see [7]):
      1) both UAs need to know about all policies (REQ-CON-1 and
      REQ-CON-2) and 2) the proxy needs to know which policies have been
      accepted (REQ-CON-5 and REQ-CON-6). However, the third way is
      troublesome with empty INVITEs and UPDATEs. One option would be to
      use an extra message (SUBSCRIBE/NOTIFY, INFO,...) on the third
      way. Another option would be to get rid of the above requirements
      and the third way. In that case, we would switch to the "one-party
      consent" model (used in OPES [1]) since only one UA (the sender of
      a media stream) would know about and agree to policies. Need
      investigate, if the "one-party consent" model is applicable to SIP
      sessions.

   o  Preconditions. Preconditions could be used to prevent "ghost
      rings" in case the UAC declines policies. This needs further
      investigation.





























Hilt & Rosenberg         Expires April 18, 2004                [Page 23]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


References

   [1]   Barbir, A., "An Architecture for Open Pluggable Edge Services
         (OPES)", draft-ietf-opes-architecture-04 (work in progress),
         December 2002.

   [2]   Hilt, V. and J. Rosenberg, "A Framework for Session-Independent
         Intermediary Session Policies in SIP", September 2003.

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

   [4]   Handley, M. and V. Jacobson, "SDP: Session Description
         Protocol", RFC 2327, April 1998.

   [5]   Oran, D., Schulzrinne, H. and G. Camarillo, "The Reason Header
         Field for the Session Initiation Protocol",
         draft-ietf-sip-reason-01 (work in progress), May 2002.

   [6]   Rosenberg, J., "The Session Initiation Protocol (SIP) UPDATE
         Method", RFC 3311, October 2002.

   [7]   Rosenberg, J., "Requirements for Session Policy for the Session
         Initiation Protocol  (SIP)",
         draft-ietf-sipping-session-policy-req-00 (work in progress),
         June 2003.

   [8]   Rosenberg, J. and H. Schulzrinne, "Reliability of Provisional
         Responses in Session Initiation Protocol (SIP)", RFC 3262, June
         2002.

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

   [10]  Srisuresh, P., Kuthan, J., Rosenberg, J., Molitor, A. and A.
         Rayhan, "Middlebox communication architecture and framework",
         RFC 3303, August 2002.













Hilt & Rosenberg         Expires April 18, 2004                [Page 24]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


Authors' Addresses

   Volker Hilt
   Bell Labs/Lucent Technologies
   101 Crawfords Corner Rd
   Holmdel, NJ  07733
   USA

   EMail: volkerh@bell-labs.com


   Jonathan Rosenberg
   dynamicsoft
   72 Eagle Rock Avenue
   East Hanover, NJ  07936
   USA

   EMail: jdrosen@dynamicsoft.com

































Hilt & Rosenberg         Expires April 18, 2004                [Page 25]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


Appendix A. Acknowledgements

   Many thanks to Markus Hofmann for his contributions to this draft.
















































Hilt & Rosenberg         Expires April 18, 2004                [Page 26]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   intellectual property or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; neither does it represent that it
   has made any effort to identify any such rights. Information on the
   IETF's procedures with respect to rights in standards-track and
   standards-related documentation can be found in BCP-11. Copies of
   claims of rights made available for publication and any assurances of
   licenses to be made available, or the result of an attempt made to
   obtain a general license or permission for the use of such
   proprietary rights by implementors or users of this specification can
   be obtained from the IETF Secretariat.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights which may cover technology that may be required to practice
   this standard. Please address the information to the IETF Executive
   Director.


Full Copyright Statement

   Copyright (C) The Internet Society (2003). All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works. However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assignees.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION



Hilt & Rosenberg         Expires April 18, 2004                [Page 27]

Internet-Draft    Session-Specific SIP Session Policies     October 2003


   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.











































Hilt & Rosenberg         Expires April 18, 2004                [Page 28]