<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" >
<?rfc sortrefs='yes' ?>
<?rfc iprnotified='yes' ?>
<?rfc topblock='yes' ?>
<?rfc toc='yes' ?>
<?rfc strict='yes' ?>
<?rfc compact='yes' ?>
<?rfc subcompact='no' ?>
<?rfc symrefs='no' ?>
<?rfc notedraftinprogress='yes' ?>
<rfc ipr="trust200902" category="info" submissionType="IETF" docName="A Session Initiation Protocol (SIP) Event Package for Communication Diversion Information in support of the Communication Diversion (CDIV) Notification (CDIVN) CDIV service
 draft-avasarala-dispatch-comm-div-notification-08.txt">
<front>
<title abbrev="SIP Communication Diversion Notification"></title>
<author fullname="Ranjit Avasarala" initials="R" surname="Avasarala" role="editor">
<organization abbrev="Polycom">Polycom Technology India Pvt Ltd</organization>
    <address>
    <postal>
    <street> Manyata Embassy Business Park,</street>
	    <city> Bangalore </city>
 	    <code> 560045 </code>
	    <country> India </country>
    </postal>
    <email>ranjit.avasarala@polycom.com</email>
    </address>
</author>
<author fullname="John Luc Bakker" initials="J" surname="Bakker">
<organization abbrev="Research in Motion Corporation">Research in Motion</organization>
    <address>
    <postal>
    <street> 5000 Riverside Drive, Building 6, Suite 100 </street>
    <city> Irving, Texas </city>
    <code> 75039 </code>
    <country> USA </country>
    </postal>
     <email>jbakker@rim.com</email>
    </address>
</author>
<date></date>
<workgroup>DISPATCH</workgroup>
<abstract>
   <t> 3GPP and TISPAN are defining the protocol specification for the
   Communication Diversion (CDIV) service using IP Multimedia (IM) Core
   Network (CN) subsystem supplementary service.  As part of CDIV, a SIP
   based Event package framework is used for notifying users about
   diversions (re-directions or forwarding) of their incoming
   communication sessions.  This document proposes a new SIP event
   package for allowing users to subscribe to and receive such
   notifications.  Users can further define filters to control the rate
   and content of such notifications.  The proposed event package is
   applicable to the CDIV supplementary service in IMS and may not be
   applicable to the general internet.
.
   </t>
</abstract>
</front>   
<middle>
<section title="Introduction" toc="default">
<t> 3GPP is currently maintaining and specifying communication diversion
   mechanisms which allow users to forward and/or redirect incoming
   communications to other destinations.  The intention of such
   mechanisms is to provide users with sufficient flexibility to manage
   their incoming communications in a better way.  The most common
   example is Communication Forward On Busy (CFB) where in users can
   forward any incoming calls, whilst they are busy on some other call,
   to their voice mail or a suitable alternative (e.g. some other user).
   Similarly other variants of communication diversion are well defined
   and used in practice such as Communication Forward on No Answer
   (CFNA), Communication Forward Unconditional (CFU).  Similarly 3GPP is
   currently maintaining and specifying a mechanism for Users to
   configure Communication Diversion Services ([1] and [2]) for their
   incoming communications.  The intention of such mechanisms is to
   provide Users with sufficient flexibility to manage their incoming
   communications in a better way

<vspace blankLines="1"></vspace>
However, with the increasing usage of Communication Diversion
   services, users may have many different variants and configurations
   active at the same time.  For instance, a user may have various CFU
   services configured differently based on the time-of-the-day and the
   Calling party's identity, or CFB based on the time-of-the-day.  This
   is possible by having various such configured diversions by
   subscribing to different Communication Diversion (CDIV) services as
   specified by 3GPP.  Though, there has been quite active work in the
   area of better customization and configuration of such Communication
   Diversion mechanisms, not much attention has been paid to how the
   Users can manage these services in an effective manner.  With the
   various advanced options and high flexibility provided, it is
   possible that the user loses track of the various Communication
   Diversion configurations or services they have registered for
<vspace blankLines="1"></vspace>
One of the basic ways, by which a user can manage a CDIV service is
   to be informed of which services they have registered for.  For
   example, [1] and [2] allow for such indications to be received by the
   subscriber, at the time of initiating an outgoing call.  However,
   simply showing the registered services is not sufficient, since each
   service may be customized in numerous and different ways for
   different criteria.  For example various instantiations of CFB may be
   configured for different times-of-the-day and different calling party
   identities.  Even if subscribers are shown information about all the
   Communication Diversion services and their variants that they are
   registered for, they may not be able to make sense or verify that
   each of them is correct as per their expectation.  Such a mismatch in
   terms of service behavior expectation and actual execution, may
   happen due to incorrect configuration on behalf of the User, which cannot 
   be easily detected if there are various communication
   diversion services and their different configurations for handling
   incoming connections.
<vspace blankLines="1"></vspace>
A probable and suitable instance, when the subscriber may easily
   judge whether a communication diversion is correct, is when it
   actually takes place.  The subscriber is already aware of the current
   conditions (time-of-day, current presence and availability etc) and
   hence is in a position to decide, whether the communication diversion
   which just occurred, was indeed as per their expectation.  For e.g.
   the subscriber wanted to divert all incoming calls to voice-mail,
   between 3.00 p.m. to 4.00 p.m.  Yet, by mistake she configures the
   time-duration as 3.00 to 4.00 p.m.  It would be very difficult for
   her to spot this error while manually reviewing her complete set of
   communication diversion services, with their various configurations.
   Instead, if the subscriber receives a real-time notification of any
   communication diversion occurring after 4 p.m., she would be able to
   immediately guess that something is 'wrong' or not as per her
   intention and take corrective action.  Such corrective action could
   be manual verification of the specific rule which triggered the
   communication diversion, wherein she will be able to spot the
   "mistake" more easily.
