view Side-By-Side changes
Internet DraftEricsson Inc.dynamicsoft Category: Standards TrackNovember 2001February 2002 ExpiresMayAugust 2002<draft-ietf-sip-events-01.txt><draft-ietf-sip-events-02.txt> SIP-Specific Event Notification 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 cite them other than as "work in progress". The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/lid-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html This document is an individual submission to the IETF. Comments should be directed to the authors. Abstract This document describes an extension to the Session Initiation Protocol (SIP). The purpose of this extension is to provide an extensible framework by which SIP nodes can request notification from remote nodes indicating that certain events have occurred. Concrete uses of the mechanism described in this document may be standardized in the future. Note that the event notification mechanisms defined herein are NOT intended to be a general-purpose infrastructure for all classes of event subscription and notification. 1. Table of Contents 1. Table of Contents...................................... 1 2. Introduction........................................... 3 2.1. Overview of Operation.................................. 4 3.Syntax.................................................Definitions............................................ 4 Roach [Page 1] Internet Draft SIP-Specific Event NotificationNovember 2001 3.1. New Methods............................................ 4 3.1.1. SUBSCRIBE method....................................... 5 3.1.2. NOTIFY method.......................................... 6 3.2. New Headers............................................ 6 3.2.1. "Event" header......................................... 6 3.2.2. "Allow-Events" Header.................................. 7 3.2.3. "Subscription-Expires" Header.......................... 7 3.3. New Response Codes..................................... 7 3.3.1. "202 Accepted" Response Code........................... 8 3.3.2. "489 Bad Event" Response Code.......................... 8February 2002 4. Node Behavior..........................................85 4.1.General................................................ 8 4.1.1. Route Handling......................................... 8 4.1.2. Detecting support for SUBSCRIBE and NOTIFY............. 9 4.1.3. CANCEL requests........................................ 9 4.1.4. State Agents and Notifier Migration.................... 9 4.2.Description of SUBSCRIBE Behavior......................10 4.2.1. Correlation to dialogs, calls, and terminals........... 10 4.2.2.5 4.1.1. Subscription duration..................................11 4.2.3.5 4.1.2. Identification of Subscribed Events and Event Classes..11 4.2.4.6 4.1.3. Additional SUBSCRIBE Header Values.....................12 4.2.5.6 4.1.4. Subscriber SUBSCRIBE Behavior..........................12 4.2.6.7 4.1.5. Proxy SUBSCRIBE Behavior...............................14 4.2.7.8 4.1.6. Notifier SUBSCRIBE Behavior............................14 4.3.9 4.2. Description of NOTIFY Behavior.........................17 4.3.1. Correlation............................................ 17 4.3.2.11 4.2.1. Identification of reported events, event classes, and c18 4.3.3.12 4.2.2. Notifier NOTIFY Behavior...............................18 4.3.4.12 4.2.3. Proxy NOTIFY Behavior..................................20 4.3.5.14 4.2.4. Subscriber NOTIFY Behavior.............................20 4.4.14 4.3. General................................................ 16 4.3.1. Detecting support for SUBSCRIBE and NOTIFY............. 16 4.3.2. CANCEL requests........................................ 16 4.3.3. Forking................................................ 16 4.3.4. Dialog creation and termination........................ 17 4.3.5. State Agents and Notifier Migration.................... 18 4.3.6. Polling Resource State.................................21 4.5.18 4.3.7. Allow-Events header usage..............................2119 4.3.8. PINT Compatibility..................................... 19 5. Event Packages.........................................2119 5.1. Appropriateness of Usage...............................2219 5.2.Sub-packages........................................... 22Event Template-packages................................ 20 5.3. Amount of State to be Conveyed.........................2320 5.3.1. Complete State Information.............................2321 5.3.2. State Deltas...........................................2321 5.4. Event Package Responsibilities.........................2422 5.4.1. Event Package Name.....................................2422 5.4.2. Event Package Parameters...............................2422 5.4.3. SUBSCRIBE Bodies.......................................2422 5.4.4. Subscription Duration..................................2522 5.4.5. NOTIFY Bodies..........................................2523 5.4.6. Notifier processing of SUBSCRIBE requests..............2523 5.4.7. Notifier generation of NOTIFY requests.................2523 5.4.8. Subscriber processing of NOTIFY requests...............2523 5.4.9. Handling of forked requests............................2623 5.4.10. Rate of notifications..................................2624 5.4.11. State Agents...........................................26 Roach [Page 2] Internet Draft SIP-Specific Event Notification November 200124 5.4.12. Examples...............................................2625 5.4.13. URI List handling...................................... 25 6. Security Considerations................................2725 6.1. Access Control.........................................2725 6.2. Release of Sensitive Policy Information................2725 6.3. Denial-of-Service attacks.............................. 26 6.4. Replay Attacks......................................... 26 6.5. Man-in-the middle attacks.............................. 26 6.6. Confidentiality........................................ 27 7. IANA Considerations.................................... 27 Roach [Page 2] Internet Draft SIP-Specific Event Notification February 2002 7.1. Registration Information............................... 28 7.2. Registration Template.................................. 288. Open Issues............................................ 29 8.1. CANCEL Handling........................................7.3. Syntax................................................. 298.2. Version of SIP to reference............................7.4. New Methods............................................ 298.3. Immediate NOTIFYs...................................... 30 9. Changes................................................ 30 9.1. Changes from draft-ietf-...-00......................... 30 9.2. Changes from draft-roach-...-03........................7.4.1. SUBSCRIBE method....................................... 319.3. Changes from draft-roach-...-02........................7.4.2. NOTIFY method.......................................... 31 7.5. New Headers............................................ 31 7.5.1. "Event" header......................................... 31 7.5.2. "Allow-Events" Header.................................. 32 7.5.3. "Subscription-State" Header............................ 32 7.6. New Response Codes..................................... 339.4. Changes from draft-roach-...-01........................ 35 10. References.............................................7.6.1. "202 Accepted" Response Code........................... 33 7.6.2. "489 Bad Event" Response Code.......................... 33 8. Changes................................................ 33 8.1. Changes from draft-ietf-...-01......................... 33 8.2. Changes from draft-ietf-...-00......................... 3511. Acknowledgements.......................................8.3. Changes from draft-roach-...-03........................ 3612.8.4. Changes from draft-roach-...-02........................ 38 8.5. Changes from draft-roach-...-01........................ 39 9. References............................................. 40 10. Acknowledgements....................................... 41 11. Author's Address.......................................3641 2. Introduction The ability to request asynchronous notification of events proves useful in many types of services for which cooperation between end-nodes is required. Examples of such services include automatic callback services (based on terminal state events), buddy lists (based on user presence events), message waiting indications (based on mailbox state change events), and PINT status (based on call state events). The methods described in this document allow a framework by which notification of these events can be ordered. The event notification mechanisms defined herein are NOT intended to be a general-purpose infrastructure for all classes of event subscription and notification. Meeting requirements for the general problem set of subscription and notification is far too complex for a single protocol. Our goal is to provide a SIP-specific framework for event notification which is not so complex as to be unusable for simple features, but which is still flexible enough to provide powerful services. Note, however, that event packages based on this framework may define arbitrarily complex rules which govern the subscription and notification for the events or classes of events they describe. This draft does not describe an extension which may be used Roach [Page 3] Internet Draft SIP-Specific Event Notification February 2002 directly; it must be extended by other drafts (herein referred to as "event packages.") In object-oriented design terminology, it may be thought of as an abstract base class which must be derivedRoach [Page 3] Internet Draft SIP-Specific Event Notification November 2001into an instantiatable class by further extensions. Guidelines for creating these extensions are described in section 5. 2.1. Overview of Operation The general concept is that entities in the network can subscribe to resource or call state for various resources or calls in the network, and those entities (or entities acting on their behalf) can send notifications when those states change. A typical flow of messages would be: Subscriber Notifier |-----SUBSCRIBE---->| Request state subscription |<-------200--------| Acknowledge subscription |<------NOTIFY----- | Return current state information |--------200------->| |<------NOTIFY----- | Return current state information |--------200------->|The subscriber and notifier entities need not necessarily be UAs, but often will be.Subscriptions are expired and must be refreshedin exactly the same manner as registrations (see RFC 2543 [1] ).by subsequent SUBSCRIBE messages. 3.Syntax This section describes the syntax extensions required forDefinitions Event Package: An eventnotification in SIP. Semantics are described in section 4. 3.1. New Methods This document describes two new SIP methods: "SUBSCRIBE"package is an additional specification which defines a set of state information to be reported by a notifier to a subscriber. Event packages also define further syntax and"NOTIFY." This table expandssemantics based ontables 4 and 5 in RFC 2543 [1] . Roach [Page 4] Internet Draft SIP-Specificthe framework defined by this document required to convey such state information. Event Template-Package: An event template-package is a special kind of event package which defines a set of state which may be applied to all possible event packages, including itself. Notification: NotificationNovember 2001 Header Where SUB NOT ------ ----- --- --- Accept R o o Accept-Encoding R o o Accept-Language R o o Allow 200 - - Allow 405 o o Authorization R o o Call-ID gc m m Contact R m m Contact 1xx o o Contact 2xx m o Contact 3xx m m Contact 485 o o Content-Encoding e o o Content-Length e o o Content-Type e * * CSeq gc m m Date g o o Encryption g o o Expires g o - From gc m m Hide R o o Max-Forwards R o o Organization g o o Priority R o o Proxy-Authenticate 407 o o Proxy-Authorization R o o Proxy-Require R o o Require R o o Retry-After R - - Retry-After 404,480,486 o o Retry-After 503 o o Retry-After 600,603 o o Response-Key R o o Record-Route R o o Record-Route 2xx o o Route R o o Server r o o Subject R o o Timestamp g o o To gc(1) m m Unsupported 420 o o User-Agent g o o Via gc(2) m m Warning r o o WWW-Authenticate 401 o o 3.1.1. SUBSCRIBE method Roach [Page 5] Internet Draft SIP-Specific Event Notification November 2001 "SUBSCRIBE"isadded tothedefinitionact ofthe element "Method" in the SIPa notifier sending a NOTIFY messagegrammar. Like all SIP method names, the SUBSCRIBE method name is case sensitive. The SUBSCRIBE method is usedtorequest asynchronous notificationa subscriber to inform the subscriber ofan event or setthe state ofevents atalater time. 3.1.2. NOTIFY method "NOTIFY"resource. Notifier: A notifier isadded toa user agent which generates NOTIFY requests for thedefinitionpurpose of notifying subscribers of theelement "Method" in the SIP message grammar. The NOTIFY method is usedstate of a resource. Notifiers typically also accept SUBSCRIBE requests tonotifycreate subscriptions. State Agent: A state agent is aSIP node that an eventnotifier whichhas been requested by an earlier SUBSCRIBE method has occurred. It may also provide further details about the event. 3.2. New Headers This table expandspublishes state information ontables 4 and 5 in RFC 2543 [1] , as amended by the changes described in section 3.1. Header field where proxy ACK BYE CAN INV OPT REG SUB NOT ----------------------------------------------------------------- Allow-Events g o o o o o o o o Allow-Events 489 - - - - - - m m Event R - - - - - - m m Subscription-Expires R - - - - - - - o 3.2.1. "Event" header The following header is defined for the purposes of this specification. Event = ( "Event" | "o" ) ":" event-type *(( ";" parameter-name ["=" ( token | quoted-string ) ] ) event-type = event-package *( "." event-subpackage ) event-package = token-nodot event-subpackage = token-nodot token-nodot = 1*( alphanum | "-" | "!" | "%" | "*" | "_" | "+" | "`" | "'" | "~" ) Event is added to the definitionbehalf ofthe element "request-header"a resource; inthe SIP message grammar. This document does not define values for event-types. These values will be defined by individual event packages, and MUST beorder to do so, it Roach [Page6]4] Internet Draft SIP-Specific Event NotificationNovember 2001 registered with the IANA. There must be exactly one event type listed per event header. Multiple events per message are disallowed. For the curious,February 2002 may need gather such state information from multiple sources. State Agents always have complete state information for the"o" short formresource for which it ischosen to represent "occurrence." 3.2.2. "Allow-Events" Header The following headercreating notifications. Subscriber: A subscriber isdefined fora user agent which receives NOTIFY requests from notifiers; these NOTIFY requests contain information about thepurposesstate ofthis specification. Allow-Events = ( "Allow-Events" | "u" ) ":" 1#event-type Allow-Events is added to the definition of the element "general-header"a resource in which theSIP message grammar. For the curious, the "u" short formsubscriber ischoseninterested. Subscribers typically also generate SUBSCRIBE requests and send them torepresent "understands." 3.2.3. "Subscription-Expires" Header The following headernotifiers to create subscriptions. Subscription: A subscription isdefined for the purposesa set ofthis specification. Subscription-Expires = "Subscription-Expires" ":" ( SIP-date | delta-seconds ) *( ";" subexp-params ) subexp-params = "reason" "=" reason-code | generic-param reason-code = "migration" | "maint" | "refused" | "timeout" | reason-extension reason-extension = token Subscription-Expires is addedapplication state associated with a dialog. This application state includes a pointer to thedefinition ofassociated dialog, theelement "request-header"event package name, and possibly an identification token. Event packages will define additional subscription state information. By definition, subscriptions exist in both a subscriber and a notifier. Subscription Migration: Subscription migration is theSIP message grammar. 3.3. New Response Codes Roach [Page 7] Internet Draft SIP-Specific Event Notification November 2001 3.3.1. "202 Accepted" Response Codeact of moving a subscription from one notifier to another notifier. 4. Node Behavior 4.1. Description of SUBSCRIBE Behavior The202 responseSUBSCRIBE method isaddedused tothe "Success"request current state and state updates from a remote node. 4.1.1. Subscription duration SUBSCRIBE requests SHOULD contain an "Expires" headerfield definition: Success = "200" ; OK | "202" ; Accepted "202 Accepted" has(defined in SIP [1] ). This expires value indicates the duration of the subscription. In order to keep subscriptions effective beyond the duration communicated in the "Expires" header, subscribers need to refresh subscriptions on a periodic basis using a new SUBSCRIBE message on the samemeaningdialog asthatdefined inHTTP/1.1 [5]SIP [1] .3.3.2. "489 Bad Event" Response Code The 489 event response is added to the "Client-Error"If no "Expires" headerfield definition: Client-Error = "400" ; Bad Request ... | "489" ; Bad Event "489 Bad Event"isused to indicate thatpresent in a SUBSCRIBE request, theserver did not understandimplied default is defined by the event packagespecified in a "Event" header field. 4. Node Behavior 4.1. General Unless noted otherwise,being used. 200-class responses to SUBSCRIBEand NOTIFYrequestsfollow the same protocol rules governing the usagealso MUST contain an "Expires" header. The period oftags, Route handling, Record-Route handling, Via handling, and Contact handling as INVITE; retransmission, reliability, CSeq handling and provisional responses aretime in thesame as those defined for BYE. Forresponse MAY be shorter or longer than specified in thepurposesrequest. The period ofthis document, a "dialog"time in the response isdefined as all messages sharingthetuple of "To" (including tag), "From" (including tag), and "Call-Id." As in INVITE-initiated dialogs, requests containg no "To" tag are also considered to be partone which defines the duration of thesame dialog as messages which contain a "To" tag but otherwise match. 4.1.1. Route Handling Route and Record-Route handlingsubscription. An "expires" parameter on the "Contact" header has no semantics for SUBSCRIBE andNOTIFY dialogsisgenerally the same as for INVITE and its subsequent responses. The exact method for echoing Record-Route headers in responses and using themexplicitly not equivalent toform Route headers in subsequent requests is describedan "Expires" header inRFC2543 [1] . For the purposes of the followinga SUBSCRIBE request or response. Roach [Page8]5] Internet Draft SIP-Specific Event NotificationNovember 2001 discussion, the "Contact" header is considered partFebruary 2002 A natural consequence ofthe "Record-Route" set. From a subscriber perspective, the "Record-Route" headers received inthis scheme is that a SUBSCRIBEresponse are stored locally and placed in the "Route" headers for SUBSCRIBE refreshes. To support forkingwith an "Expires" ofSUBSCRIBE requests, "Record-Route" headers received in NOTIFY requests MUST be echoed back in the NOTIFY responses; if no route0 constitutes a request to unsubscribe from an event. Notifiers may also wish to cancel subscriptions to events; this is useful, for example, when thedialog has been established, these "Record-Route" headers MUST be stored locally and MUST be placed in the "Route" headers for SUBSCRIBE refreshes. Fromresource to which anotifier perspective, SUBSCRIBE request "Record-Route" headerssubscription refers is no longer available. Further details on this mechanism areechoed backdiscussed inthe SUBSCRIBE responsesection 4.2.2. 4.1.2. Identification of Subscribed Events andstored locally. The locally stored copyEvent Classes Identification ofthe "Record-Route" headersevents isplaced in the "Route" headers when generating NOTIFY requests.provided by three pieces of information: Request URI, Event Type, and (optionally) message body. TheresultRequest URI of a SUBSCRIBE request, most importantly, contains enough information to route theforgoing rules is that proxies wishingrequest toremain onthesignalling path for subsequent requests inappropriate entity. It also contains enough information to identify thedialog MUST include themselves in a "Record-Route"resource forall requests,which event notification is desired, but notjust the initial SUBSCRIBE. 4.1.2. Detecting support for SUBSCRIBE and NOTIFY Neither SUBSCRIBE nor NOTIFY necessitatenecessarily enough information to uniquely identify theusenature of"Require" or "Proxy-Require" headers; similarly, there is no token defined for "Supported" headers. If necessary, clients may probethe event (e.g. "sip:adam@dynamicsoft.com" would be an appropriate URI to subscribe to for my presence state; it would also be an appropriate URI to subscribe to thesupportstate of my voice mailbox). Subscribers MUST include exactly one "Event" header in SUBSCRIBEand NOTIFY using the OPTIONS request defined in RFC2543 [1] .requests, indicating to which event or class of events they are subscribing. Thepresence"Event" header will contain a token which indicates the type of state for which a subscription is being requested. This token will be registered with the IANA and will correspond to an event package which further describes the semantics of the"Allow-Events"event or event class. The "Event" headerinMAY also contain an "id" parameter. This "id" parameter, if present, contains an opaque token which identifies the specific subscription within amessagedialog. An "id" parameter issufficientonly valid within the scope of a single dialog. If the event package toindicate support forwhich the event token corresponds defines behavior associated with the body of its SUBSCRIBEand NOTIFY. The "methods" parameter for Contactrequests, those semantics apply. Event packages may alsobe used to specifically announce support for SUBSCRIBE and NOTIFY messages when registering. (See reference [8]define parameters fordetails onthe"methods" parameter). 4.1.3. CANCEL requests ForEvent header; if they do so, they must define thepurposes of generality, bothsemantics for such parameters. 4.1.3. Additional SUBSCRIBEand NOTIFY MAY be canceled; however, doing so is not recommended. Successfully cancelledHeader Values Because SUBSCRIBEand NOTIFYrequestsMUST be completed withcreate a"487 Request Cancelled" response; the server actsdialog as defined in SIP [1] , they MAY contain an "Accept" header. This header, if present, indicates therequest were never received. In general, since neither SUBSCRIBE nor NOTIFY arebody formats allowedto have protracted transactions, attempts to cancel them are expected to fail. 4.1.4. State Agents and Notifier Migrationin subsequent NOTIFY requests. Roach [Page9]6] Internet Draft SIP-Specific Event NotificationNovember 2001 When state agents (see section 5.4.11. ) are used, it is often useful to allow migration of subscriptions between state agents andFebruary 2002 Event packages MUST define thenodesbehavior forwhich theySUBSCRIBE requests without "Accept" headers; usually, this will connote a single, default body type. Header values not described in this document areproviding state aggregation (or even among various state agents). Such migration mayto beeffected by sending a "NOTIFY" with an "Subscription-Expires" header of "0," andinterpreted as described in SIP [1] . 4.1.4. Subscriber SUBSCRIBE Behavior 4.1.4.1. Requesting areason parameter of "migration." This NOTIFY request is otherwise normal, andSubscription SUBSCRIBE isformeda dialog-creating method, as described insection 4.3.3. Upon receipt of this NOTIFY message, theSIP [1] . When a subscriberSHOULD attemptwishes tore-subscribe (as described insubscribe to a particular state for a resource, it forms a SUBSCRIBE message. If thefollowing sections). The resultinginitial SUBSCRIBEmessage can then be proxied or redirected torepresents a request outside of a dialog (as it typically will), its construction follows thenode to which notification responsibility is passing. 4.2. Descriptionprocedures outlined in SIP [1] for UAC request generation outside of a dialog. This SUBSCRIBEBehavior The SUBSCRIBE method is used torequestcurrent state and state updates fromwill be confirmed with aremote node. 4.2.1. Correlation to dialogs, calls,final response. 200-class responses indicate that the subscription has been accepted, andterminalsthat a NOTIFY will be sent immediately. A 200 response indicates that the subscription has been accepted and that the user isuniquely identified byauthorized to subscribe to thecombination ofrequested resource. A 202 response merely indicates that theTo, From,subscription has been understood, andCall-ID fieldsthat authorization may or may not have been granted. The "Expires" header inthea 200-class response to SUBSCRIBErequest. Refreshes of subscriptions SHOULD reuse the same Call-ID if possible, since subscriptions are uniquely identified at presence servers using the Call-ID. Two subscriptions fromindicates thesame user,actual duration for which thesame user, but with different Call-IDs, are considered different subscriptions. Note this is exactlysubscription will remain active (unless refreshed). Non-200 class final responses indicate that no subscription or dialog has been created, and no subsequent NOTIFY message will be sent. All non-200 class responses (with thesame as usageexception ofCall-ID in registrations. Initial SUBSCRIBE requests MUST contain a "tag" parameter (as defined in RFC 2543 [1] ) in"489," described herein) have the"From" header,same meanings andMUST NOT contain a "tag" parameterhandling as described inthe "To" header. Responses toSIP [1] . A SUBSCRIBErequests MUST contain a "tag"request MAY include an "id" parameter inthe "To" header. The "tag" in the "To"its "Event" headerallows the subscribertodifferentiateallow differentiation betweenNOTIFY requests from different clientsmultiple subscriptions in thecase thatsame dialog. 4.1.4.2. Refreshing of Subscriptions At any time before a subscription expires, the subscriber may refresh the timer on such a subscription by sending another SUBSCRIBE requestwas forked. SUBSCRIBE requests for re-subscription MUST contain "tag" parameters in bothon the"To" and "From" headers (matching those previously established forsame dialog as thedialog). The relationship between subscriptionsexisting subscription, and(INVITE-initiated) sessions sharingwith the samedialog correlation information is undefined. Re-using dialog correlation information"Event" header "id" parameter (if one was present in the initial subscription). The handling forsubscriptions is allowed, but sharing ofsuchinformation does not change the semantics of the INVITE session ora request is theSUBSCRIBE dialog. Similarly,same as for therelationship betweeninitial creation of asubscription in oneRoach [Page10]7] Internet Draft SIP-Specific Event NotificationNovember 2001 direction (e.g. from node A to node B) and aFebruary 2002 subscriptionin the opposite direction (from B to A) withexcept as described below. If thesame dialog correlation information is undefined. While re-using such information is allowed,initial SUBSCRIBE message contained an "id" parameter on thesharing"Event" header, then refreshes ofsuch information does not changethesemantics of either SUBSCRIBE dialog. 4.2.2. Subscription duration SUBSCRIBE requests SHOULDsubscription must also contain an"Expires" header. This expires valueidentical "id" parameter; they will otherwise be considered new subscriptions in an existing dialog. If a SUBSCRIBE request to refresh a subscription receives a "481" response, this indicates that theduration ofsubscription has been terminated and that thesubscription. The formattingsubscriber did not receive notification ofthese is described in RFC 2543.this fact. Inorder to keep subscriptions effective beyondthis case, theduration communicated insubscriber should consider the"Expires" header, subscribers needsubscription invalid. If the subscriber wishes to re-subscribe to the state, he does so by composing an unrelated initial SUBSCRIBE request with a freshly-generated Call-ID and a new, unique "From" tag (see section 4.1.4.1. ) If a SUBSCRIBE request to refreshsubscriptions onaperiodic basis. This refreshingsubscription fails with a non-481 response, the original subscription isperformed instill considered valid for thesame way as REGISTER refreshes:duration of theTo, From,most recently known "Expires" value as negotiated by SUBSCRIBE andCall-ID match thoseits response, or as communicated by NOTIFY in theSUBSCRIBE being refreshed, while the CSeq number is incremented. If no "Expires""Subscription-State" header "expires" parameter. 4.1.4.3. Unsubscribing Unsubscribing ispresenthandled ina SUBSCRIBE request,theimplied default is defined bysame way as refreshing of a subscription, with theevent package being used. 200-class responses"Expires" header set toSUBSCRIBE requests"0." Note that a successful unsubscription will alsoMUST contain an "Expires" header. The periodtrigger a final "NOTIFY". 4.1.4.4. Confirmation oftime in the response MAY be shorter or longer than specified in the request.Subscription Creation Theperiod of time insubscriber can expect to receive a NOTIFY message from each node which has processed a successful subscription or subscription refresh. Until theresponse isfirst NOTIFY message arrives, theone which definessubscriber should consider thedurationstate of thesubscription. Similarsubscribed resource toREGISTER requests, SUBSCRIBE requests mayberenewed at any time to prevent them from expiring at the end of the "Expires" period. These renewals will containin a neutral state. Event packages which define new event packages MUST define this "neutral state" in such a way that makes sense for their application (see section 5.4.7. ). Due to thesame "To," "From,"potential for both out-of-order messages and"Call-ID" asforking, theoriginal request, and an incremented "CSeq" number. Also similarsubscriber MUST be prepared toREGISTER requests, a natural consequence of this scheme is that areceive NOTIFY messages before the SUBSCRIBEwith an "Expires"transaction has completed. Except as noted above, processing of0 constitutes a request to unsubscribe from an event. Notifiers may also wish to cancel subscriptions to events;this NOTIFY isuseful, for example, whentheresource to which a subscription refers is no longer available. Further details on this mechanism are discussedsame as in section4.3.3. 4.2.3. Identification of Subscribed Events and Event Classes Identification of events is provided by three pieces of information: Request URI, Event Type, and (optionally) message body. The Request URI of a4.2.4. 4.1.5. Proxy SUBSCRIBErequest, most importantly, contains enough informationBehavior Proxies need no additional behavior beyond that described in SIP [1] toroute the requestsupport SUBSCRIBE. If a proxy wishes to see all of theappropriate entity. It also contains enough information toRoach [Page11]8] Internet Draft SIP-Specific Event NotificationNovember 2001 identify the resource for which event notification is desired, but not necessarily enough information to uniquely identify the nature of the event (e.g. "sip:adam.roach@ericsson.com" would be an appropriate URI to subscribe toFebruary 2002 SUBSCRIBE and NOTIFY requests formy presence state;a given dialog, itwould also be an appropriate URI to subscribe to the state of my voice mailbox). SubscribersMUSTinclude exactly one "Event" header inrecord-route all SUBSCRIBErequests, indicating to which event or class of events they are subscribing. The "Event" header will containand NOTIFY requests. 4.1.6. Notifier SUBSCRIBE Behavior 4.1.6.1. Initial SUBSCRIBE Transaction Processing In no case should atoken which indicatesSUBSCRIBE transaction extend for any longer than thetype of statetime necessary for automated processing. In particular, notifiers MUST NOT wait forwhichasubscription is being requested.user response before returning a final response to a SUBSCRIBE request. Thistoken will be registeredrequirement is imposed primarily to prevent timer F from firing during the SUBSCRIBE transaction, since interaction with a user would often exceed 64*T1 seconds. The notifier SHOULD check that theIANA and will correspond to anevent packagewhich further describes the semantics ofspecified in theevent or event class. The"Event" header isconsidered mandatory for the purposes of this document. However, to maintain compatibility with PINT (see [3] ), servers MAY interpret a SUBSCRIBE request with no "Event" header as requesting a subscription to PINT events.understood. If not, theservers do not support PINT, theynotifier SHOULD return a "489 Bad Event" response toany SUBSCRIBE messages without an EVENT header. Ifindicate that theevent packagespecified event/event class is not understood. The notifier SHOULD also perform any necessary authentication and authorization per its local policy. See section 4.1.6.3. If the notifier is able towhichimmediately determine that it understands the eventtoken corresponds defines behavior associated withpackage, that thebody of its SUBSCRIBE requests, those semantics apply. 4.2.4. Additional SUBSCRIBE Header Values Each SUBSCRIBE request MUST have exactly one "Contact:" header,authenticated subscriber is authorized tobe used as part of route handling, as describedsubscribe, and that there are no other barriers to creating the subscription, it creates the subscription and a dialog (if necessary), and returns a "200 OK" response (unless doing so would reveal authorization policy insection 4.1.1. SUBSCRIBE requests MAY containan"Accept" header. This header, if present, indicatesundesirable fashion; see section 6.2. ). If thebody formats allowed in subsequent NOTIFY requests. Event packages MUST definenotifier cannot immediately create thebehaviorsubscription (e.g. it needs to wait forSUBSCRIBE requests without "Accept" headers; usually, this will connote a single, default body type. Header valuesuser input for authorization, or is acting for another node which is notdescribed in this document are to be interpreted as described in RFC 2543 [1] . 4.2.5. Subscriber SUBSCRIBE Behavior 4.2.5.1. Requesting a Subscription When a subscribercurrently reachable), or wishes tosubscribe to a particular state for a resource,mask authorization policy, itformswill return aSUBSCRIBE message. The dialog correlation information is formed as if for an original INVITE:"202 Accepted" response. This response indicates that theCall-ID is a new call ID with the syntax Roach [Page 12] Internet Draft SIP-Specific Event Notification November 2001 described in RFC 2543; the To: field indicates the subscribed resource's persistent address (which will generally match the Request URI used to form the message); and the From: field will indicate the subscriber's persistent address (typically sip:user@domain). This SUBSCRIBE request will be confirmed with a final response. 200-class responses indicate thatrequest has been received and understood, but does not necessarily imply that the subscription has beenaccepted, and thatauthorized yet. When aNOTIFY will be sent immediately. A 200 response indicates that thesubscriptionhas been accepted and that the userisauthorized to subscribe tocreated in therequested resource. A 202 response merely indicates thatnotifier, it stores thesubscription has been understood,event package name andthat authorization may or may not have been granted.the "Event" header "id" parameter (if present) as part of the subscription information. The "Expires"headervalues present ina 200-class response toSUBSCRIBEindicates the actual duration for which the subscription will remain active (unless refreshed). Non-200 class final responses indicate that the subscription has not been created, and no subsequent NOTIFY message will be sent. All non-200 class200-class responses(with the exception of "489," described herein) havebehave in the samemeanings and handlingway asdescribedthey do inRFC 2543 [1] . 4.2.5.2. Refreshing of Subscriptions At any time before a subscription expires,REGISTER responses: thesubscriber may refreshserver MAY shorten thetimer on such a subscription by re-sendinginterval, but MUST NOT lengthen it. If the duration specified in a SUBSCRIBErequest. The handling for such a requestmessage is unacceptably short, thesame as for the initial creation ofnotifier SHOULD respond with asubscription except as described below."423 Subscriptionrenewals will contain a "To" field matching the "From" field in the first NOTIFY request for the dialog containing the subscription to be refreshed. They will contain the same "From" and "Call-ID" fields as the original SUBSCRIBE request, and an incremented "CSeq" number from the original SUBSCRIBE request. Route handling is as discussed in section 4.1.1. If a SUBSCRIBE request to refresh a subscription receives a "481" response, this indicates that the subscription has been terminated and that the subscriber did not receive notification of this fact. In this case, the subscriber should consider the subscription invalid. If the subscriber wishes to re-subscribe to the state, he does so by composing an unrelated initial SUBSCRIBE request with a freshly-generated Call-ID and a new, unique "From" tag (see section 4.2.5.1. )Too Brief" message. Roach [Page13]9] Internet Draft SIP-Specific Event NotificationNovember 2001 If a SUBSCRIBE requestFebruary 2002 200-class responses torefresh a subscription fails, the originalSUBSCRIBE requests will not generally contain any useful information beyond subscription duration; their primary purpose isstill considered valid for the duration of the most recently known "Expires" value as negotiated by SUBSCRIBE and its response, orto serve as a reliability mechanism. State information will be communicatedbyvia a subsequent NOTIFY request from the notifier. The other response codes defined in"Subscription-Expires," except as described above. 4.2.5.3. Unsubscribing Unsubscribing is handledSIP [1] may be used inthe same wayresponse to SUBSCRIBE requests, as appropriate. 4.1.6.2. Confirmation of Subscription Creation/Refreshing Upon successfully accepting or refreshing of a subscription,with the "Expires" header set to "0." Note that a successful unsubscription will also triggernotifiers MUST send afinal "NOTIFY". 4.2.5.4. Confirmation of Subscription Creation The subscriber can expectNOTIFY message immediately toreceive acommunicate the current resource state to the subscriber. This NOTIFY messagefrom each node which has registered a successful subscription or subscription refresh. Untilis sent on thefirst NOTIFY message arrives,same dialog as created by thesubscriber should considerSUBSCRIBE response. If the resource has no meaningful stateofat thesubscribed resource to be in a neutral state. Event packages which define new event packages MUST define this "neutral state" in such a waytime thatmakes sense for their application (see section 5.4.7. ). Due to the potential for both out-of-order messages and forking, the subscriber MUST be prepared to receive NOTIFY messages beforethe SUBSCRIBEtransaction has completed. Except as noted above, processing ofmessage is processed, this NOTIFYis the same as inmessage MAY contain an empty or neutral body. See section4.3.5. 4.2.6. Proxy SUBSCRIBE Behavior Proxies need no additional behavior beyond4.2.2. for further details on NOTIFY message generation. Note thatdescribed in RFC 2543 [1] to support SUBSCRIBE. Ifaproxy wishesNOTIFY message is always sent immediately after any 200-class response tosee alla SUBSCRIBE request, regardless of whether the subscription has already been authorized. 4.1.6.3. Authentication/Authorization of SUBSCRIBEand NOTIFYrequestsfor a given dialog, it MUST record-route all SUBSCRIBE and NOTIFY requests. 4.2.7. Notifier SUBSCRIBE Behavior 4.2.7.1. SUBSCRIBE Transaction Processing In no case should a SUBSCRIBE transaction extend for any longer than the time necessary for automated processing. In particular,Privacy concerns may require that notifiersMUST NOT wait for a user response before returning a final responseapply policy to determine whether aSUBSCRIBE request. The notifier SHOULD check that the event package specified in the "Event" headerparticular subscriber isunderstood. If not, the notifier SHOULD return a "489 Bad Event" responseauthorized to subscribe toindicate that the specified event/event class is not understood. Roach [Page 14] Internet Draft SIP-Specific Event Notification November 2001 The notifier SHOULD also perform any necessary authentication and authorization per its local policy. See section 4.2.7.3. If the SUBSCRIBE request containsatag parameter in the "To" field, but the notifier has no recordcertain set ofthe indicated dialog, the notifier has two options. If the notifier is able and willing to reconstruct subscription state, heevents. Such policy mayaccept the subscriptionbe defined by mechanisms such asan initial subscription. If the notifier cannotaccess control lists oris not willing to reconstitute such state, it should respondreal-time interaction with a"481 Subscription doesuser. In general, authorization of subscribers prior to authentication is notexist." Ifparticularly useful. SIP authentication mechanisms are discussed in SIP [1] . Note that, even if the notifieris able to immediately determine thatnode typically acts as a proxy, authentication for SUBSCRIBE requests will always be performed via a "401" response, not a "407;" notifiers always act as a user agents when accepting subscriptions and sending notifications. If authorization fails based on an access list or some other automated mechanism (i.e. itunderstands the event package,can be automatically authoritatively determined that theauthenticatedsubscriber is not authorized tosubscribe, and that there are no other barriers to creatingsubscribe), thesubscription, it createsnotifier SHOULD reply to thesubscription and returnsrequest with a"200 OK""403 Forbidden" or "603 Decline" response, unless doing sowouldmight revealauthorization policy in an undesirable fashion (seeinformation that should stay private; see section 6.2.).If the notifiercannot immediately create the subscription (e.g. it needs to wait for user input for authorization, orowner isacting for another node which is not currently reachable), or wishesinteractively queried tomask authorization policy, it will returndetermine whether a subscription is allowed, a "202Accepted" response. ThisAccept" responseindicatesis returned immediately. Note that a NOTIFY message is still formed Roach [Page 10] Internet Draft SIP-Specific Event Notification February 2002 and sent under these circumstances, as described in therequestprevious section. If subscription authorization was delayed and the notifier wishes to convey that such authorization has beenreceiveddeclined, it may do so by sending a NOTIFY message containing a "Subscription-State" header with a value of "terminated" andunderstood, but does not necessarily implya reason parameter of "rejected." 4.1.6.4. Refreshing of Subscriptions When a notifier receives a subscription refresh, assuming that thesubscription has been created yet. The "Expires" values present in SUBSCRIBE 200-class responses behave insubscriber is still authorized, thesame way as they do in REGISTER responses:notifier updates the expiration time for subscription. As with the initial subscription, the server MAY shortenor lengthentheinterval. 200-class responses to SUBSCRIBE requests will not generally contain any useful information beyond subscription duration; their primary purposeamount of time until expiration, but MUST NOT increase it. The final expiration time isto serve as a reliability mechanism. State information will be communicated via a subsequent NOTIFY request fromplaced in thenotifier. The other response codes defined"Expires" header inRFC 2543 may be usedthe response. If the duration specified inresponse to SUBSCRIBE requests, as appropriate. 4.2.7.2. Confirmation of Subscription Creation/Refreshing Upon successfully accepting or refreshing of a subscription, notifiers MUST sendaNOTIFYSUBSCRIBE messageimmediately to communicate the current resource state to the subscriber. Ifis unacceptably short, theresource hasnotifier SHOULD respond with a "423 Subscription Too Brief" message. If nomeaningful state atrefresh for a notification address is received before its expiration time, thetime thatsubscription is removed. When removing a subscription, theSUBSCRIBEnotifier SHOULD send a NOTIFY message with a "Subscription-State" value of "terminated" to inform it that the subscription isprocessed, this NOTIFYbeing removed. If such a messageMAYis sent, the "Subscription-State" header SHOULD containan empty or neutral body. See section 4.3.3. for further details ona "reason=timeout" parameter. The sending of a NOTIFYmessage generation. Roach [Page 15] Internet Draft SIP-Specific Event Notification November 2001 Note thatwhen a subscription expires allows the corresponding dialog to be terminated, if appropriate. 4.2. Description of NOTIFYmessage is alwaysBehavior NOTIFY messages are sentimmediately after any 200-class responsetoa SUBSCRIBE request, regardlessinform subscribers ofwhetherchanges in state to which thesubscriptionsubscriber hasalready been authorized. 4.2.7.3. Authentication/Authorization ofa subscription. Subscriptions are typically put in place using the SUBSCRIBErequests Privacy concerns may requiremethod; however, it is possible thatnotifiers either use access lists or askother means have been used. If any non-SUBSCRIBE mechanisms are defined to create subscriptions, it is thenotifier owner, on a per-subscription basis, whetherresponsibility of the parties defining those mechanisms to ensure that correlation of aparticular remote nodeNOTIFY message to the corresponding subscription isauthorizedpossible. Designers of such mechanisms are also warned tosubscribemake a distinction between sending a NOTIFY message to acertain set of events. In general, authorizationsubscriber who is aware ofusers priorthe subscription, and sending a NOTIFY message toauthenticationan unsuspecting node. The latter behavior isnot particularly useful. SIP authentication mechanisms are discussed in RFC2543 [1] . Note that, even if the notifier node typically acts as a proxy, authentication for SUBSCRIBE requests will always be performed viainvalid, and MUST receive a"401" response,"481 Subscription does nota "407;" notifiers always act as a user agents when accepting subscriptions and sending notifications. If authorization fails based on an access list orexist" response (unless some otherautomated mechanism (i.e. it can be automatically authoritatively determined that the subscriber is not authorized to subscribe), the notifier SHOULD reply to the request with a "403 Forbidden"400- or"603 Decline" response, unless doing so might reveal information that should stay private; see section 6.2. If the notifier owner is interactively queried to determine whether a subscription is allowed, a "202 Accept" response is returned immediately. Note that a NOTIFY message500-class error code isstill formed and sent under these circumstances,more applicable), as described inthe previous section. Ifsection 4.2.4. In other words, knowledge of a subscriptionauthorization was delayedmust exist in Roach [Page 11] Internet Draft SIP-Specific Event Notification February 2002 both the subscriber and the notifierwishestoconvey that such authorization has been declined, it may do so by sendingbe valid, even if installed via a non-SUBSCRIBE mechanism. A NOTIFYmessage containting a "Subscription-Expires" header withdoes not terminate its corresponding subscription; in other words, avaluesingle SUBSCRIBE request may trigger several NOTIFY requests. 4.2.1. Identification of"0"reported events, event classes, anda reason parameter of "refused." 4.2.7.4. Refreshingcurrent state Identification ofSubscriptions When a notifier receivesevents being reported in asubscription refresh, assuming that the subscribernotification isstill authorized, the notifier updates the expiration timevery similar to that described forsubscription.subscription to events (see section 4.1.2. ). Aswith the initial subscription, the server MAY shorten or increase the amount of time until expiration. The final expiration timein SUBSCRIBE requests, NOTIFY "Event" headers will contain a single event package name for which a notification isplacedbeing generated. The package name in the"Expires""Event" header MUST match the "Event" header in theresponse.corresponding SUBSCRIBE message. Ifno refresh for a notification address is received before its expiration time,an "id" parameter was present in thesubscription is removed. When removing a subscription,SUBSCRIBE message, that "id" parameter MUST also be present in thenotifier MAY send acorresponding NOTIFYmessagemessages. If the event package to which the event package name corresponds defines behavior associated witha "Subscription-Expires" valuethe body of"0"its NOTIFY requests, those semantics apply. This information is expected toinform it thatprovide additional details about thesubscription is being removed. If such a message is sent,nature of theRoach [Page 16] Internet Draft SIP-Specific Event Notification November 2001 "Subscription-Expires" header SHOULD contain a "reason=timeout" parameter. 4.3. Descriptionevent which has occurred and the resultant resource state. When present, the body of the NOTIFYBehavior NOTIFY messages are sent to inform subscribersrequest MUST be formatted into one ofchangesthe body formats specified in the "Accept" header of the corresponding SUBSCRIBE request. This body will contain either the stateto whichof thesubscriber hassubscribed resource or asubscription. Subscriptions are typically putpointer to such state inplace usingthe form of a URI. 4.2.2. Notifier NOTIFY Behavior When a SUBSCRIBEmethod; however, itrequest ispossible that other means have been used. If any non-SUBSCRIBE mechanisms are defined to create subscriptions, it is the responsibility of the parties defining those mechanisms to ensure that correlation ofanswered with aNOTIFY message to200-class response, thecorresponding subscription is possible. Designers of such mechanisms are also warned to make a distinction between sendingnotifier MUST immediately construct and send a NOTIFYmessagerequest to the subscriber. When asubscriber who is aware ofchange in thesubscription,subscribed state occurs, the notifier SHOULD immediately construct andsendingsend a NOTIFYmessagerequest, subject toan unsuspecting node. The latter behavior is invalid,authorization, local policy, andMUST receive a "481 Subscription does not exist"throttling considerations. A NOTIFY request is considered failed if the response(unless some other 400-times out, or500-class errora non-200 class response code ismore applicable), as described in section 4.3.5. In other words, knowlege of a subscription must exist in both the subscriberreceived which has no "Retry-After" header andthe notifier tono implied further action which can bevalid, even if installed via a non-SUBSCRIBE mechanism. A NOTIFY does not cancel its corresponding subscription; in other words, a single SUBSCRIBE request may trigger several NOTIFY requests. 4.3.1. Correlation NOTIFY requests MUST contain the same Call-ID astaken to retry theSUBSCRIBErequestwhich ordered them; the "To" field MUST match the "From" field in(e.g. "401 Authorization Required.") If theSUBSCRIBE that ordered them,NOTIFY request fails (as defined above) due to a timeout condition, and the"From" field MUST match the "To" field thatsubscription wassent ininstalled using a soft-state Roach [Page 12] Internet Draft SIP-Specific Event Notification February 2002 mechanism (such as SUBSCRIBE), the200-class response to the SUBSCRIBE. In other words, NOTIFY requests MUST be innotifier SHOULD remove thesame dialog assubscription. This behavior prevents unnecessary transmission of state information for subscribers who have crashed or disappeared from theSUBSCRIBE that ordered them. The From fieldnetwork. Because such transmissions will be sent 11 times (instead ofa NOTIFY request, likethe"To" fieldtypical single transmission for functioning clients), continuing to service them when no client is available to acknowledge them could place undue strain on a network. Upon client restart or reestablishment of a network connection, it is expected that clients will send SUBSCRIBEresponse, MUST contain a tag; this allows for the subscribermessages todifferentiate between events from different notifiers. Successful SUBSCRIBE requestsrefresh potentially stale state information; such messages willreceive only one 200-class response; however,re-install subscriptions in all relevant nodes. If the NOTIFY request fails (as defined above) due toforking,an error response, and the subscriptionmay have been accepted by multiple nodes. The subscriberwas installed using a soft-state mechanism, the notifier MUSTtherefore be prepared to receive NOTIFY requestsremove the corresponding subscription. A notify error response would generally indicate that something has gone wrong with"From:" tags which differ fromthe"To:" tag received insubscriber or with some proxy on theSUBSCRIBE 200-class response.way to the subscriber. Ifmultiple NOTIFY messages are receivedthe subscriber is inresponseerror, it makes the most sense toa single Roach [Page 17] Internet Draft SIP-Specific Event Notification November 2001 SUBSCRIBE message, they represent different destinationsallow the subscriber towhichrectify the situation (by re-subscribing) once the error condition has been handled. If a proxy is in error, the periodic SUBSCRIBE refreshes will re-install subscription state once the network problem has been resolved. If a NOTIFY requestwas forked. Unlessreceives a 481 response, theevent package specifies otherwise,notifier MUST remove thesubscriber may either accept allcorresponding subscription even if suchnotificationssubscription was installed by non-SUBSCRIBE means (such asrepresenting different dialogs (which are then refreshed separately), or send a 481 response to any NOTIFYs on dialogs that it doesan administrative interface). If the above behavior were notwant to keep alive. As expected, CSeq spaces are uniquerequired, subscribers receiving a notify foreach node;an unknown subscription would need to send an error status code inother words,response to thenotifier usesNOTIFY and also send adifferent CSeq space thanSUBSCRIBE request to remove thesubscriber and any other notifiers. 4.3.2. Identification of reported events, event classes, and current state Identification of events being reportedsubscription. Since this behavior would make subscribers available for use as amplifiers ina notificationdenial of service attacks, we have instead elected to give the 481 response special meaning: it isvery similarused to indicate thatdescribed fora subscriptionto events (seemust be cancelled under all circumstances. NOTIFY requests MUST contain a "Subscription-State" header with a value of "active," "pending," or "terminated." The "active" value indicates that the subscription has been accepted and has been authorized (in most cases; see section4.2.3.6.2. ). TheRequest URI of a NOTIFY request contains enough"pending" value indicates that the subscription has been received, but that policy information is insufficient torouteaccept or deny therequest toRoach [Page 13] Internet Draft SIP-Specific Event Notification February 2002 subscription at this time. The "terminated" value indicates that theparty which is subscribed to receive notifications. Itsubscription isderived fromnot active. If the"Contact"value of the "Subscription-State" headerpresentis "active" or "pending," the notifier SHOULD also include in thecorresponding SUBSCRIBE request. If"Subscription-State" header an "expires" parameter which indicates thesame events for different resources are being subscribed to, implementors are expected totime remaining on the subscription. The notifier MAY usedifferent dialogs in orderthis mechanism to shorten a subscription; however, this mechanism MUST NOT beableused todifferentiate between notifications for them, unless the body for the event contains enoughlengthen a subscription. Including expiration information forthis correlation. Asactive and pending subscriptions is useful in case the SUBSCRIBErequests, NOTIFY "Event" headers will contain a single token which identifiesrequest forks, since theevent or class of events for whichresponse to anotification is being generated. Ifforked SUBSCRIBE may not be received by theevent package to whichsubscriber. Note well that this "expires" value is a parameter on theevent token corresponds defines behavior associated with"Subscription-State" header, NOT an "Expires" header. If thebodyvalue ofits NOTIFY requests, those semantics apply. This informationthe "Subscription-State" header isexpected to provide additional details about"terminated," thenature ofnotifier SHOULD also include a "reason" parameter. The notifier MAY also include a "retry-after" parameter, where appropriate. For details on theevent which has occurredvalue andthe resultant resource state. When present, the bodysemantics of the "reason" and "retry-after" parameters, see section 4.2.4. 4.2.3. Proxy NOTIFYrequest MUST be formatted into one of the body formats specifiedBehavior Proxies need no additional behavior beyond that described inthe "Accept" headerSIP [1] to support NOTIFY. If a proxy wishes to see all of thecorrespondingSUBSCRIBErequest. 4.3.3. Notifierand NOTIFYBehavior Whenrequests for a given dialog, it MUST record-route all SUBSCRIBErequest is successfully processed or a relevant change in the subscribed state occurs, the notifier will immediately constructandsendNOTIFY requests. 4.2.4. Subscriber NOTIFY Behavior Upon receiving a NOTIFYrequest to the subscriber(s), per standard Route/Record-Route handling, as described in section 4.1.1. Roach [Page 18] Internet Draft SIP-Specific Event Notification November 2001 If the notifier is able, through any means, to determine thatrequest, the subscriberis no longer available to receive notifications,should check that itMAY elect to not send a notification. An examplematches at least one of its outstanding subscriptions; if not, it MUST return amethod by which such information may be known"481 Subscription does not exist" response unless another 400- or 500-class response isthe "SIPmore appropriate. The rules forPresence" event set (see [4] ). Amatching NOTIFYrequest is considered failed if the response times out, orrequests with subscriptions that create anon-200 class response codenew dialog isreceiveddescribed in section 4.3.4. Notifications for subscriptions whichhas no "Retry-After" headerwere created inside an existing dialog match if they are in the same dialog andno implied further action which can be taken to retrytherequest (e.g. "401 Authorization Required.") If"Event" headers match (as described in section 7.5.1. ) If, for some reason, the event package designated in the "Event" header of the NOTIFY requestfails (as defined above) due to a timeout condition, andis not supported, thesubscription was installed usingsubscriber will respond with asoft-state mechanism (such as"489 Bad Event" response. To prevent spoofing of events, NOTIFY requests SHOULD be authenticated, using any defined SIPsignalling),authentication mechanism. NOTIFY requests MUST contain "Subscription-State" headers which Roach [Page 14] Internet Draft SIP-Specific Event Notification February 2002 indicate thenotifier SHOULD removestatus of the subscription. If theNOTIFY request fails (as defined above) due to an error response, and"Subscription-State" header value is "active," it means that the subscriptionwas installed using a soft-state mechanism,has been accepted and (in general) has been authorized. If thenotifier MUST removeheader also contains an "expires" parameter, thecorresponding subscription.subscriber SHOULD take it as the authoritative subscription duration and adjust accordingly. The "retry-after" and "reason" parameters have no semantics for "active." Ifa NOTIFY request receives a 481 response,thenotifier MUST remove"Subscription-State" value is "pending," thecorresponding subscription even if suchsubscriptionwas installedhas been received bynon-SUBSCRIBE means (such asthe notifier, but there is insufficient policy information to grant or deny the subscription yet. If the header also contains anadministrative interface). NOTIFY requests"expires" parameter, the subscriber SHOULDcontain an "Subscription-Expires" header which indicatestake it as theremainingauthoritative subscription duration and adjust accordingly. No further action is necessary on the part of the subscriber. The "retry-after" and "reason" parameters have no semantics for "pending." If the "Subscription-State" value is "terminated," the subscriber should consider the subscription(suchterminated. The "expires" parameter has no semantics for "terminated." If aheaderreason code isuseful in casepresent, theSUBSCRIBE request forks, sinceclient should behave as described below. If no reason code or an unknown reason code is present, theresponseclient MAY attempt to re-subscribe at any time (unless aforked subscribe --"retry-after" parameter is present, in whichcontainscase the"Expire" header that specifiesclient SHOULD NOT attempt re-subscription until after theagreed-upon expiration time -- may not be receivednumber of seconds specified by thesubscriber)."retry-after" parameter). Thenotifier SHOULD use this header to adjust the time remaining on the subscription; however, this mechanism MUST not be used to lengthen a subscription, only to shorten it.defined reason codes are: deactivated: Thenotifier may inform a subscriber that asubscription has beenremoved by sending a NOTIFY messageterminated, but the client SHOULD retry immediately withan "Subscription-Expires" value of "0." If the durationa new subscription. One primary use of such a status code is to allow migration of subscriptions between nodes. The "retry-after" parameter has no semantics for "deactivated." probation: The subscription has beenshortened or terminated by the "Subscription-Expires" header as compared toterminated, but themost recent 200-class SUBSCRIBE response sent, that headerclient SHOULDincluderetry at some later time. If a"reason""retry-after" parameterindicatingis also present, thereason that such action was taken. Currently, four such values are defined: "migration" indicates thatclient SHOULD wait at least thenode acting as notifier is transferring responsibility for maintaing such state information to another node; this only makes sense when subscriptions are terminated, not when they are shortened. "Maint" indicatesnumber of seconds specified by thattheparameter before attempting to re-subscribe. rejected: The subscriptionis being truncated orhas been terminated due toserver maintainance, and "refused" indicates that thechange in authorization policy. Clients SHOULD NOT attempt to re-subscribe. The "retry-after" parameter has no semantics for "rejected." timeout: The subscription has been terminated because it was not refreshed before it expired. Clients MAY re-subscribe immediately. The "retry-after" parameter has no semantics for "timeout." Roach [Page19]15] Internet Draft SIP-Specific Event NotificationNovember 2001February 2002 giveup: The subscription has beenremoved or shortened administratively (e.g. by a change in ACL policy). Finally, ifterminated because the notifierelects to send a NOTIFY upon timeout of the subscription, they SHOULD include a "Subscription-Expires" header withcould not obtain authorization in avalue of "0" andtimely fashion. If areason"retry-after" parameter is also present, the client SHOULD wait at least the number of"timeout." 4.3.4. Proxy NOTIFY Behavior Proxies need no additional behavior beyondseconds specified by thatdescribed in RFC 2543 [1]parameter before attempting tosupport NOTIFY. If a proxy wishesre-subscribe; otherwise, the client MAY retry immediately, but will likely get put back into pending state. Once the notification is deemed acceptable tosee all oftheSUBSCRIBE and NOTIFY requests forsubscriber, the subscriber SHOULD return agiven dialog,200 response. In general, itMUST record-route allis not expected that NOTIFY responses will contain bodies; however, they MAY, if the NOTIFY request contained an "Accept" header. Other responses defined in SIP [1] may also be returned, as appropriate. 4.3. General 4.3.1. Detecting support for SUBSCRIBE and NOTIFYrequests. 4.3.5. Subscriber NOTIFY Behavior Upon receiving aNeither SUBSCRIBE nor NOTIFYrequest,necessitate thesubscriber should check that it matches at least oneuse ofits outstanding subscriptions; if not, it MUST return a "481 Subscription does not exist" response unless another 400-"Require" or500-class response"Proxy-Require" headers; similarly, there ismore appropriate. If,no token defined for "Supported" headers. If necessary, clients may probe forsome reason, the event package designated in the "Event" header of the NOTIFY request is not supported,thesubscriber will respond with a "489 Bad Event" response. To prevent spoofingsupport ofevents,SUBSCRIBE and NOTIFYrequests MAY be authenticated,usinganythe OPTIONS request defined in SIPauthentication mechanism. NOTIFY requests SHOULD contain "Subscription-Expires" headers which indicate the time remaining on the subscription. If this header is present, the subscriber SHOULD take it as the authoritative duration and adjust accordingly. If an expires value[1] . The presence of"0" is present, the subscriber should considerthesubscription terminated. When the subscription is terminated or shortened using the "Subscription-Expires" mechanism, there SHOULD be"Allow-Events" header in areason parameter present. If itmessage ispresentsufficient to indicate support for SUBSCRIBE andthe subscriber is still interested in receiving updatesNOTIFY. The "methods" parameter for Contact may also be used to specifically announce support for SUBSCRIBE and NOTIFY messages when registering. (See reference [7] for details on thestate information, the subscriber SHOULD attempt re-subscribe upon expiration if it is set to "migration," "timeout," is not present,"methods" parameter). 4.3.2. CANCEL requests No semantics are associated with cancelling SUBSCRIBE oris set to an unknown value. Such a resubscriptionNOTIFY. 4.3.3. Forking Successful SUBSCRIBE requests willbe completely independant ofreceive only one 200-class response; however, due to forking, theoriginal subscription, and will not share a dialog with it; it willsubscription may have been accepted by multiple nodes. The subscriber MUST therefore begenerated as describedprepared to receive NOTIFY requests with "From:" tags which differ from the "To:" tag received insection 4.2.5.1. Ifthe"reason" parameter onSUBSCRIBE 200-class response. If multiple NOTIFY messages are received in response to a"Subscription-Expires" header is setsingle SUBSCRIBE message, they represent different destinations toeither "maint" or "refused,"which the SUBSCRIBE request was forked. For information on subscriberSHOULD NOT attempt re-subscription. Once the notification is deemed acceptable to the subscriber, theRoach [Page20]16] Internet Draft SIP-Specific Event NotificationNovember 2001 subscriber SHOULD return a 200 response. In general, itFebruary 2002 handling in such situations, see section 5.4.9. 4.3.4. Dialog creation and termination If an initial SUBSCRIBE request is notexpected that NOTIFY responsessent on an pre-existing dialog, the subscriber willcontain bodies; however, they MAY, ifwait for a response to theNOTIFYSUBSCRIBE requestcontained an "Accept" header. Other responses defined in RFC 2543 [1] may also be returned, as appropriate. 4.4. Polling Resource State A natural consequence ofor a matching NOTIFY. Responses are matched to such SUBSCRIBE requests if they contain thebehavior described insame thepreceding sections is that an immediate fetch without a persistent subscription may be effected by sending an appropriate SUBSCRIBE with an "Expires"same "Call-ID," the same "From" header field, the same "To" header field, excluding the "tag," and the same "CSeq." Rules for the comparison of0. Of course, an immediate fetch whilethese headers are described in SIP [1] . If a 200-class response matches such a SUBSCRIBE request, it creates a new subscriptionis active may be effectedand a new dialog (unless they have already been created bysending an appropriatea matching NOTIFY request; see below). NOTIFY requests are matched to such SUBSCRIBEwith an "Expires" greater than 0. Upon receiptrequests if they contain the same "Call-ID," a "From" header field which matches the "To" header field ofthis SUBSCRIBE request,thenotifier (or notifiers, ifSUBSCRIBE, excluding theSUBSCRIBE request was forked) will send"tag," aNOTIFY request containing resource state to"To" header field which matches theaddress in"From" header field of theSUBSCRIBE "Contact" field. Note that normal RouteSUBSCRIBE, andRecord-Route handle still applies; see section 4.1.1. 4.5. Allow-Eventsthe same "Event" headerusage The "Allow-Events" header, if present, includes a listfield. Rules for comparisons oftokens which indicatestheevent packages supported by the client (if sent"Event" headers are described in section 7.5.1. If arequest)matching NOTIFY request contains a "Subscription-State" of "active" orserver (if sent in"pending," it creates aresponse). In other words,new subscription and anode sendingnew dialog (unless the have already been created by a matching response, as described above). If an"Allow-Events" headerinitial SUBSCRIBE isadvertisingsent on a pre-existing dialog, a matching 200-class response or successful NOTIFY request merely creates a new subscription associated with thatitdialog. Multiple subscriptions canprocess SUBSCRIBE requests and generate NOTIFY requests for all of the event packages listed in that header. Any node implementing one or more event packages SHOULD include an appropriate "Allow-Events" header indicating all supported eventsbe associated with a single dialog. Subscriptions may also exist inINVITE requests and responses, OPTIONS responses,dialogs associated with INVITE-created application state andREGISTER requests. "Allow-Events" headers MAY be includedother application state created by mechanisms defined inanyothertypespecifications. These sets ofrequest or response. This information is very useful,application state do not interact beyond the behavior described forexample,a dialog (e.g. route set handling). A subscription is destroyed when a notifier sends a NOTIFY request with a "Subscription-State" of "terminated". A subscriber may send a SUBSCRIBE request with an "Expiration" header of 0 inallowing user agents to render particular interface elements appropriately according to whether the events requiredorder toimplementtrigger thefeatures they represent are supported bysending of such a NOTIFY request; however, for theappropriate nodes. Note that "Allow-Events" headers MUST NOT be inserted by proxies. 5. Event Packages This section covers several issues which should be taken into consideration when event packages based on SUBSCRIBEpurposes of subscription and dialog lifetime, the subscription is not considered terminated until the NOTIFY with a "Subscription-State" of "terminated" is sent. If a subscription's destruction leaves no other application state associated with the dialog, the dialog terminates. The Roach [Page21]17] Internet Draft SIP-Specific Event NotificationNovember 2001 are proposed. 5.1. AppropriatenessFebruary 2002 destruction ofUsage When designingother application state (such as that created by anevent package usingINVITE) will not terminate themethods described in this draft for event notification, it is important to consider:dialog if a subscription isSIP an appropriate mechanism forstill associated with that dialog. Note that theproblem set? Is SIP being selected becauseabove behavior means that a dialog created with an INVITE does not necessarily terminate upon receipt ofsome unique feature provided by the protocol (e.g. user mobility), or merely because "it can be done?" If you find yourself defining event packages for notifications related to, for example, network management or the temperature inside your car's engine, you may wanta BYE. 4.3.5. State Agents and Notifier Migration When state agents (see section 5.4.11. ) are used, it is often useful toreconsider your selectionallow migration ofprotocols. Those interested in extendingsubscriptions between state agents and themechanism defined in this document are urged to read "Guidelinesnodes forAuthorswhich they are providing state aggregation (or even among various state agents). Such migration may be effected by sending a "NOTIFY" with an "Subscription-State" header ofSIP Extensions" [2] for further guidance regarding appropriate uses"terminated," and a reason parameter ofSIP. Further, it"deactivated." This NOTIFY request isexpectedotherwise normal, and is formed as described in section 4.2.2. Upon receipt of this NOTIFY message, the subscriber SHOULD attempt to re-subscribe (as described in the preceding sections). Note that thismechanismsubscription is established on a new dialog, and does not re-use the route set from the previous subscription dialog. The actual migration is effected by making a change tobe used in applications wherethefrequencypolicy (such as routing decisions) ofreportable events is excessively rapid (e.g.one or morethan about once per second). A SIP network is generally goingservers to which the SUBSCRIBE request will beprovisioned forsent in such areasonable signalling volume; sendingway that anotification every time a user's GPS position changes by one hundreth of a second could easily overload such a network. 5.2. Sub-packages Normal event packages define a set of state applieddifferent node ends up responding toa specific type of resource, suchthe SUBSCRIBE request. This may be as simple asuser presence, call state, and messaging mailbox state. Sub-packages areaspecial type of packagechange in the local policy in the notifier from whichdefinethe subscription is migrating so that it serves as asetproxy or redirect server instead ofstate applieda notifier. Whether, when, and why toother packages,perform notifier migrations may be described in individual event packages; otherwise, suchas statistics, accessdecisions are a matter of local notifier policy, andsubscriber lists. Sub-packages may even be appliedare left up toother sub-packages. To extend the object-oriented analogy made earlier, sub-packages can be thoughtindividual implementations. 4.3.6. Polling Resource State A natural consequence ofas templatized C++ packages which must be applied to other packages tothe behavior described in the preceding sections is that an immediate fetch without a persistent subscription may beuseful. The name ofeffected by sending asub-package as applied toSUBSCRIBE with an "Expires" of 0. Of course, an immediate fetch while apackagesubscription isformedactive may be effected byappendingsending aperiod followed by the sub-package nameSUBSCRIBE with an "Expires" equal to theendnumber of seconds remaining in thepackage. For example, if a subpackage called "watcherinfo" were being applied to a package called "presence,"subscription. Upon receipt of this SUBSCRIBE request, theevent token used in "Event" and "Allow-Events" would be "presence.watcherinfo". Sub-packages must be defined so that they can be applied to anynotifier (or Roach [Page22]18] Internet Draft SIP-Specific Event NotificationNovember 2001 arbitrary package. In other words, sub-packages cannot be specifically tied to one orFebruary 2002 notifiers, if the SUBSCRIBE request was forked) will send afew "parent" packagesNOTIFY request containing resource state insuch a waythe same dialog. Note thatthey will not work with other packages. 5.3. Amount of State to be Conveyed When designing event packages, it is important to considerthetypeNOTIFY messages triggered by SUBSCRIBE messages with "Expire" headers ofinformation which0 willbe conveyed duringcontain anotification. A natural temptation is to convey merely the event (e.g. "a new voice message just arrived") without accompanying state (e.g. "7 total voice messages"). This complicates implementation"Subscription-State" value ofsubscribing entities (since they have to maintain complete state for the entity to which they have subscribed),"terminated," andalso is particularly susceptible to synchronization problems. There are two possible solutions to this problem that event packages may choose to implement. 5.3.1. Complete State Information For packagesa "reason" parameter of "timeout." 4.3.7. Allow-Events header usage The "Allow-Events" header, if present, includes a list of tokens whichtypically convey state information that is reasonably small (onindicates theorder of 1 kb or so), it is suggested thatevent packagesare designed so as to send complete state information when an event occurs. Insupported by thecircumstancesclient (if sent in a request) or server (if sent in a response). In other words, a node sending an "Allow-Events" header is advertising thatstate may not be sufficientit can process SUBSCRIBE requests and generate NOTIFY requests fora particular classall ofevents,the event packagesshould include complete state information along with the event that occurred. For example, "no customer service representatives available" may not be as useful "no customer service representatives available; representative sip:46@cs.xyz.int just logged off". 5.3.2. State Deltas In the caselisted in thatthe state information to be conveyed is large, theheader. Any node implementing one or more eventpackage may choose to detail a scheme bypackages SHOULD include an appropriate "Allow-Events" header indicating all supported events in all methods whichNOTIFY messages contain state deltas instead of complete state. Such a scheme would workinitiate dialogs and their responses (such asfollows: any NOTIFY sentINVITE) and OPTIONS responses. This information is very useful, for example, inimmediate responseallowing user agents toa SUBSCRIBE contains full state information. NOTIFY messages sent because of a state change will contain only the state information that has changed;render particular interface elements appropriately according to whether thesubscriber will then merge this information into its current knowledge aboutevents required to implement thestate offeatures they represent are supported by theresource. Any event packageappropriate nodes. Note thatsupports delta changes to states"Allow-Events" headers MUSTuse a payload which contains a version number that increasesNOT be inserted byexactly oneproxies. 4.3.8. PINT Compatibility The "Event" header is considered mandatory foreach NOTIFY message. Note that the state version number appears inthebodypurposes ofthe message, not inthis document. However, to maintain compatibility with PINT (see [3] ), servers MAY interpret aSIP header. Roach [Page 23] Internet Draft SIP-Specific Event Notification November 2001SUBSCRIBE request with no "Event" header as requesting a subscription to PINT events. If aNOTIFY arrives that has a version number that is incremented by more than one, the subscriber knows that a state delta has been missed; it ignores the NOTIFY message containing the state delta (except for the version number, whichserver does not support PINT, itretainsSHOULD return "489 Bad Event" todetect message loss), and re-sends aany SUBSCRIBEto force a NOTIFY containing a complete state snapshot. 5.4. Event Package Responsibilitiesmessages without an "Event" header. 5. Event Packages This section covers several issues which should be taken into consideration when event packages based on SUBSCRIBE and NOTIFY arenot required to re-iterate anyproposed. 5.1. Appropriateness of Usage When designing an event package using thebehaviormethods described in thisdocument, although they may choosedraft for event notification, it is important todo soconsider: is SIP an appropriate mechanism forclaritythe problem set? Is SIP being selected because of some unique feature provided by the protocol (e.g. user mobility), oremphasis. In general, though, suchmerely because "it can be done?" If you Roach [Page 19] Internet Draft SIP-Specific Event Notification February 2002 find yourself defining event packagesare expected to describe only the behavior that extendsfor notifications related to, for example, network management ormodifiesthebehavior describedtemperature inside your car's engine, you may want to reconsider your selection of protocols. Those interested inthis document. Note that any behavior designated with "SHOULD" or "MUST"extending the mechanism defined in this document are urged to read "Guidelines for Authors of SIP Extensions" [2] for further guidance regarding appropriate uses of SIP. Further, it is expected that this mechanism is notallowedto bechanged by extension documents; however, such documents may elect to strengthen "SHOULD" requirements to "MUST" strength if required by their application. In addition toused in applications where thenormal sections expected by "Instructions to RFC Authors" [6] and "Guidelines for Authorsfrequency of reportable events is excessively rapid (e.g. more than about once per second). A SIPExtensions" [2] , authorsnetwork is generally going to be provisioned for a reasonable signalling volume; sending a notification every time a user's GPS position changes by one hundreth of a second could easily overload such a network. 5.2. Event Template-packages Normal event packagesMUST address eachdefine a set ofthe issues detailed in the following subsections, whenever applicable. 5.4.1.state applied to a specific type of resource, such as user presence, call state, and messaging mailbox state. EventPackage Name This mandatory sectiontemplate-packages are a special type ofan eventpackagedefines the token namewhich define a set of state applied to other packages, such as statistics, access policy, and subscriber lists. Event template-packages may even beusedapplied todesignate theother eventpackage. It MUST include the information which appears intemplate-packages. To extend theIANA registrationobject-oriented analogy made earlier, event template-packages can be thought ofthe token. For information on registering such types, see section 7. 5.4.2. Event Package Parameters If parameters are toas templatized C++ packages which must beused on the "Event" headerapplied tomodify the behaviorother packages to be useful. The name of an event template-package as applied to a package is formed by appending a period followed by the eventpackage,template-package name to thesyntax and semanticsend ofsuch headers must be clearly defined. 5.4.3. SUBSCRIBE Bodies It is expected that most, but not all, event packages will define syntax and semantics for SUBSCRIBE method bodies; these bodies will typically modify, expand, filter, throttle, and/or set thresholds fortheclass of eventspackage. For example, if a template-package called "winfo" were beingrequested. Designers ofapplied to a package called "presence," the eventpackages are strongly encouragedtoken used in "Event" and "Allow-Events" would be "presence.winfo". Event template-packages must be defined so that they can be applied tore-use existing MIME types for message bodies where practical. This mandatory section of anany arbitrary package. In other words, eventpackage defines what typetemplate-packages cannot be specifically tied to one ortypesa few "parent" packages in such a way that they will not work with other packages. 5.3. Amount of State to be Conveyed When designing eventbodies are expected in SUBSCRIBE requests (orpackages, it is important to consider the Roach [Page24]20] Internet Draft SIP-Specific Event NotificationNovember 2001 specify that no event bodies are expected). It should point to detailed definitionsFebruary 2002 type ofsyntax and semantics for all referenced body types. 5.4.4. Subscription Duration Itinformation which will be conveyed during a notification. A natural temptation isrecommended thatto convey merely the eventpackages give a suggested range(e.g. "a new voice message just arrived") without accompanying state (e.g. "7 total voice messages"). This complicates implementation oftimes considered reasonablesubscribing entities (since they have to maintain complete state for theduration of a subscription. Such packages MUST also define a default "Expires" valueentity tobe used if nonewhich they have subscribed), and also isspecified. 5.4.5. NOTIFY Bodies The NOTIFY body is usedparticularly susceptible toreportsynchronization problems. There are two possible solutions to this problem that event packages may choose to implement. 5.3.1. Complete State Information For packages which typically convey stateoninformation that is reasonably small (on theresource being monitored. Each package must define a what type or typesorder of 1 kb or so), it is suggested that eventbodies are expected in NOTIFY requests. Suchpackagesmust specify or cite detailed specificationsare designed so as to send complete state information when an event occurs. In the circumstances that state may not be sufficient for a particular class of events, thesyntax and semantics associated with sucheventbody. Eventpackagesalso need to define which MIME type is to be assumed if none are specified inshould include complete state information along with the"Accept" header ofevent that occurred. For example, "no customer service representatives available" may not be as useful "no customer service representatives available; representative sip:46@cs.xyz.int just logged off". 5.3.2. State Deltas In theSUBSCRIBE request. 5.4.6. Notifier processing of SUBSCRIBE requests This section describescase that theprocessingstate information to beperformed byconveyed is large, thenotifier upon receipt ofevent package may choose to detail aSUBSCRIBE request.scheme by which NOTIFY messages contain state deltas instead of complete state. Such asection is required. Informationscheme would work as follows: any NOTIFY sent inthis section includes details of howimmediate response toauthenticate subscribers and authorization issues for the package. Such authorization issues may include, for example, whether alla SUBSCRIBErequests for this package are answered with 202 responses (see section 6.2. ). 5.4.7. Notifier generation ofcontains full state information. NOTIFYrequests This sectionmessages sent because ofan event package describesa state change will contain only theprocess by whichstate information that has changed; thenotifier generates and sends a NOTIFY request. This includes detailedsubscriber will then merge this information into its current knowledge aboutwhat events causethe state of the resource. Any event package that supports delta changes to states MUST use a payload which contains a version number that increases by exactly one for each NOTIFYto be sent, how to computemessage. Note that the stateinformationversion number appears in theNOTIFY, how to generate "neutral" or "fake"body of the message, not in a SIP header. If a NOTIFY arrives that has a version number that is incremented by more than one, the subscriber knows that a stateinformation to hide authorization delays and decisions from users, and whetherdelta has been missed; it ignores the NOTIFY message containing the stateinformation is complete or deltasdelta (except fornotifications (see section 5.3. ) It may optionally describethebehavior usedversion number, which it retains toprocesses the subsequent response. Suchdetect message loss), and re-sends a SUBSCRIBE to force asection is required. 5.4.8. Subscriber processing ofNOTIFYrequestscontaining a complete state snapshot. Roach [Page25]21] Internet Draft SIP-Specific Event NotificationNovember 2001 This section of an event package describes the process followed by the subscriber upon receipt of a NOTIFY request, including any logicFebruary 2002 5.4. Event Package Responsibilities Event packages are not required toform a coherent resource state (if applicable). 5.4.9. Handlingre-iterate any offorked requests Each event package should specify whether forked SUBSCRIBE requests are allowed to install multiple subscriptions. If such behavior is not allowed, any NOTIFY messages not matchingthe200-class responsebehavior described in this document, although they may choose tothe initial SUBSCRIBE messagedo so for clarity or emphasis. In general, though, such packages arerespondedexpected towith a 481. Indescribe only thecasebehavior thatmultiple subscriptions are allowed, the event package must specify whether merging ofextends or modifies thenotifications to form a single state is required, and how such merging is to be performed.behavior described in this document. Note thatitany behavior designated with "SHOULD" or "MUST" in this document ispossible that some event packages maynot allowed to bedefined inchanged by extension documents; however, sucha way that each dialog is tieddocuments may elect toa mutually exclusive state which is unaffectedstrengthen "SHOULD" requirements to "MUST" strength if required by their application. In addition to theother dialogs; this must be clearly stated if it isnormal sections expected by "Instructions to RFC Authors" [5] and "Guidelines for Authors of SIP Extensions" [2] , authors of event packages MUST address each of thecase. 5.4.10. Rateissues detailed in the following subsections, whenever applicable. 5.4.1. Event Package Name This mandatory section ofnotifications Eachan event packageis expected to define a requirement (RECOMMENDED, SHOULD or MUST strength) whichdefinesan absolute maximum ontherate at which notifications are allowedtoken name to begenerated by a single notifier. Such packages may further define a throttle mechanism which allows subscribersused tofurther limitdesignate therate of notification. 5.4.11. State Agents Designers ofeventpackages should consider whether their package can benefit from network aggregation points ("State Agents") and/or nodes which act on behalf of other nodes. (For example, nodes which provide state information about a resource when such a resource is unable or unwilling to provide such statepackage. It MUST include the informationitself). An example of such an application is a nodewhichtracksappears in thepresence and availabilityIANA registration ofa user inthenetwork.token. For information on registering such types, see section 7. 5.4.2. Event Package Parameters Ifstate agentsparameters are to be usedbyon the "Event" header to modify the behavior of the event package, thepackage must specify how such state agents aggregate informationsyntax andhow they provide authenticationsemantics of such headers MUST be clearly defined. 5.4.3. SUBSCRIBE Bodies It is expected that most, but not all, event packages will define syntax andauthorization. 5.4.12. Examples Eventsemantics for SUBSCRIBE method bodies; these bodies will typically modify, expand, filter, throttle, and/or set thresholds for the class of events being requested. Designers of event packagesshould include several demonstrativeare strongly encouraged to re-use existing MIME types for messageflow diagrams paired with several typical, syntactically correctbodies where practical. This mandatory section of an event package defines what type or types of event bodies are expected in SUBSCRIBE requests (or specify that no event bodies are expected). It should point to detailed definitions of syntax and semantics for all referenced body types. 5.4.4. Subscription Duration It is RECOMMENDED that event packages give a suggested range of Roach [Page26]22] Internet Draft SIP-Specific Event NotificationNovember 2001February 2002 times considered reasonable for the duration of a subscription. Such packages MUST also define a default "Expires" value to be used if none is specified. 5.4.5. NOTIFY Bodies The NOTIFY body is used to report state on the resource being monitored. Each package MUST define a what type or types of event bodies are expected in NOTIFY requests. Such packages MUST specify or cite detailed specifications for the syntax and semantics associated with such event body. Event packages also MUST define which MIME type is to be assumed if none are specified in the "Accept" header of the SUBSCRIBE request. 5.4.6. Notifier processing of SUBSCRIBE requests This section describes the processing to be performed by the notifier upon receipt of a SUBSCRIBE request. Such a section is required. Information in this section includes details of how to authenticate subscribers and authorization issues for the package. Such authorization issues may include, for example, whether all SUBSCRIBE requests for this package are answered with 202 responses (see section 6.2. ). 5.4.7. Notifier generation of NOTIFY requests This section of an event package describes the process by which the notifier generates and sends a NOTIFY request. This includes detailed information about what events cause a NOTIFY to be sent, how to compute the state information in the NOTIFY, how to generate "neutral" or "fake" state information to hide authorization delays and decisions from users, and whether state information is completemessages.or deltas for notifications (see section 5.3. ) It may optionally describe the behavior used to processes the subsequent response. Such a section is required. 5.4.8. Subscriber processing of NOTIFY requests This section of an event package describes the process followed by the subscriber upon receipt of a NOTIFY request, including any logic required to form a coherent resource state (if applicable). 5.4.9. Handling of forked requests Roach [Page 23] Internet Draft SIP-Specific Event Notification February 2002 Each event package SHOULD specify whether forked SUBSCRIBE requests are allowed to install multiple subscriptions. If such behavior is not allowed, the first potential dialog-establishing message will create a dialog. All subsequent NOTIFY messages which correspond to the SUBSCRIBE message (i.e. match To, From, From tag, Call-ID, CSeq, Event, and Event id) but which do not match the dialog would be rejected with a 481 response. If installing of multiple subscriptions by way of a single forked INVITE is allowed, the subscriber establishes a new dialog towards each notifier by returning a 200-class response to each NOTIFY. Each dialog is then handled as its own entity, and is refreshed independent of the other dialogs. In the case that multiple subscriptions are allowed, the event package MUST specify whether merging of the notifications to form a single state is required, and how such merging is to be performed. Note that it is possible that some event packages may be defined in such a way that each dialog is tied to a mutually exclusive state which is unaffected by the other dialogs; this MUST be clearly stated if it is the case. If the event package does not specify which mode of operation to use, the subscriber may employ either mode of operation. 5.4.10. Rate of notifications Each event package is expected to define a requirement (SHOULD or MUST strength) which defines an absolute maximum on the rate at which notifications are allowed to be generated by a single notifier. Such packages MAY further define a throttle mechanism which allows subscribers to further limit the rate of notification. 5.4.11. State Agents Designers of event packages should consider whether their package can benefit from network aggregation points ("State Agents") and/or nodes which act on behalf of other nodes. (For example, nodes which provide state information about a resource when such a resource is unable or unwilling to provide such state information itself). An example of such an application is a node which tracks the presence and availability of a user in the network. If state agents are to be used by the package, the package MUST specify how such state agents aggregate information and how they Roach [Page 24] Internet Draft SIP-Specific Event Notification February 2002 provide authentication and authorization. Event packages MAY also outline specific scenarios under which notifier migrations take place. 5.4.12. Examples Event packages SHOULD include several demonstrative message flow diagrams paired with several typical, syntactically correct and complete messages. It is RECOMMENDED that documents describing event packages clearly indicate that such examples are informative and not normative, with instructions that implementors refer to the main text of the draft for exact protocol details. 5.4.13. URI List handling Some types of event packages may define state information which is potentially too large to reasonably send in a SIP message. To alleviate this problem, event packages may include the ability to use a MIME body type of "application/uri-list" in NOTIFY messages. The URI or URIs contained in the NOTIFY body will then be used to retrieve the actual state information. If an event package elects to use this mechanism, it MUST define at least one baseline scheme (e.g. http) which is mandatory to support, as well as one mandatory baseline data format for the data so retrieved. Event packages using URIs to retrieve state information also MUST address the duration of the validity of the URIs passed to a subscriber in this fashion. 6. Security Considerations 6.1. Access Control The ability to accept subscriptions should be under the direct control of the user, since many types of events may be considered sensitive for the purposes of privacy. Similarly, the notifier should have the ability to selectively reject subscriptions based on the subscriber identity (based on access control lists), using standard SIP authentication mechanisms. The methods for creation and distribution of such access control lists is outside the scope of this draft. 6.2. Release of Sensitive Policy Information The mere act of returning a 200 or certain 4xx and 6xx responses to SUBSCRIBE requests may, under certain circumstances, create privacy concerns by revealing sensitive policy information. In Roach [Page 25] Internet Draft SIP-Specific Event Notification February 2002 these cases, the notifier SHOULD always return a 202 response. While the subsequent NOTIFY message may not convey true state, it MUST appear to contain a potentially correct piece of data from the point of view of the subscriber, indistinguishable from a valid response. Information about whether a user is authorized to subscribe to the requested state is never conveyed back to the original user under these circumstances. 6.3. Denial-of-Service attacks The current model (one SUBSCRIBE request triggers a SUBSCRIBE response and one or more NOTIFY requests) is a classic setup for an amplifier node to be used in a smurf attack. Also, the creation of state upon receipt of a SUBSCRIBE request can be used by attackers to consume resources on a victim's machine, rendering it unusable. To reduce the chances of such an attack, implementations of notifiers SHOULD require authentication. Authentication issues are discussed in SIP [1] . 6.4. Replay Attacks Replaying of either SUBSCRIBE or NOTIFY can have detrimental effects. In the case of SUBSCRIBE messages, attackers may be able to install any arbitrary subscription which it witnessed being installed at some point in the past. Replaying of NOTIFY messages may be used to spoof old state information (although a good versioning mechanism in the body of the NOTIFY messages may help mitigate such an attack). To prevent such attacks, implementations SHOULD require authentication. Authentication issues are discussed in SIP [1] . 6.5. Man-in-the middle attacks Even with authentication, man-in-the-middle attacks using SUBSCRIBE may be used to install arbitrary subscriptions, hijack existing subscriptions, terminate outstanding subscriptions, or modify the resource to which a subscription is being made. To prevent such attacks, implementations SHOULD provide integrity protection across "Contact," "Route," "Expires," "Event," and "To" headers of SUBSCRIBE messages, at a minimum. If SUBSCRIBE bodies are used to define further information about the state of the call, they SHOULD be included in the integrity protection scheme. Roach [Page 26] Internet Draft SIP-Specific Event Notification February 2002 Man-in-the-middle attacks may also attempt to use NOTIFY messages to spoof arbitrary state information and/or terminate outstanding subscriptions. To prevent such attacks, implementations SHOULD provide integrity protection across the "Call-ID," "CSeq," and "Subscription-State" headers and the bodies of NOTIFY messages. Integrity protection of message headers and bodies is discussed in SIP [1] . 6.6. Confidentiality The state information contained in a NOTIFY message has the potential to contain sensitive information. Implementations MAY encrypt such information to ensure confidentiality. While less likely, it is also possible that the information contained in a SUBSCRIBE message contains information that users might not want to have revealed. Implementations MAY encrypt such information to ensure confidentiality. To allow the remote party to hide information it considers sensitive, all implementations SHOULD be able to handle encrypted SUBSCRIBE and NOTIFY messages. The mechanisms for providing confidentiality are detailed in SIP [1] . 7. IANA Considerations (This section is not applicable until this document is published as an RFC.) This document defines an event-type namespace which requires a central coordinating body. The body chosen for this coordination is the Internet Assigned Numbers Authority (IANA). There are two different types of event-types: normal event packages, and event template-packages; see section 5.2. To avoid confusion, template-package names and package names share the same namespace; in other words, an event template-package MUST NOT share a name with a package. Following the policies outlined in "Guidelines for Writing an IANA Considerations Section in RFCs" [6] , normal event package identification tokens are allocated as First Come First Served, and event template-package identification tokens are allocated on a IETF Consensus basis. Registrations with the IANA MUST include the token being registered and whether the token is a package or a Roach [Page 27] Internet Draft SIP-Specific Event Notification February 2002 template-package. Further, packages MUST include contact information for the party responsible for the registration and/or a published document which describes the event package. Event template-package token registrations MUST include a pointer to the published RFC which defines the event template-package. Registered tokens to designate packages and template-packages MUST NOT contain the character ".", which is used to separate template-packages from packages. 7.1. Registration Information As this document specifies no package or template-package names, the initial IANA registration for event types will be empty. The remainder of the text in this section gives an example of the type of information to be maintained by the IANA; it also demonstrates all five possible permutations of package type, contact, and reference. The table below lists the event packages and template-packages defined in "SIP-Specific Event Notification" [RFC xxxx]. Each name is designated as a package or a template-package under "Type." Package Name Type Contact Reference ------------ ---- ------- --------- example1 package [Roach] example2 package [Roach] [RFC xxxx] example3 package [RFC xxxx] example4 template [Roach] [RFC xxxx] example5 template [RFC xxxx] PEOPLE ------ [Roach] Adam Roach <adam@dynamicsoft.com> REFERENCES ---------- [RFC xxxx] A. Roach "SIP-Specific Event Notification", RFC XXXX, August 2002. 7.2. Registration Template To: ietf-sip-events@iana.org Subject: Registration of new SIP event package Roach [Page 28] Internet Draft SIP-Specific Event Notification February 2002 Package Name: (Package names must conform to the syntax described in section 7.5.1. ) Is this registration for a Template Package: (indicate yes or no) Published Specification(s): (Template packages require a published RFC. Other packages may reference a specification when appropriate). Person & email address to contact for further information: 7.3. Syntax This section describes the syntax extensions required for event notification in SIP. Semantics are described in section 4. Note that the formal syntax definitions described in this document are expressed in the ABNF format defined by [1] , and contain references to elements defined therein. 7.4. New Methods This document describes two new SIP methods: "SUBSCRIBE" and "NOTIFY." This table expands on tables 2 and 3 in SIP [1] . Header Where SUB NOT ------ ----- --- --- Accept R o o Accept 2xx - - Accept 415 o o Accept-Encoding R o o Accept-Encoding 2xx - - Accept-Encoding 415 o o Accept-Language R o o Accept-Language 2xx - - Accept-Language 415 o o Alert-Info R - - Alert-Info 180 - - Allow R o o Allow 2xx o o Roach [Page 29] Internet Draft SIP-Specific Event Notification February 2002 Allow r o o Allow 405 m m Authentication-Info 2xx o o Authorization R o o Call-ID c m m Contact R m m Contact 1xx o o Contact 2xx m o Contact 3xx m m Contact 485 o o Content-Disposition o o Content-Encoding o o Content-Language o o Content-Length t t Content-Type * * CSeq c m m Date o o Error-Info 300-699 o o Expires o - From c m m In-Reply-To R - - Max-Forwards R m m Min-Expires 423 m - MIME-Version o o Organization o - Priority R o - Proxy-Authenticate 407 m m Proxy-Authorization R o o Proxy-Require R o o RAck R - - Record-Route R o o Record-Route 2xx,401,484 o o Reply-To - - Require o o Retry-After 404,413,480,486 o o Retry-After 500,503 o o Retry-After 600,603 o o Route R c c RSeq 1xx o o Server r o o Subject R - - Supported R o o Supported 2xx o o Timestamp o o To c(1) m m Unsupported 420 o o User-Agent o o Via c m m Warning r o o WWW-Authenticate 401 m m Roach [Page 30] Internet Draft SIP-Specific Event Notification February 2002 7.4.1. SUBSCRIBE method "SUBSCRIBE" isrecommended that documents describing event packages clearly indicate that such examples are informative and not normative, with instructions that implementors refer to the main text of the draft for exact protocol details. 6. Security Considerations 6.1. Access Control The abilityadded toaccept subscriptions should be under the direct control of the user, since many types of events may be considered sensitive forthepurposesdefinition ofprivacy. Similarly,thenotifier should have the ability to selectively reject subscriptions based onelement "Method" in thecalling party (based on access control lists), using standardSIPauthentication mechanisms. The methods for creation and distribution of such access control lists is outside the scope of this draft. 6.2. Release of Sensitive Policy Information The mere act of returning a 200 or certain 4xx and 6xx responses to SUBSCRIBE requests may, under certain circumstances, create privacy concerns by revealing sensitive policy information. In these cases, the notifier should always return a 202 response. While the subsequent NOTIFYmessagemay not convey true state, it MUST appear to contain a potentially correct piece of data from the point of view of the subscriber, indistinguishable from a valid response. Information about whether a user is authorized to subscribe togrammar. Like all SIP method names, therequested stateSUBSCRIBE method name isnever conveyed back to the original user under these circumstances. 6.3. Denial-of-Service attackscase sensitive. Thecurrent model (oneSUBSCRIBE method is used to requesttriggers a SUBSCRIBE response and oneasynchronous notification of an event ormoreset of events at a later time. 7.4.2. NOTIFYrequests)method "NOTIFY" isa classic setup for an amplifier nodeadded tobe used in a smurf attack. Also,thecreation of state upon receiptdefinition ofa SUBSCRIBE request can bethe element "Method" in the SIP message grammar. The NOTIFY method is usedby attackerstoconsume resources onnotify avictim's machine, rendering it unusable. To reduce the chances of suchSIP node that anattack, implementations of notifiers SHOULD require authentication. Authentication issues are discussedevent which has been requested by an earlier SUBSCRIBE method has occurred. It may also provide further details about the event. 7.5. New Headers This table expands on tables 2 and 3 inRFC2543SIP [1]. 7. IANA Considerations (This, as amended by the changes described in section 7.4. Header field where proxy ACK BYE CAN INV OPT REG PRA SUB NOT ----------------------------------------------------------------- Allow-Events R o o - o o o o o o Allow-Events 2xx - o - o o o o o o Allow-Events 489 - - - - - - - m m Event R - - - - - - - m m Subscription-State R - - - - - - - - m 7.5.1. "Event" header The following header isnot applicable untildefined for the purposes of thisdocumentspecification. Event = ( "Event" | "o" ) HCOLON event-type *( SEMI event-param ) event-type = event-package *( "." event-template ) event-package = token-nodot event-template = token-nodot token-nodot = 1*( alphanum | "-" | "!" | "%" | "*" | "_" | "+" | "`" | "'" | "~" ) event-param = generic-param | ( "id" EQUAL token ) Event ispublishedadded to the definition of the element "message-header" Roach [Page27]31] Internet Draft SIP-Specific Event NotificationNovember 2001 as an RFC.) This document defines an event-type namespace which requires a central coordinating body. The body chosen for this coordination is the Internet Assigned Numbers Authority (IANA). There are two different types of event-types: normal event packages, and event sub-packages; see section 5.2. To avoid confusion, subpackage names and package names share the same namespace;February 2002 inother words, a sub-package MUST NOT share a name with a package. Followingthepolicies outlined in "Guidelines for Writing an IANA Considerations Section in RFCs" [7] , normal event package identification tokens are allocated as First Come First Served,SIP message grammar. For the purposes of matching responses andevent sub-package identification tokens are allocated on a IETF Consensus basis. RegistrationsNOTIFY messages with SUBSCRIBE messages, theIANA MUST includeevent-type portion of thetoken being registered"Event" header is compared byte-by-byte, andwhetherthe "id" parameter token (if present) is compared byte-by-byte. An "Event" header containing an "id" parameter never matches an "Event" header without an "id" parameter. No other parameters are considered when performing apackage or a subpackage. Further, packages MUST include contact information for the party responsible for the registration and/or a publishedcomparison. This documentwhich describes thedoes not define values for event-types. These values will be defined by individual eventpackage. Sub-package token registrations MUST include a pointer to the published RFC which defines the sub-package. Registered tokens to designate packagespackages, andsub-packagesMUSTNOT containbe registered with thecharacter ".", which is used to separate sub-packages from packages. 7.1. Registration Template As this document specifies no package or sub-package names,IANA. There MUST be exactly one event type listed per event header. Multiple events per message are disallowed. For theinitial IANA registration for event types will be empty. The remainder ofcurious, thetext in this section gives an example of"o" short form is chosen to represent "occurrence." 7.5.2. "Allow-Events" Header The following header is defined for thetypepurposes ofinformationthis specification. Allow-Events = ( "Allow-Events" | "u" ) HCOLON 1*event-type Allow-Events is added tobe maintained bytheIANA; it also demonstrates all five possible permutationsdefinition ofpackage type, contact, and reference. The table below liststheevent packages and sub-packages definedelement "general-header" in"SIP-Specific Event Notification" [RFC xxxx]. Each namethe SIP message grammar. For the curious, the "u" short form isdesignated as a package or a subpackage under "Type."chosen to represent "understands." 7.5.3. "Subscription-State" Header The following header is defined for the purposes of this specification. Subscription-State = "Subscription-State" HCOLON substate-value ) *( SEMI subexp-params ) substate-value = "active" | "pending" | "terminated" Roach [Page28]32] Internet Draft SIP-Specific Event NotificationNovember 2001 Package Name Type Contact Reference ------------ ---- ------- --------- example1 package [Roach] example2 package [Roach] [RFC xxxx] example3 package [RFC xxxx] example4 sub-package [Roach] [RFC xxxx] example5 sub-package [RFC xxxx] PEOPLE ------ [Roach] Adam Roach <adam.roach@ericsson.com> REFERENCES ---------- [RFC xxxx] A. Roach "SIP-Specific Event Notification", RFC XXXX, August 2002. 8. Open Issues In addition to the three issues listed below, the BNF in this document needs to be converted to explicit LWS to match the latest bis draft; this change will be reflected in the next version. 8.1. CANCEL Handling This is actually a protocol-wide open issue which has impacts on this specification: there hasn't been a clear consensus about cancellation of non-INVITE requests yet. If non-INVITE requests cannot be cancelled, we need to remove section 4.1.3. 8.2. Version of SIPFebruary 2002 subexp-params = ("reason" EQUAL reason-code) |("expires" EQUAL delta-seconds) |("retry-after" EQUAL delta-seconds) | generic-param reason-code = "deactivated" | "probation" | "rejected" | "timeout" | "giveup" | reason-extension reason-extension = token Subscription-State is added toreference Much ofthehandling in this document is rather different than what is described in RFC2543; in fact, manydefinition of therecent changes to this document have been tracking changeselement "request-header" in the"bis" versions of theSIPspecification. We can continuemessage grammar. 7.6. New Response Codes 7.6.1. "202 Accepted" Response Code The 202 response is added toreference RFC2543 while pulling in huge chunks ofthebis draft for compatibility (for example,"Success" header field definition: Success = "200" ; OK | "202" ; Accepted "202 Accepted" has theRoute handling would essentially be copied word-for-word fromsame meaning as that defined in HTTP/1.1 [4] . 7.6.2. "489 Bad Event" Response Code The 489 event response is added to thebis draft), or we can start referencing"Client-Error" header field definition: Client-Error = "400" ; Bad Request ... | "489" ; Bad Event "489 Bad Event" is used to indicate that thebis drafts. Of course, referencingserver did not understand the event package specified in a "Event" header field. 8. Changes 8.1. Changes from draft-ietf-...-01 Roach [Page 33] Internet Draft SIP-Specific Event Notification February 2002 - Changed dependancy from RFC2543 to new sip bisdrafts allows usdraft. This allowed removal of certain sections of text. - Renamed "sub-packages" topick up changes"template-packages" in an attempt toprotocolmitigate exploding rampant misinterpretation. - Changed "Subscription-Expires" to "Subscription-State," and added clearer semantics"for free," while importing chunks offor "reason" codes. - Aligned "Subscription-State" "reason" codes with watcherinfo draft. - Made "Subscription-State" mandatory in NOTIFY requests, since itrequires constant maintananceis integral to defining the creation and destruction of subscriptions (and, consequently, dialogs) - Heavily revised section on dialog creation andrunstermination. - Expanded migration section. - Added "id" parameter to Event header, to allow demultiplexing of NOTIFY requests when more than one subscription is associated with a single dialog. - Syncronized SUBSCRIBE "Expires" handling with REGISTER (again) - Added definitions section. - Restructuring for clarity. - Added statement explicitly allowing event packages to define additional parameters for therisk of getting out of sync."Event" header. Roach [Page29]34] Internet Draft SIP-Specific Event NotificationNovember 2001 On the other hand, placing a dependency on the bis draft pushes the timeframe for this draft (and the drafts that depend on it) out past the time that the next SIP RFC is published. 8.3. Immediate NOTIFYs There has been discussion, but no consensus, on the issue of whether each SUBSCRIBE must have an immediate NOTIFY message sentFebruary 2002 - Added motivational text inresponse. In attempts to follow the prevailing sentiment, this draft had become internally inconsistent. This version of this document has eliminated these inconsistancies by requiring notifiers always to send a NOTIFY immediately upon receiving a SUBSCRIBE. This decision does not necessarily represent group consensus, and further discussion may be warranted. 9. Changes 9.1.several places. - Synced up header table modifications with bis draft. 8.2. Changes from draft-ietf-...-00 - Fixed confusing typo in section describing correlation of SUBSCRIBE requests - Added explanitory text to clarify tag handling when generating re-subscriptions - Expanded general handling section to include specific discussion of Route/Record-Route handling. - Included use of "methods" parameter on Contact as a means for detecting support for SUBSCRIBE and NOTIFY. - Added definition of term "dialog"; changed "leg" to "dialog" everwhere. - Added syntax for "Subscription-Expires" header. - Changed NOTIFY messages to refer to "Subscription-Expires" everywhere (instead of "Expires.")Roach [Page 30] Internet Draft SIP-Specific Event Notification November 2001- Added information about generation and handling of 481 responses to SUBSCRIBE requests - Changed having Expires header in SUBSCRIBE from MUST to SHOULD; this aligns more closely with REGISTER behavior - Removed experimental/private event package names, per list consensus Roach [Page 35] Internet Draft SIP-Specific Event Notification February 2002 - Cleaned up some legacy text left over from very early drafts that allowed multiple contacts per subscription - Strengthened language requiring the removal of subscriptions if a NOTIFY request fails with a 481. Clarified that such removal is required for all subscriptions, including administrative ones. - Removed description of delaying NOTIFY requests until authorization is granted. Such behavior was inconsistent with other parts of this document. - Moved description of event packages to later in document, to reduce the number of forward references. - Minor editorial and nits changes - Added new open issues to open issues section. All previous open issues have been resolved.9.2.8.3. Changes from draft-roach-...-03 - Added DOS attacks section to open issues. - Added discussion of forking to open issues - Changed response to PINT request for notifiers who don't support PINT from 400 to 489.Roach [Page 31] Internet Draft SIP-Specific Event Notification November 2001- Added sentence to security section to call attention to potential privacy issues of delayed NOTIFY responses. - Added clarification: access control list handling is out of scope. - (Hopefully) Final resolution on out-of-band subscriptions: mentioned in section4.3.4.2. Roach [Page 36] Internet Draft SIP-Specific Event Notification February 2002 Removed from open issues. - Made "Contact" header optional for SUBSCRIBE 1xx responses. - Added description clarifying tag handling (section4.2.1.4.3.4. ) - Removed event throttling from open issues. - Editorial cleanup to remove term "extension draft" and similar; "event package" is now (hopefully) used consistently throughout the document. - Remove discussion of event agents from open issues. This is covered in the event packages section now. - Added discussion of forking to open issues. - Added discussion of sub-packages - Added clarification that, upon receiving a "NOTIFY" with an expires of "0", the subscriber can re-subscribe. This allows trivial migration of subscriptions between nodes. - Added preliminary IANA Considerations sectionRoach [Page 32] Internet Draft SIP-Specific Event Notification November 2001- Changed syntax for experimental event tokens to avoid possibly ambiguity between experimental tokens and sub-packages. - Slight adjustment to "Event" syntax to accommodate sub-packages. - Added section describing the information which is to be included in documents describing event packages. Roach [Page 37] Internet Draft SIP-Specific Event Notification February 2002 - Made 481 responses mandatory for unexpected notifications (allowing notifiers to remove subscriptions in error cases) - Several minor non-semantic editorial changes.9.3.8.4. Changes from draft-roach-...-02 - Clarification under "Notifier SUBSCRIBE behavior" which indicates that the first NOTIFY message (sent immediately in response to a SUBSCRIBE) may contain an empty body, if resource state doesn't make sense at that point in time. - Text on message flow in overview section corrected - Removed suggestion that clients attempt to unsubscribe whenever they receive a NOTIFY for an unknown event. Such behavior opens up DOS attacks, and will lead to message loops unless additional precautions are taken. The 481 response to the NOTIFY should serve the same purpose. - Changed processing of non-200 responses to NOTIFY from "SHOULD remove contact" to "MUST remove contact" to support the above change. - Re-added discussion of out-of-band subscription mechanisms (including open issue of resource identification).Roach [Page 33] Internet Draft SIP-Specific Event Notification November 2001- Added text specifying that SUBSCRIBE transactions are not to be prolonged. This is based on the consensus that non-INVITE transactions should never be prolonged; such consensus within the SIP working group was reached at the 49th IETF. - Added "202 Accepted" response code to support the above change. The behavior of this 202 response code is a generalization of that described in the presence draft. - Updated to specify that the response to an unauthorized SUBSCRIBE request is 603 or 403. Roach [Page 38] Internet Draft SIP-Specific Event Notification February 2002 - Level-4 subheadings added to particularly long sections to break them up into logical units. This helps make the behavior description seem somewhat less rambling. This also caused some re-ordering of these paragraphs (hopefully in a way that makes them more readable). - Some final mopping up of old text describing "call related" and "third party" subscriptions (deprecated concepts). - Duplicate explanation of subscription duration removed from subscriber SUBSCRIBE behavior section. - Other text generally applicable to SUBSCRIBE (instead of just subscriber handling of SUBSCRIBE) moved to parent section. - Updated header table to reflect mandatory usage of "Expires" header in SUBSCRIBE requests and responses - Removed "Event" header usage in responses - Added sentence suggesting that notifiers may notify subscribers when a subscription has timed out. - Clarified that a failed attempt to refresh a subscription does not imply that the original subscription has been cancelled.Roach [Page 34] Internet Draft SIP-Specific Event Notification November 2001- Clarified that 489 is a valid response to "NOTIFY" requests. - Minor editorial changes to clean up awkward and/or unclear grammar in several places9.4.8.5. Changes from draft-roach-...-01 - Multiple contacts per SUBSCRIBE message disallowed. - Contact header now required in NOTIFY messages. Roach [Page 39] Internet Draft SIP-Specific Event Notification February 2002 - Distinction between third party/call member events removed. - Distinction between call-related/resource-related events removed. - Clarified that subscribers must expect NOTIFY messages before the SUBSCRIBE transaction completes - Added immediate NOTIFY message after successful SUBSCRIBE; this solves a myriad of issues, most having to do with forking. - Added discussion of "undefined state" (before a NOTIFY arrives). - Added mechanism for notifiers to shorten/cancel outstanding subscriptions. - Removed open issue about appropriateness of new "489" response. - Removed all discussion of out-of-band subscriptions. - Added brief discussion of event state polling.10.9. References [1]M. Handley/H. Schulzrinne/E. Schooler/J. Rosenberg,J. Rosenberg et. al., "SIP: Session Initiation Protocol",RFC 2543,<draft-ietf-sip-rfc2543bis-07>, IETF;March 1999. Roach [Page 35] Internet Draft SIP-Specific Event Notification November 2001February 2002. Work in progress. [2] J. Rosenberg, H. Schulzrinne, "Guidelines for Authors of SIP Extensions",<draft-ietf-sip-guidelines-02.txt>,<draft-ietf-sip-guidelines-03.txt>, IETF;MarchNovember 2001. Work in progress. [3] S. Petrack, L. Conroy, "The PINT Service Protocol", RFC 2848, IETF; June 2000. [4]J. Rosenberg et. al., "SIP Extensions for Presence", <draft-ietf-simple-presence-03.txt>, IETF; September 2001. Work in progress. [5]R. Fielding et. al., "Hypertext Transfer Protocol -- HTTP/1.1", RFC2068, IETF, January 1997.[6][5] J. Postel, J. Reynolds, "Instructions to RFC Authors", RFC2223, IETF, October 1997.[7][6] T. Narten, H. Alvestrand, "Guidelines for Writing an IANA Roach [Page 40] Internet Draft SIP-Specific Event Notification February 2002 Considerations Section in RFCs", BCP 26, IETF, October 1998.[8][7] Schulzrinne/Rosenberg, "SIP Caller Preferences and Callee Capabilities",<draft-ietf-sip-callerprefs-04.txt>,<draft-ietf-sip-callerprefs-05.txt>, IETF;JuneNovember 2001. Work in progress.11.10. Acknowledgements Thanks to the participants in the Events BOF at the 48th IETF meeting in Pittsburgh, as well as those who gave ideas and suggestions on the SIP Events mailing list. In particular, I wish to thank Henning Schulzrinne of Columbia University for coming up with the final three-tiered event identification scheme, Sean Olsonof Ericssonfor miscellaneous guidance, Jonathan Rosenberg for a thorough scrubbing of the -00 draft, and the authors of the "SIP Extensions for Presence" draft for their input to SUBSCRIBE and NOTIFY request semantics.12.11. Author's Address Adam RoachEricsson Inc. Mailstop L-04 740 E. Campbell Rd. Richardson,dynamicsoft 5100 Tennyson Parkway Suite 1200 Plano, TX7508175024 USAPhone: +1 972 583 7594 Fax: +1 972 669 0154E-Mail:adam.roach@ericsson.com<adam@dynamicsoft.com> Voice: <sip:adam@dynamicsoft.com> Roach [Page36]41] ----