<vspace blankLines="1"></vspace>
Thus, for effective subscriber services management of multiple
   configurations of various Communication Diversion services, a
   notification-based mechanism may work well.  Such a mechanism would
   involve notifying subscribers about diversions of their incoming
   communications, as and when the communication diversion happens or
   with a slight delay (as per subscriber service configuration).  As
   such diversion-related information is conveyed almost instantly or
   within a small time-frame, the subscribers can verify whether the
   particular communication diversion is indeed correct at that instant
   of time.
<vspace blankLines="1"></vspace>
This document defines a SIP event package that allows a SIP User
   Agents to subscribe to and be notified of communication diversions
   enacted on their behalf. 
<vspace blankLines="1"></vspace>
</t>
</section>                                 
<section title="Terminology">
<t> In this document, the key words "MUST", "MUST NOT", "REQUIRED",
   "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
   and "OPTIONAL" are to be interpreted as described in RFC 2119 <xref target="RFC2119"></xref>
   and indicate requirement levels for compliant implementations.  </t>
</section>
<section title="Applicability Statement">
<t> It is believed that the SIP event package defined here is not applicable to the general Internet and has been designed to serve the
architecture of the CDIV service in IMS core networks. The aim of this memo is to follow the procedure indicated in RFC 5727.
<xref target="RFC5727"></xref> and to register a new event package with event name "comm-div-info" with IANA.
 </t>
</section>
<section title="Abbreviations and Definitions">
<section title="Abbreviations">
<t>
<list style="empty">
<t> CDIV: Communication Diversion. </t>
<t> CDIVN: Communication Diversion Notification. </t>
<t> TISPAN: Telecommunications and Internet Converged Services and Protocols for Advanced Networking. </t>
</list>
</t>
</section>
<section title="Definitions">
<t>
<list style="empty">
<t> Subscriber - The User Agent who has subscribed to the Communication diversion notification service. </t>
<t> User - Another term for the subscriber. </t>
<t> Diverting User - The User Agent who has configured a Communication Diversion. This could be the User Agent who has configured
    the Communication DIversion service rules in the network. </t>
<t> Diverted-To Entity/User - The User Agent who is the new target
    of the incoming communication, post execution of any configured Communication Diversion service.</t>
<t> Originating User - The User Agent who is the originator of the incoming communication, which was initially 
    targeted towards the Diverting User, but finally sent to the Diverted-To User.  The Originating
      User is also referred to as the Caller. </t>
<t> IMS Core Network - This refers to the IMS based SIP based network that conforms to the <xref target="3GPP.24.229"></xref> 
    and not the general SIP network as defined in <xref target="RFC3261"></xref>.</t>
</list>
</t> 
</section>
</section>
<section title="Requirements">
<t>The Communication Diversion Notification (CDIVN) service enables a user to receive notification about the diversion of any of his/her incoming 
   communications, which were addressed to the user's address. A comprehensive description of all the requirements that affect the 
   CDIVN service developed by 3GPP and TIPSAN is found in <xref target="3GPP.22.173"> </xref> and <xref target="3GPP.24.604"></xref>
</t>
</section>
<section title="Package Definition">
<t> This section fills in the details needed for an event package as defined in Section 4.4 of <xref target="RFC3265"></xref>.</t>
<section title="Event Package Name">
<t> The SIP Events specification requires package definitions to specify the name of their package or template-package.
<vspace blankLines="1"></vspace>
The name of this package is "comm-div-info". As specified in <xref target="RFC3265"></xref>, this value appears in the Event
header present in SUBSCRIBE and NOTIFY requests. </t>
</section>
<section title="Event Package Parameters">
<t> The SIP Events specification <xref target="RFC3265"></xref> allows packages to define additional parameters. This event package 
 "comm-div-info" does not define additional parameters.
. </t>
</section>
<section title="SUBSCRIBE bodies">
<t> The SIP Events specification requires package or template-package definitions to define the usage, if any, of bodies in SUBSCRIBE requests.
<vspace blankLines="1"></vspace>
A SUBSCRIBE for Communication Diversion event MAY contain a body. The purpose of the body depends on its type. Subscriptions to
the Comm-div-info event package SHALL only include a body of MIME type "application/comm-div-info-filter+xml". 
<vspace blankLines="1"></vspace>
A body of the SUBSCRIBE request with content type set to MIME type
   "application/comm-div-info-filter+xml" contains information about the
   communication diversion notification information filter criteria and
   notification trigger criteria.  The subscriber SHALL also verify that
   this information conforms to a valid XML document as defined in [11].
   The subscriber SHALL also verify that the information contained in
   the XML document contains elements defined in <xref target="sel"></xref>
   only.
</t>
</section>
<section title="Subscription Duration">
<t> The default expiration time for subscriptions within this package is 3600 seconds.  As per <xref target='RFC3265'></xref>, the subscriber
    MAY specify an alternate expiration in the Expires header field.
</t>
</section>
<section title="Notify bodies">
<t>The SIP Events specification requires package definitions to define a default value for subscription durations, and to discuss 
reasonable choices for durations when they are explicitly specified.
<vspace blankLines="1"></vspace>
The NOTIFY message contains bodies.  This body is a format listed in
   the Accept header field of the SUBSCRIBE request or a package
   specific default format if the Accept header field was omitted from
   the SUBSCRIBE request
<vspace blankLines="1"></vspace>
In this event package, the body of the notification contains the communication diversion information pertaining to the diversion
that occurred in the network on behalf of the subscriber. The format of the communication diversion information is an XML document
as per elements defined in <xref target='comm-div-ntfy-info'></xref>.
<vspace blankLines="1"></vspace>
All subscribers of "comm-div-info" event package who wish to add filter criteria to their subscription requests MUST support
the application/comm-div-info-filter+xml" data format as described in <xref target="comm-div-subs-info"></xref>
while the notifiers SHALL support the "application/comm-div-info+xml" data format as described in <xref target="comm-div-ntfy-info"></xref>.  
The SUBSCRIBE request MAY contain an Accept header field.  If no such header field is present, it has a default value of "application/comm-div-info-ntfy+xml"
(assuming Event header has a value of "comm-div-info-ntfy").  If the Accept header field is present, it MUST contain the value 
"application/comm-div-info-ntfy+xml" only.
 </t>
</section>
<section title="Notifier Processing of SUBSCRIBE requests" anchor="NotifierP">
<t>
The contents of a document containing comm-div-info information can contain sensitive information that can reveal some privacy 
information.  Therefore, such comm-div-info documents MUST only be sent to authorized subscribers. In order to determine if a 
subscription originates in an authorized user, the subscriber MUST be authenticated as described in <xref target="Auth"></xref>
and then the user MUST be authorized to be a subscriber as described in <xref target="Autho"></xref>.
<vspace blankLines="1"/>
The Notifier MUST check if the SUBSCRIBE request contains a body. If there is a body, the Notifier MUST do the following.
<list>
  <t> Check if the SUBSCRIBE request body conforms to application/comm-div-info-filter+xml document. If not, trigger a error
      response. E.g. 415 Media Type Unsupported response. </t>
  <t> If the body conforms to application/comm-div-info-filter+xml document, then the Notifier process the filter criteria and
      generates notifications accordingly. </t>
  <t> If the SUBSCRIBE request contains a request body and if the Notifier does not support it, it simply ignores it. The notifications
      are sent as if there was no filter criteria.</t>
</list>
<vspace blankLines="1"/>
NOTE: It could be possible that the state information be empty as this is the first notification sent towards the subscriber in response
to the SUBSCRIBE request and no communication diversions have occurred yet. 
</t>
<section title="Authentication" anchor="Auth">
<t>Notifiers MUST authenticate all subscription requests.  This authentication can be done using any of the mechanisms defined in
<xref target="RFC3261"></xref> and other authentication extensions.
</t>
</section>
<section title="Authorization" anchor="Autho">
<t> Once authenticated, the notifier makes an authorization decision.  A notifier MUST NOT accept a subscription unless 
authorization has been provided by the user.  The means by which authorization are provided are outside the scope of this document. 
Authorization may have been provided ahead of time through access lists, perhaps specified in a web page.  Authorization may have 
been provided by means of uploading some kind of standardized access control list document
</t>
</section>
</section>
<section title="Notifier Generation of NOTIFY requests" anchor="NotifierG">
<t> The SIP Events specification details the formatting and structure of NOTIFY messages. However, packages are mandated to provide 
detailed information on when to send a NOTIFY, how to compute the state of the resource, how to generate neutral or fake state information,
and whether state information is complete or partial.  This section describes those details for the "comm-div-info" event package.
<vspace blankLines="1"></vspace>
A notifier sends a NOTIFY request when a communication diversion is enacted on behalf of the user. If there is a stored filter criteria for 
the user, then the notifier MUST look into the filter criteria before generating the NOTIFY request towards the user. If the filter criteria
matches, then the notifier generates the NOTIFY request and sends the NOTIFY request to the user. If the filter criteria does not match the
enacted communication diversion, then the notifier does not send any notification towards the subscriber. 
<vspace blankLines="1"/>
The body of the NOTIFY MUST be sent using the type "application/comm-div-info-ntfy+xml" and must contain the elements defined in 
<xref target="comm-div-ntfy-info"></xref> only. The Content-Type header field MUST be set to "application/comm-div-info-ntfy+xml".
<vspace blankLines="1"></vspace>
Notifiers could detect that a communication diversion was enacted on behalf of the subscriber via a "History-Info" header field <xref target="RFC4244">
</xref> value, per <xref target="3GPP.24.404"></xref> or <xref target="3GPP.24.604"></xref>, sent from an application server hosting the CDIV service. 
 </t>
</section>
<section title="Subscriber Processing of NOTIFY Requests">
<t> The SIP Events specification expects event packages to describe the process followed by the subscriber upon receipt of a 
NOTIFY request. In this specification, each NOTIFY request contains a comm-div-info document
</t>
</section>
<section title="Handling of Forked Requests">
<t> The SIP Events specification requires each package to describe handling of forked Requests. 
<vspace blankLines="1"></vspace>
This specification only allows a single dialog to be constructed as a result of emitting an initial SUBSCRIBE request. This
guarantees that only a single notifier is generating notifications for a particular subscription to a particular user. 
<vspace blankLines="1"/>
But if forking is allowed, then the server that receives multiple subscriptions should be able to generate a single dialog on behalf of all the
subscriptions that are received. Any subsequent subscriptions should be mapped to the generated dialog. Similarly when the server
receives a single notification for the generated dialog, it should be generate the corresponding number of notifications towards the
received notifications.
</t>
</section>
<section title="Rate of Notifications">
<t>
The SIP Events specification requires each package to specify maximum rate at which notifications can be sent . 
<vspace blankLines="1"></vspace>
Comm-div-info notifiers SHOULD NOT generate notifications for a
  single subscription at a rate of more than once every five seconds.
</t>
</section>
<section title="State Agents" anchor="state">
<t>
An FSM associated with the subscriber is created in the "IDLE" state, e.g. upon receiving filter criteria.
When a communication diversion is detected for a URI of the subscriber, a state transition to the 
"DIVERSION_DETECTED" state occurs.  In this state, if present the filter criteria are used to 
determine whether notification information needs to be sent to the subscriber or not. If 
notification information needs to be sent, the Notifier generates the notification 
information and sends the information to the subscriber.  Additionally, a state 
transition to the "DIVERSION_NOTIFIED" state occurs.
<vspace blankLines="1"></vspace>
The FSM for CDIVN is shown in below Figure.
<figure title="Diverted URI State Machine" anchor="Figure 1">
  <artwork>
     <![CDATA[
+------------+  Diversion  +---------------+
|            +--+--------->+               |
|   IDLE     |  ^          |   DIVERSION   |
|            |  |  +------>+   DETECTED    |
+------------+  |  |       +--+----+-------+
                |  | no match      |  |filter
                +------------------+  |match
                   |                  v
                   |          +-------+-------+
                   |          |   DIVERSION   |
                   |          |    NOTIFIED   |
                   |          +-----+---------+
                   |    Diversion   |
                   +----------------+
          ]]>
  </artwork>
</figure>
</t>
<t> 
The subscriber could receive, as part of the notification information, the 
state the FSM was in prior to detecting the diversion.
<list style='symbols'>
  <t>[IDLE]: meaning that there have been no missed diversions since setting 
      the present "filter".</t>
  <t>[DIVERSION_NOTIFIED]: meaning that there have been no missed 
      diversions. </t>
  <t>[DIVERSION_DETECTED]: meaning that there have been some missed 
      diversions. </t>
</list>
</t>
</section>
</section>
<section title="Comm-div-info filter and notifier documents" anchor="Comm-div-info">
<t> Comm-div-info document is an XML document <xref target="W3C.REC-xml-20001006"></xref> that MUST be well-formed
and SHOULD be valid. Communication Diversion Information documents MUST be based on XML 1.0 and MUST be encoded using UTF-8 
<xref target="RFC4745"></xref>.   </t>
</section>
<section title="Structure of Comm-div-info filter and notifier formats" anchor="comm-div-info-doc">
<t>A Communications Diversion Information document starts with a "comm-div-info" element. 
 The comm-div-info element has a series of elements describing the particular communication diversion or the filter criteria for
 receiving the communication diversion information.  </t>
 <section title="Comm-div-info Element" anchor="comm-div-info-ele">
    <t> The comm-div-info element gives information about the specific communication diversion or it could give information 
    about a particular selection criteria for the user receiving the communication diversion information.   </t>
     <section title="comm-div-subs-info Element" anchor="comm-div-subs-info">
        <t>The comm-div-subs-info element is used by the subscribing user to specify the communication diversion information
           selection criteria and the communication diversion notification trigger criteria. It contains the following elements:
        </t>
        <section title="comm-div-selection-criteria" anchor="sel">
          <t> This element contains information about communication diversion information selection criteria. It contains
              following sub-elements for specifying the selection criteria. </t>
              <section title="originating-user-selection-criteria" anchor="orig">
                <t>This element specifies the originating user information for the communication i.e. the caller. This is specified
                   in the form of "user-name" and "user-uri". E.g. sip:Alice@domain.com. The Username as well as User-URI specified
                   will be compared with the originating user information of the current user and if there is a match, then
                   information about the diversion of this specific communication would be selected for notification to the
                   Diverting user. It consists of the following sub-elements. </t>
                <section title="user-info" anchor="ui-info">
                  <t>This element gives user details like username and URI. This element has further sub-elements for
                     describing username and user URI</t>
                  <section title="User-name" anchor="uu">
                    <t> This element gives Username. "Alice". </t> 
                  </section>
                  <section title="User-URI" anchor="ui">
                    <t> This element gives User URI. E.g "sip:Alice@domain.com". It takes the form of any URI scheme like sip.
                        sips, tel or any other URI scheme</t>
                  </section> 
                </section>
              </section>
              <section title="diversion-time-selection-criteria" anchor="div-time-sel">
                 <t>This element specifies the time range for receiving notifications. It contains following additional elements
                    .</t>
                 <section title="time-range" anchor="time">
                    <t> This element specifies the time range at which notifications for communication diversions can be sent
                        to the subscriber. This could be specified in the form of a time-interval to enable periodic triggering
                        of notifications of communication diversions which took place in that time-interval. 
                        <vspace blankLines="1"></vspace>
                        NOTE: If the time-range element is not specified, then notifications about every communication diversion
                        that occurs is sent to the subscriber.
                    </t>
                        <section title="start-time" anchor="start">
                        <t> This element specifies the start time for receiving notifications. Its value is expressed in
                            YYYY:MM:DDTHH:MM:SSZ format.</t>
                    </section>
                    <section title="end-time" anchor="end">
                        <t> This element specifies the end time for receiving notifications. Its value is expressed in
                             YYYY:MM:DDTHH:MM:SSZ format.  </t>
                    </section>
                 </section>
              </section>
              <section title="diverting-user-selection-criteria" anchor="diving-user-sel">
                 <t> This element gives details of diverting user. This element could contain the value present in P-Called-Party-ID header field 
                     and by including the identity in the "diverting-user-info", the receiving UE would know if the call was diverted because a 
                     rule associated with e.g. the "work" public user identities was triggered. The URI specified over here will be compared
                     with the Request URI of the diverting user for whom a communication has been diverted.  Only if there is a  match, 
                     then information about the diversion of this specific communication would be selected for notification to the diverting 
                     user.  This is an optional parameter.  If absent, then communication diversions towards all registered contacts of the 
                     subscribing user would be considered for notification, subject to other filter criteria. This element consists of 
                     sub-elements defined for "user-info" element <xref target="uu"></xref>
                 </t>
              </section>
              <section title="diverted-to-user-selection-criteria" anchor="dived-user-sel">
                 <t> This element gives details of the final target of the communication, the divered-to user.  The URI
                     specified in the Request URI of the new request is compared with the specified diverted-to URI. Only if
                     there is a match, then information about the diversion of this specific communication would be selected 
                     for notification to the Diverting user. This element consists of sub-elements defined for "user-info" element
                     <xref target="uu"></xref>.
                 </t>
              </section>
              <section title="diversion-reason-selection-criteria" anchor="div-rea-sel">
                 <t>This element contains the reason for communication diversion. It contains following sub-element: </t>
                 <section title="diversion-reason-info" anchor="div-reason">
                   <t> This element gives the actual reason for the communication diversion. E.g. "Call Forward on Busy".</t>
                 </section>
             </section>
             <section title="number-of-diversions-selection-criteria" anchor="div-num-sel">
                 <t> This element contains the total number of diversions that occurred in network on behalf of the user till then. </t>
             </section>
             <section title="number-of-notifications-selection-criteria" anchor="div-not-sel">
                 <t> This element contains the total number of communication diversion notifications sent by the network to user till then. </t>
             </section>
        </section>
        <section title="comm-div-ntfy-trigger-criteria" anchor="comm-div-ntfy-tri">
           <section title="notification-time-selection-criteria" anchor="ntfy-time-sel">
             <t> This element informs the server about the time at which the notification should be triggered. </t>
           </section>
           <section title="presence-status-selection-criteria" anchor="pres-sel">
             <t> This element gives the presence status of the subscriber, based on which the decision can be made, whether the
                 subscriber wishes to receive notification information or not. </t>
             <section title="presence-selection-info" anchor="pres-info">
               <t> This element specifies the presence status of the subscriber within which the subscriber expects to receive 
                   notifications about communication diversions.
               </t>
             </section>
           </section>
           <section title="notification-buffer-interval" anchor="not-bu">
           <t> This element specifies an optional element (in seconds) to overwrite the CDIVN Buffer Timer for which the CDIVN
               Application Server should store the CDIV Notification, if it cannot be delivered to the subscriber, For example 
               this would be required for buffering the
               notifications, if the user is logged out and the diversion is triggered due to CFNL/CFNRc, resulting in CDIVN for
               that diversion. The user may set Notification Buffer Interval value in seconds to a maximum value of 1 day. Also, if
               not configured by the user, the default value of 1 day (as configured by the network provider) is applicable.  
           </t>
           </section>
        </section>
     </section>
     <section title="Comm-div-ntfy-info Element" anchor="comm-div-ntfy-info">
        <t> This element gives the notification information. This element has following sub-elements: </t>
        <section title="originating-user-info">
          <t> Refer to <xref target="orig"></xref> for details of this element. </t>
        </section>
        <section title="diverting-user-info" anchor="diving-user">
           <t> This element gives details of the diverting user.  This is an optional element and would be present only if the
               subscriber has requested it. If absent, it is assumed that the diversion occurred at one of the registered contacts.
           </t>
        </section>
        <section title="diverted-to-user-info" anchor="dived-user">
           <t> This element gives details of the final target of the communication i.e. the diverted-to user.  This element consists
               of sub-elements defined for "user-info" element. </t>
        </section>
        <section title="diversion-time-info" anchor="div-time">
           <t> This element gives the time of communication diversion. Its value is expressed in 
               YYYY:MM:DDTHH:MM:SS format.  </t>
        </section>
        <section title="diversion-reason-info" anchor="div-reas">
           <t> This element contains an integer value and gives the actual reason for the communication diversion. 
               The integer value of the element is mapped to the causes defined in <xref target="RFC4458"></xref>.  
               Specifically, the integer value is derived from the cause-param parameter in the History-info header field.  
               The subscriber converts the integer value of the element into a localized diversion reason according to 
               locale settings (i.e. preferred language)..</t>
        </section>
		<section title="previous cdivn state" anchor="prev-state">
		   <t> This element gives the previous state of CDIVN FSM. </t>
		</section>
     </section>
     <section title="Comm-div-info-selection-criteria" anchor="comm-div-info-sel">
       <t> This element gives the subscriber various options to select communication diversion information. This element has following
           sub-elements. </t>
       <section title="disable-originating-user-info" anchor="dis-orig">
           <t> This element gives the subscriber option of adding originating user information to the notification information. The
            default value is false which means the subscriber wants the originating-user-info element to be present in the
            notification information.
           </t>
       </section>
       <section title="disable-diverting-user-info" anchor="dis-divi-u">
           <t> This element gives the subscriber option of adding diverting-user information to the notification information.  The
            default value is false which means the subscriber wants the diverting-user-info element to be present in the
            notification information.
           </t>
       </section>
       <section title="disable-diverted-to-user-info" anchor="dis-divt-u">
           <t> This element gives the subscriber option of adding diverting-to-user information to the notification information.
              The default value is false which means the subscriber wants the diverted-to-user-info element to be present in the
              notification information.
           </t>
       </section>       
       <section title="disable-diversion-time-info" anchor="dis-div-time">
           <t> This element gives the subscriber option of adding diversion-time information to the notification information.  The
            default value is false which means the subscriber wants the diversion-time-info to be present in the notification
            information.
           </t>
       </section>
       <section title="disable-diversion-reason" anchor="dis-div-rea">
           <t> This element gives the subscriber option of adding diversion-reason information to the notification information.   The
            default value is false which means the subscriber wants the diversion-reason information to be present in the
            notification information.
           </t>
       </section>       
       <section title="disable-diversion-rule" anchor="dis-div-rule">
           <t> This element gives the subscriber option of adding diversion-rule information to the notification information. The
               default value is false which means the subscriber wants the diversion-rule information to be present in the
               notification information.
           </t>
       </section>
     </section>
 </section>
 <section title="Sample comm-div-info subscription and notification body" anchor="samnot">
    <section title="Instance of communication diversion subscription filter document">
      <figure>
        <artwork>
          <![CDATA[
<comm-div-info>
  <comm-div-subs-info>
      <comm-div-selection-criteria>
         <originating-user-selection-criteria>
           <user-info>
             <user-name>Boss</user-name>
             <user-URI>
               sip:boss@office.com
             </user-URI>
           </user-info>
         </originating-user-selection-criteria>
         <diversion-time-selection-criteria>
           <time-range>
            <start-time>1999-05-31T13:20:00-05:00Z</start-time>
            <end-time>2006-05-06T13:20:00-05:00Z</end-time>
           </time-range>
         </diversion-time-selection-criteria>
         <diversion-reason-selection-criteria>
           <diversion-reason-info>404</diversion-reason-info>
         </diversion-reason-selection-criteria>
       </comm-div-selection-criteria>
       <comm-div-ntfy-trigger-criteria>
         <notification-time-selection-criteria>
           <time-range>
            <start-time>1999-05-31T13:20:00-05:00Z</start-time>
            <end-time>2006-05-06T13:20:00-05:00Z</end-time>
           </time-range>
         </notification-time-selection-criteria>
       </comm-div-ntfy-trigger-criteria>
   </comm-div-subs-info>
</comm-div-info>
         ]]>
       </artwork>
      </figure>
 </section>
 <section title="Instance of communication diversion notification document">
     <figure>
        <artwork>
          <![CDATA[
<comm-div-info>
  <comm-div-ntfy-info>
    <originating-user-info>
      <user-name>Boss</user-name>
      <user-URI>sip:boss@office.com</user-URI>
    </originating-user-info>
    <diverting-user-info>
      sip:alice@office.com
    </diverting-user-info>
    <diverted-to-user-info>
      sip:bob@office.com
    </diverted-to-user-info>
    <diversion-time-info>1999-06-01T13:20:00-05:00Z
    </diversion-time-info>
    <diversion-reason-info>404</diversion-reason-info>
  </comm-div-ntfy-info>
</comm-div-info>
          ]]>
       </artwork>
      </figure>
 </section>
 </section>
 <section title="Schema" anchor="schema">
 <figure>
   <artwork>
     <![CDATA[
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema 
  targetNamespace="http://uri.etsi.org/ngn/params/xml/comm-div-info"  
  xmlns:tns="http://uri.etsi.org/ngn/params/xml/comm-div-info"  
  xmlns:xs="http://www.w3.org/2001/XMLSchema"  
  xmlns="http://uri.etsi.org/ngn/params/xml/comm-div-info" 
  elementFormDefault="qualified" 
  attributeFormDefault="unqualified">
  <!--
  This import brings in the XML language definition
  -->
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
    schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
  <!-- 
  Communication Diversion Information. This is the top-level XML element 
  -->
  <xs:element name="comm-div-info" 
    type="comm-div-info-type" /> 
  <!--
  Communication Diversion Information Type. This is the top-level XML
  element 
  -->
  <xs:complexType name="comm-div-info-type">
    <xs:sequence>
      <xs:element name="comm-div-subs-info"
        type="comm-div-subs-info-type" minOccurs="0" />
      <xs:element name="comm-div-ntfy-info"
        type="comm-div-ntfy-info-type" minOccurs="0" />
      <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="entity" type="xs:anyURI" 
      use="required"/>
  </xs:complexType>
  <!---
  Communication Diversion Subscription Type.
  Used at Subscription time to
        select Communication Diversions for notification,
        when to notify them and
        what to notify.
  -->
  <xs:complexType name="comm-div-subs-info-type">
    <xs:sequence>
      <xs:element name="comm-div-selection-criteria"
        type="comm-div-selection-criteria-type" 
        minOccurs="0" />
      <xs:element name="comm-div-ntfy-trigger-criteria"
        type="comm-div-ntfy-trigger-criteria-type" 
        minOccurs="0" />
      <xs:element name="comm-div-info-selection-criteria"
        type="comm-div-info-selection-criteria-type" 
        minOccurs="0" />
      <xs:element name="previous_cdivn-state"
        type="cdivn-states-types" maxOccurs="0" />
      <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!---
  Communication Diversion Notification Information Type
  Used while notifying the User about the Communication Diversion
  -->
  <xs:complexType name="comm-div-ntfy-info-type">
    <xs:sequence>
      <xs:element name="originating-user-info"
        type="user-info-type" minOccurs="0" />
      <xs:element name="diverting-user-info"
        type="xs:anyURI" minOccurs="0" />
      <xs:element name="diverted-to-user-info"
        type="xs:anyURI" minOccurs="0" />
      <xs:element name="diversion-time-info" 
        type="xs:dateTime" minOccurs="0" />
      <xs:element name="diversion-reason-info"
        type="diversion-reason-info-type" minOccurs="0" />
      <xs:element name="diversion-rule-info"
        type="diversion-rule-info-type" minOccurs="0" />
      <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  COMMUNICATION DIVERSION SELECTION CRITERIA
  -->
  <xs:complexType name="comm-div-selection-criteria-type">
    <xs:sequence>
      <xs:element name="originating-user-selection-criteria"
        type="user-selection-criteria-type" 
        minOccurs="0" />
      <xs:element name="diverting-user-selection-criteria"
        type="xs:anyURI" 
        minOccurs="0" />
      <xs:element name="diverted-to-user-selection-criteria"
        type="xs:anyURI" 
        minOccurs="0" />
      <xs:element name="diversion-time-selection-criteria"
        type="time-range-selection-criteria-type" 
        minOccurs="0" />
      <xs:element name="diversion-reason-selection-criteria"
        type="diversion-reason-selection-criteria-type" 
        minOccurs="0" />
      <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  COMMUNICATION DIVERSION NOTIFICATION TRIGGER CRITERIA
  -->
  <xs:complexType name="comm-div-ntfy-trigger-criteria-type">
    <xs:sequence>
      <xs:element name="notification-time-selection-criteria"
        type="time-range-selection-criteria-type" 
        minOccurs="0" />
      <xs:element name="presence-status-selection-criteria"
        type="presence-status-selection-criteria-type" 
        minOccurs="0" />
      <xs:element name="notification-buffer-interval" minOccurs="0" 
      default="86400">
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:maxInclusive value="86400"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  COMMUNICATION DIVERSION INFORMATION SELECTION CRITERIA
  -->
  <xs:complexType name="comm-div-info-selection-criteria-type">
    <xs:sequence>
      <xs:element name="disable-originating-user-info"
        type="xs:boolean" default="false" minOccurs="0" />
      <xs:element name="disable-diverting-user-info"
        type="xs:boolean" default="false" minOccurs="0" />
      <xs:element name="disable-diverted-to-user-info"
        type="xs:boolean" default="false" minOccurs="0" />
      <xs:element name="disable-diversion-time-info"
        type="xs:boolean" default="false" minOccurs="0" />
      <xs:element name="disable-diversion-reason-info"
        type="xs:boolean" default="false" minOccurs="0" />
      <xs:element name="disable-diversion-rule-info"
        type="xs:boolean" default="false" minOccurs="0" />
      <xs:any namespace="##other" processContents="lax"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

  <!-- User Info Type -->
  <xs:complexType name="user-info-type">
    <xs:sequence>
      <xs:element name="user-name" type="xs:string" minOccurs="0" 
      maxOccurs="1"/>
      <xs:element name="user-URI" type="xs:anyURI"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  CDIVN FSM STATES
  -->
    <xs:simpleType name="cdivn-states-types">
        <xs:list itemType="cdivn-states-type"/>
    </xs:simpleType>
  <xs:simpleType name="cdivn-states-type">
        <xs:restriction base="xs:string">
            <xs:enumeration value="IDLE"/>
            <xs:enumeration value="DIVERSION_NOTIFIED"/>
            <xs:enumeration value="DIVERSION_DETECTED"/>
        </xs:restriction>
  </xs:simpleType>
  <!--    
  DIVERSION REASON INFO
  -->
    <xs:simpleType name="diversion-reason-info-types">
        <xs:list itemType="diversion-reason-info-type"/>
    </xs:simpleType>
  <xs:simpleType name="diversion-reason-info-type">
        <xs:restriction base="xs:integer">
            <xs:enumeration value="404"/>
            <xs:enumeration value="486"/>
            <xs:enumeration value="408"/>
            <xs:enumeration value="302"/>
            <xs:enumeration value="487"/>
            <xs:enumeration value="480"/>
            <xs:enumeration value="503"/>
        </xs:restriction>
  </xs:simpleType>
  <!--    
  DIVERSION RULE INFO
  -->
  <xs:complexType name="diversion-rule-info-type">
    <xs:sequence>
      <xs:element name="diversion-rule" type="xs:string"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  ORIGINATING USER SELECTION CRITERIA
  -->
  <xs:complexType name="user-selection-criteria-type">
    <xs:sequence>
      <xs:element name="user-info" 
        type="user-info-type" minOccurs="0"
        maxOccurs="unbounded" />
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  DIVERSION REASON SELECTION CRITERIA
  -->
  <xs:complexType name="diversion-reason-selection-criteria-type">
    <xs:sequence>
      <xs:element name="diversion-reason-info" 
        type="diversion-reason-info-types"/>
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  TIME RANGE SELECTION CRITERIA
  -->
  <xs:complexType name="time-range-selection-criteria-type">
    <xs:sequence>
      <xs:element name="time-range" 
        type="time-range-type" minOccurs="0" 
        maxOccurs="unbounded" />
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  TIME RANGE INFO
  -->
  <xs:complexType name="time-range-type">
    <xs:sequence>
      <xs:element name="start-time" type="xs:dateTime" />
      <xs:element name="end-time" type="xs:dateTime" />
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  PRESENCE STATUS SELECTION CRITERIA
  -->
  <xs:complexType name="presence-status-selection-criteria-type">
    <xs:sequence>
      <xs:element name="presence-status-info" 
        type="presence-status-info-type" minOccurs="0"
        maxOccurs="unbounded" />
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
  <!--
  PRESENCE STATUS INFO
  -->
  <xs:complexType name="presence-status-info-type">
    <xs:sequence>
      <xs:element name="presence-status" type="xs:string" />
    </xs:sequence>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>
</xs:schema>
     ]]>
   </artwork>
 </figure>
 </section>
</section>
<section title="Security Considerations" anchor="sec-cond">
<t>
Authentication and authorization of subscriptions have been discussed
in <xref target="NotifierP"></xref>.  Lack of authentication or authorization may provide
comm-div-info information to unauthorized parties and can reveal
sensitive information with regards to the user's call receiving
patterns.  For example, who calls the user and at what time, etc.  
<vspace blankLines="1"></vspace>
Integrity protection and confidentiality of notifications are also
discussed in <xref target="NotifierG"></xref>.  If a notifier does not encrypt bodies of
NOTIFY requests, an eavesdropper could learn the status of a SIP user
agent and use it to create malicious sessions.  If the notifier
does not integrity protect the bodies of NOTIFY requests, a man-in-
the-middle attacker or malicious SIP proxy could modify the contents
of the comm-div-info event package notification.  Although this does
not cause harm, it can create annoyances. </t>
</section>
<section title="IANA Considerations">
<t> This document registers the new SIP Event Package. </t>
 <section title="Communication Diversion Information Event Package Registration">
   <figure>
    <artwork>
     <![CDATA[
Package Name: Comm-div-info

Type: Package

Contact:  Jon Merdith, <John.meredith@3gpp.org>

Published Specification: RFC XXXX (Note to RFC Editor)
     ]]>
    </artwork>
   </figure>
  </section>
</section>
<section title="Acknowledgements">
  <t> The authors would like to thank Mary Barnes, Samir Saklikar, Subir Saha, Ban Al-Bakri, Roland Jesske, Jose Miguel Torres, 
      Paul Kyzivat, John Elwell , Keith Drage , Gonzalo Camarillo and Dean Willis for their valuable comments and suggestions. </t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include="reference.3GPP.24.604.xml" ?>
<?rfc include="reference.3GPP.24.404.xml" ?>
<?rfc include="reference.3GPP.22.173.xml" ?>
<?rfc include="reference.RFC.2119.xml" ?>
<?rfc include="reference.RFC.3261.xml" ?>
<?rfc include="reference.RFC.5727.xml" ?>
<?rfc include="reference.RFC.3265.xml" ?>
<?rfc include="reference.RFC.4244.xml" ?>
<?rfc include="reference.RFC.4458.xml" ?>
</references>
<references title="Informative References">
<?rfc include="reference.3GPP.24.229.xml"?>
<?rfc include="reference.W3C.REC-xml-20001006.xml" ?>
<?rfc include="reference.RFC.4745.xml" ?>
</references>
<section title="Change log">
<figure>
  <artwork>
    <![CDATA[
[RFC EDITOR NOTE: Please remove this section when publishing]
    ]]>   
    </artwork>
  </figure>
 <t>Changes from draft-avasarala-dispatch-comm-div-notification-07
     <list style="symbols">
        <t>Added MIME type for communication diversion filter criteria.</t>
		<t>Updated the State Agents section to add state diagram for CDIVN Service.</t>
		<t>Updated the schema for CDIVN notification document. </t>
		<t>Updated the Acknowledgements section.</t>
      </list>
    </t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-06
   <list style="symbols">
      <t>Changed the namespace for XML schema to "http://urn.etsi.org" aligning with 3GPP TS 24.504</t>
      <t>Updated the XML schema and removed the word "optional" for "diverting-user-info" </t>
    </list>
  </t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-05
  <list style="symbols">
    <t>Updated Requirements section </t>
    <t>Incorporated expert review comments for state information, notification content and subscribe bodies </t>
    <t>Modified the section on examples for subscription and notification body </t>
  </list>
</t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-04
<list style="symbols">
  <t>Incorporated review comments </t>
  <t>Added text for SUBSCRIBE body and NOTIFY body and checking of
     filter criteria. </t>
  <t>Updated Communication Diversion Notification Information document
     and XML schema to add Diversion and notification count information as optional parameters.</t>
</list>
</t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-03
<list style="symbols">
  <t>Added State information to Notifiers. </t>
  <t>Modified diverting-URI definition and element in communication 
     diversion information selection criteria as optional parameter
. </t>
  </list>
</t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-02
<list style="symbols">
  <t>Modified the applicability statement to make it more IMS specific. </t>
  <t>Added a definition for IMS Core network. </t>
  <t>Updated authors list and Acknowledgement sections. </t>
</list>
</t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-01
<list style="symbols">
<t>Incorporated review comments. </t>
<t>Modified contact details for co author Subir Saha. </t>
</list>
</t>
<t>Changes from draft-avasarala-sipping-comm-div-notification-00
<list style="symbols">
<t> Changed contact details of co author Subir Saha. </t>
<t> Moved from SIPPING to DISPATCH WG. </t>
</list>
</t>
<t>Changes from draft-avasarala-dispatch-comm-div-notification-00
<list style="symbols">
<t> Added comm-div-info document structure information and schema for the 
    event package.
</t>
<t> Added more elaborate description for various sections in comm-div-info
    document
</t>
</list>
</t>  
</section>
</back>
</rfc>

