idnits 2.17.1 draft-ietf-sipcore-rfc3265bis-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 27, 2009) is 5380 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'Roach' is mentioned on line 1701, but not defined ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Downref: Normative reference to an Informational RFC: RFC 2779 ** Obsolete normative reference: RFC 3265 (Obsoleted by RFC 6665) -- Duplicate reference: RFC4660, mentioned in 'RFC4660', was also mentioned in 'RFC 4660'. Summary: 5 errors (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. B. Roach 3 Internet-Draft Tekelec 4 Expires: January 28, 2010 July 27, 2009 6 SIP-Specific Event Notification 7 draft-ietf-sipcore-rfc3265bis-00 9 Status of this Memo 11 This Internet-Draft is submitted to IETF in full conformance with the 12 provisions of BCP 78 and BCP 79. This document may contain material 13 from IETF Documents or IETF Contributions published or made publicly 14 available before November 10, 2008. The person(s) controlling the 15 copyright in some of this material may not have granted the IETF 16 Trust the right to allow modifications of such material outside the 17 IETF Standards Process. Without obtaining an adequate license from 18 the person(s) controlling the copyright in such materials, this 19 document may not be modified outside the IETF Standards Process, and 20 derivative works of it may not be created outside the IETF Standards 21 Process, except to format it for publication as an RFC or to 22 translate it into languages other than English. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF), its areas, and its working groups. Note that 26 other groups may also distribute working documents as Internet- 27 Drafts. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 The list of current Internet-Drafts can be accessed at 35 http://www.ietf.org/ietf/1id-abstracts.txt. 37 The list of Internet-Draft Shadow Directories can be accessed at 38 http://www.ietf.org/shadow.html. 40 This Internet-Draft will expire on January 28, 2010. 42 Copyright Notice 44 Copyright (c) 2009 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents in effect on the date of 49 publication of this document (http://trustee.ietf.org/license-info). 50 Please review these documents carefully, as they describe your rights 51 and restrictions with respect to this document. 53 Abstract 55 This document describes an extension to the Session Initiation 56 Protocol (SIP). The purpose of this extension is to provide an 57 extensible framework by which SIP nodes can request notification from 58 remote nodes indicating that certain events have occurred. 60 Note that the event notification mechanisms defined herein are NOT 61 intended to be a general-purpose infrastructure for all classes of 62 event subscription and notification. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 67 1.1. Overview of Operation . . . . . . . . . . . . . . . . . . 5 68 1.2. Documentation Conventions . . . . . . . . . . . . . . . . 6 69 2. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 6 70 3. SIP Methods for Event Notification . . . . . . . . . . . . . . 7 71 3.1. SUBSCRIBE . . . . . . . . . . . . . . . . . . . . . . . . 7 72 3.1.1. Subscription Duration . . . . . . . . . . . . . . . . 7 73 3.1.2. Identification of Subscribed Events and Event 74 Classes . . . . . . . . . . . . . . . . . . . . . . . 8 75 3.1.3. Additional SUBSCRIBE Header Values . . . . . . . . . . 9 76 3.2. NOTIFY . . . . . . . . . . . . . . . . . . . . . . . . . . 9 77 3.2.1. Identification of Reported Events, Event Classes, 78 and Current State . . . . . . . . . . . . . . . . . . 9 79 4. Node Behavior . . . . . . . . . . . . . . . . . . . . . . . . 10 80 4.1. Subscriber Behavior . . . . . . . . . . . . . . . . . . . 10 81 4.1.1. Detecting Support for SIP Events . . . . . . . . . . . 10 82 4.1.2. Creating and Maintaining Subscriptions . . . . . . . . 10 83 4.1.3. Receiving and Processing State Information . . . . . . 13 84 4.1.4. Forking of SUBSCRIBE Messages . . . . . . . . . . . . 16 85 4.2. Notifier Behavior . . . . . . . . . . . . . . . . . . . . 16 86 4.2.1. Subscription Establishment and Maintenance . . . . . . 16 87 4.2.2. Sending State Information to Subscribers . . . . . . . 20 88 4.2.3. PINT Compatibility . . . . . . . . . . . . . . . . . . 22 89 4.3. Proxy Behavior . . . . . . . . . . . . . . . . . . . . . . 22 90 4.4. Common Behavior . . . . . . . . . . . . . . . . . . . . . 23 91 4.4.1. Dialog Creation and Termination . . . . . . . . . . . 23 92 4.4.2. Notifier Migration . . . . . . . . . . . . . . . . . . 23 93 4.4.3. Polling Resource State . . . . . . . . . . . . . . . . 24 94 4.4.4. Allow-Events header field usage . . . . . . . . . . . 24 95 4.5. Targeting Subscriptions at Devices . . . . . . . . . . . . 25 96 4.5.1. Using GRUUs to Route to Devices . . . . . . . . . . . 25 97 4.5.2. Sharing Dialogs . . . . . . . . . . . . . . . . . . . 26 98 4.6. CANCEL Requests for SUBSCRIBE and NOTIFY . . . . . . . . . 27 99 5. Event Packages . . . . . . . . . . . . . . . . . . . . . . . . 27 100 5.1. Appropriateness of Usage . . . . . . . . . . . . . . . . . 28 101 5.2. Event Template-packages . . . . . . . . . . . . . . . . . 28 102 5.3. Amount of State to be Conveyed . . . . . . . . . . . . . . 29 103 5.3.1. Complete State Information . . . . . . . . . . . . . . 29 104 5.3.2. State Deltas . . . . . . . . . . . . . . . . . . . . . 29 105 5.4. Event Package Responsibilities . . . . . . . . . . . . . . 30 106 5.4.1. Event Package Name . . . . . . . . . . . . . . . . . . 30 107 5.4.2. Event Package Parameters . . . . . . . . . . . . . . . 30 108 5.4.3. SUBSCRIBE Bodies . . . . . . . . . . . . . . . . . . . 30 109 5.4.4. Subscription Duration . . . . . . . . . . . . . . . . 31 110 5.4.5. NOTIFY Bodies . . . . . . . . . . . . . . . . . . . . 31 111 5.4.6. Notifier processing of SUBSCRIBE requests . . . . . . 31 112 5.4.7. Notifier generation of NOTIFY requests . . . . . . . . 31 113 5.4.8. Subscriber processing of NOTIFY requests . . . . . . . 32 114 5.4.9. Handling of forked requests . . . . . . . . . . . . . 32 115 5.4.10. Rate of notifications . . . . . . . . . . . . . . . . 32 116 5.4.11. State Aggregation . . . . . . . . . . . . . . . . . . 33 117 5.4.12. Examples . . . . . . . . . . . . . . . . . . . . . . . 33 118 5.4.13. Use of URIs to Retrieve State . . . . . . . . . . . . 33 119 6. Security Considerations . . . . . . . . . . . . . . . . . . . 33 120 6.1. Access Control . . . . . . . . . . . . . . . . . . . . . . 33 121 6.2. Notifier Privacy Mechanism . . . . . . . . . . . . . . . . 34 122 6.3. Denial-of-Service attacks . . . . . . . . . . . . . . . . 34 123 6.4. Replay Attacks . . . . . . . . . . . . . . . . . . . . . . 34 124 6.5. Man-in-the middle attacks . . . . . . . . . . . . . . . . 35 125 6.6. Confidentiality . . . . . . . . . . . . . . . . . . . . . 35 126 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 127 7.1. Event Packages . . . . . . . . . . . . . . . . . . . . . . 36 128 7.1.1. Registration Information . . . . . . . . . . . . . . . 36 129 7.1.2. Registration Template . . . . . . . . . . . . . . . . 37 130 7.2. Reason Codes . . . . . . . . . . . . . . . . . . . . . . . 37 131 7.3. Header Field Names . . . . . . . . . . . . . . . . . . . . 38 132 7.4. Response Codes . . . . . . . . . . . . . . . . . . . . . . 39 133 8. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 134 8.1. New Methods . . . . . . . . . . . . . . . . . . . . . . . 39 135 8.1.1. SUBSCRIBE method . . . . . . . . . . . . . . . . . . . 41 136 8.1.2. NOTIFY method . . . . . . . . . . . . . . . . . . . . 41 137 8.2. New Header Fields . . . . . . . . . . . . . . . . . . . . 41 138 8.2.1. "Event" Header Field . . . . . . . . . . . . . . . . . 41 139 8.2.2. "Allow-Events" Header Field . . . . . . . . . . . . . 42 140 8.2.3. "Subscription-State" Header Field . . . . . . . . . . 42 141 8.3. New Response Codes . . . . . . . . . . . . . . . . . . . . 42 142 8.3.1. "202 Accepted" Response Code . . . . . . . . . . . . . 42 143 8.3.2. "489 Bad Event" Response Code . . . . . . . . . . . . 42 145 8.4. Augmented BNF Definitions . . . . . . . . . . . . . . . . 42 146 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 43 147 9.1. Normative References . . . . . . . . . . . . . . . . . . . 43 148 9.2. Informative References . . . . . . . . . . . . . . . . . . 44 149 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 45 150 Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . . 45 151 B.1. Bug 711: Allow-Events can't express template support . . . 45 152 B.2. Remove 202 Response Code? . . . . . . . . . . . . . . . . 46 153 B.3. Timer L and Resubscribes . . . . . . . . . . . . . . . . . 46 154 Appendix C. Changes . . . . . . . . . . . . . . . . . . . . . . . 46 155 C.1. Changes since RFC 3265 . . . . . . . . . . . . . . . . . . 46 156 C.1.1. Bug 666: Clarify use of expires=xxx with terminated . 46 157 C.1.2. Bug 667: Reason code for unsub/poll not clearly 158 spelled out . . . . . . . . . . . . . . . . . . . . . 46 159 C.1.3. Bug 669: Clarify: SUBSCRIBE for a duration might 160 be answered with a NOTIFY/expires=0 . . . . . . . . . 47 161 C.1.4. Bug 670: Dialog State Machine needs clarification . . 47 162 C.1.5. Bug 671: Clarify timeout-based removal of 163 subscriptions . . . . . . . . . . . . . . . . . . . . 47 164 C.1.6. Bug 672: Mandate expires= in NOTIFY . . . . . . . . . 47 165 C.1.7. Bug 673: INVITE 481 response effect clarification . . 47 166 C.1.8. Bug 677: SUBSCRIBE response matching text in error . . 47 167 C.1.9. Bug 695: Document is not explicit about response 168 to NOTIFY at subscription termination . . . . . . . . 47 169 C.1.10. Bug 696: Subscription state machine needs 170 clarification . . . . . . . . . . . . . . . . . . . . 47 171 C.1.11. Bug 697: Unsubscription behavior could be clarified . 48 172 C.1.12. Bug 699: NOTIFY and SUBSCRIBE are target refresh 173 requests . . . . . . . . . . . . . . . . . . . . . . . 48 174 C.1.13. Bug 722: Inconsistent 423 reason phrase text . . . . . 48 175 C.1.14. Bug 741: guidance needed on when to not include 176 Allow-Events . . . . . . . . . . . . . . . . . . . . . 48 177 C.1.15. Bug 744: 5xx to NOTIFY terminates a subscription, 178 but should not . . . . . . . . . . . . . . . . . . . . 48 179 C.1.16. Bug 752: Detection of forked requests is incorrect . . 48 180 C.1.17. Bug 773: Reason code needs IANA registry . . . . . . . 48 181 C.1.18. Bug 774: Need new reason for terminating 182 subscriptions to resources that never change . . . . . 48 183 C.1.19. Clarify handling of Route/Record-Route in NOTIFY . . . 49 184 C.1.20. Eliminate implicit subscriptions . . . . . . . . . . . 49 185 C.1.21. Deprecate dialog re-use . . . . . . . . . . . . . . . 49 186 C.1.22. Rationalize dialog creation . . . . . . . . . . . . . 49 187 C.1.23. Refactor behavior sections . . . . . . . . . . . . . . 49 188 C.1.24. Clarify sections that need to be present in event 189 packages . . . . . . . . . . . . . . . . . . . . . . . 49 190 C.1.25. Make CANCEL handling more explicit . . . . . . . . . . 49 191 C.1.26. Remove State Agent Terminology . . . . . . . . . . . . 50 192 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 50 194 1. Introduction 196 The ability to request asynchronous notification of events proves 197 useful in many types of SIP services for which cooperation between 198 end-nodes is required. Examples of such services include automatic 199 callback services (based on terminal state events), buddy lists 200 (based on user presence events), message waiting indications (based 201 on mailbox state change events), and PSTN and Internet 202 Internetworking (PINT) [RFC2848] status (based on call state events). 204 The methods described in this document provide a framework by which 205 notification of these events can be ordered. 207 The event notification mechanisms defined herein are NOT intended to 208 be a general-purpose infrastructure for all classes of event 209 subscription and notification. Meeting requirements for the general 210 problem set of subscription and notification is far too complex for a 211 single protocol. Our goal is to provide a SIP-specific framework for 212 event notification which is not so complex as to be unusable for 213 simple features, but which is still flexible enough to provide 214 powerful services. Note, however, that event packages based on this 215 framework may define arbitrarily elaborate rules which govern the 216 subscription and notification for the events or classes of events 217 they describe. 219 This document does not describe an extension which may be used 220 directly; it must be extended by other documents (herein referred to 221 as "event packages"). In object-oriented design terminology, it may 222 be thought of as an abstract base class which must be derived into an 223 instantiatable class by further extensions. Guidelines for creating 224 these extensions are described in Section 5. 226 1.1. Overview of Operation 228 The general concept is that entities in the network can subscribe to 229 resource or call state for various resources or calls in the network, 230 and those entities (or entities acting on their behalf) can send 231 notifications when those states change. 233 A typical flow of messages would be: 235 Subscriber Notifier 236 |-----SUBSCRIBE---->| Request state subscription 237 |<-------200--------| Acknowledge subscription 238 |<------NOTIFY----- | Return current state information 239 |--------200------->| 240 |<------NOTIFY----- | Return current state information 241 |--------200------->| 243 Subscriptions are expired and must be refreshed by subsequent 244 SUBSCRIBE messages. 246 1.2. Documentation Conventions 248 There are several paragraphs throughout this document which provide 249 motivational or clarifying text. Such passages are non-normative, 250 and are provided only to assist with reader comprehension. These 251 passages are set off from the remainder of the text by being indented 252 thus: 254 This is an example of non-normative explanatory text. It does not 255 form part of the specification, and is used only for 256 clarification. 258 The all-capital terms "MUST", "SHOULD", "MAY", "SHOULD NOT", "MUST 259 NOT", and "RECOMMENDED" are used as defined in [RFC2119]. In 260 particular, implementors need to take careful note of the meaning of 261 "SHOULD" defined in RFC 2119. To rephrase: violation of SHOULD- 262 strength requirements requires careful analysis and clearly 263 enumerable reasons. It is inappropriate to fail to comply with 264 "SHOULD"-strength requirements whimsically or for ease of 265 implementation. 267 The use of quotation marks next to periods and commas follows the 268 convention used by the American Mathematical Society; although 269 contrary to traditional American English convention, this usage lends 270 clarity to certain passages. 272 2. Definitions 274 Event Package: An event package is an additional specification which 275 defines a set of state information to be reported by a notifier to 276 a subscriber. Event packages also define further syntax and 277 semantics based on the framework defined by this document required 278 to convey such state information. 280 Event Template-Package: An event template-package is a special kind 281 of event package which defines a set of states which may be 282 applied to all possible event packages, including itself. 284 Notification: Notification is the act of a notifier sending a NOTIFY 285 message to a subscriber to inform the subscriber of the state of a 286 resource. 288 Notifier: A notifier is a user agent which generates NOTIFY requests 289 for the purpose of notifying subscribers of the state of a 290 resource. Notifiers typically also accept SUBSCRIBE requests to 291 create subscriptions. 293 Subscriber: A subscriber is a user agent which receives NOTIFY 294 requests from notifiers; these NOTIFY requests contain information 295 about the state of a resource in which the subscriber is 296 interested. Subscribers typically also generate SUBSCRIBE 297 requests and send them to notifiers to create subscriptions. 299 Subscription: A subscription is a set of application state 300 associated with a dialog. This application state includes a 301 pointer to the associated dialog, the event package name, and 302 possibly an identification token. Event packages will define 303 additional subscription state information. By definition, 304 subscriptions exist in both a subscriber and a notifier. 306 Subscription Migration: Subscription migration is the act of moving 307 a subscription from one notifier to another notifier. 309 3. SIP Methods for Event Notification 311 3.1. SUBSCRIBE 313 The SUBSCRIBE method is used to request current state and state 314 updates from a remote node. SUBSCRIBE is a target refresh request, 315 as that term is defined in SIP [RFC3261]. 317 3.1.1. Subscription Duration 319 SUBSCRIBE requests SHOULD contain an "Expires" header field (defined 320 in SIP [RFC3261]). This expires value indicates the duration of the 321 subscription. In order to keep subscriptions effective beyond the 322 duration communicated in the "Expires" header field, subscribers need 323 to refresh subscriptions on a periodic basis using a new SUBSCRIBE 324 message on the same dialog as defined in SIP [RFC3261]. 326 If no "Expires" header field is present in a SUBSCRIBE request, the 327 implied default is defined by the event package being used. 329 200-class responses to SUBSCRIBE requests also MUST contain an 330 "Expires" header field. The period of time in the response MAY be 331 shorter but MUST NOT be longer than specified in the request. The 332 notifier is explicitly allowed to shorten the duration to zero. The 333 period of time in the response is the one which defines the duration 334 of the subscription. 336 An "expires" parameter on the "Contact" header field has no semantics 337 for SUBSCRIBE and is explicitly not equivalent to an "Expires" header 338 field in a SUBSCRIBE request or response. 340 A natural consequence of this scheme is that a SUBSCRIBE with an 341 "Expires" of 0 constitutes a request to unsubscribe from an event. 343 In addition to being a request to unsubscribe, a SUBSCRIBE message 344 with "Expires" of 0 also causes a fetch of state; see 345 Section 4.4.3. 347 Notifiers may also wish to cancel subscriptions to events; this is 348 useful, for example, when the resource to which a subscription refers 349 is no longer available. Further details on this mechanism are 350 discussed in Section 4.2.2. 352 3.1.2. Identification of Subscribed Events and Event Classes 354 Identification of events is provided by three pieces of information: 355 Request URI, Event Type, and (optionally) message body. 357 The Request URI of a SUBSCRIBE request, most importantly, contains 358 enough information to route the request to the appropriate entity per 359 the request routing procedures outlined in SIP [RFC3261]. It also 360 contains enough information to identify the resource for which event 361 notification is desired, but not necessarily enough information to 362 uniquely identify the nature of the event (e.g., 363 "sip:adam@example.com" would be an appropriate URI to subscribe to 364 for my presence state; it would also be an appropriate URI to 365 subscribe to the state of my voice mailbox). 367 Subscribers MUST include exactly one "Event" header field in 368 SUBSCRIBE requests, indicating to which event or class of events they 369 are subscribing. The "Event" header field will contain a token which 370 indicates the type of state for which a subscription is being 371 requested. This token will be registered with the IANA and will 372 correspond to an event package which further describes the semantics 373 of the event or event class. 375 If the event package to which the event token corresponds defines 376 behavior associated with the body of its SUBSCRIBE requests, those 377 semantics apply. 379 Event packages may also define parameters for the Event header field; 380 if they do so, they must define the semantics for such parameters. 382 3.1.3. Additional SUBSCRIBE Header Values 384 Because SUBSCRIBE requests create a dialog as defined in SIP 385 [RFC3261], they MAY contain an "Accept" header field. This header 386 field, if present, indicates the body formats allowed in subsequent 387 NOTIFY requests. Event packages MUST define the behavior for 388 SUBSCRIBE requests without "Accept" header fields; usually, this will 389 connote a single, default body type. 391 Header values not described in this document are to be interpreted as 392 described in SIP [RFC3261]. 394 3.2. NOTIFY 396 NOTIFY messages are sent to inform subscribers of changes in state to 397 which the subscriber has a subscription. Subscriptions are typically 398 put in place using the SUBSCRIBE method; however, it is possible that 399 other means have been used. 401 NOTIFY is a target refresh request, as that term is defined in SIP 402 [RFC3261]. 404 A NOTIFY does not terminate its corresponding subscription; in other 405 words, a single SUBSCRIBE request may trigger several NOTIFY 406 requests. 408 3.2.1. Identification of Reported Events, Event Classes, and Current 409 State 411 Identification of events being reported in a notification is very 412 similar to that described for subscription to events (see 413 Section 3.1.2). 415 As in SUBSCRIBE requests, NOTIFY "Event" header fields will contain a 416 single event package name for which a notification is being 417 generated. The package name in the "Event" header field MUST match 418 the "Event" header field in the corresponding SUBSCRIBE message. 420 Event packages may define semantics associated with the body of their 421 NOTIFY requests; if they do so, those semantics apply. NOTIFY bodies 422 are expected to provide additional details about the nature of the 423 event which has occurred and the resultant resource state. 425 When present, the body of the NOTIFY request MUST be formatted into 426 one of the body formats specified in the "Accept" header field of the 427 corresponding SUBSCRIBE request. This body will contain either the 428 state of the subscribed resource or a pointer to such state in the 429 form of a URI (see Section 5.4.13). 431 4. Node Behavior 433 4.1. Subscriber Behavior 435 4.1.1. Detecting Support for SIP Events 437 The extension described in this document does not make use of the use 438 of "Require" or "Proxy-Require" header fields; similarly, there is no 439 token defined for "Supported" header fields. Potential subscribers 440 may probe for the support of SIP Events using the OPTIONS request 441 defined in SIP [RFC3261]. 443 The presence of "SUBSCRIBE" in the "Allow" header field of any 444 request or response indicates support for SIP Events; further, in the 445 absence of an "Allow" header field, the simple presence of an "Allow- 446 Events" header field is sufficient to indicate that the node that 447 sent the message is capable of acting as a notifier (see 448 Section 4.4.4. 450 The "methods" parameter for Contact may also be used to 451 specifically announce support for SUBSCRIBE and NOTIFY messages 452 when registering. (See [RFC3840] for details on the "methods" 453 parameter). 455 4.1.2. Creating and Maintaining Subscriptions 457 From the subscriber's perspective, a subscription proceeds according 458 to the following state diagram: 460 +-------------+ 461 | init |<-----------------------+ 462 +-------------+ | 463 | Retry-after 464 Send SUBSCRIBE expires 465 | | 466 V Timer L Fires; | 467 +-------------+ SUBSCRIBE failure | 468 +------------| notify_wait |-- response; --------+ | 469 | +-------------+ or NOTIFY, | | 470 | | state=terminated | | 471 | | | | 472 ++========|===================|============================|==|====++ 473 || | | V | || 474 || Receive NOTIFY, Receive NOTIFY, +-------------+ || 475 || state=active state=pending | terminated | || 476 || | | +-------------+ || 477 || | | A A || 478 || | V Receive NOTIFY, | | || 479 || | +-------------+ state=terminated; | | || 480 || | | pending |-- or 481 response ----+ | || 481 || | +-------------+ to SUBSCRIBE | || 482 || | | refresh | || 483 || | Receive NOTIFY, | || 484 || | state=active | || 485 || | | | || 486 || | V Receive NOTIFY, | || 487 || | +-------------+ state=terminated; | || 488 || +----------->| active |-- or 481 response -------+ || 489 || +-------------+ to SUBSCRIBE || 490 || refresh || 491 || Subscription || 492 ++=================================================================++ 494 Any transition from "notify_wait" into a "pending" or "active" state 495 results in a new subscription. Note that multiple subscriptions can 496 be generated as the result of a single SUBSCRIBE request (see 497 Section 4.4.1). Each of these new subscriptions exists in its own 498 independent state machine. 500 4.1.2.1. Requesting a Subscription 502 SUBSCRIBE is a dialog-creating method, as described in SIP [RFC3261]. 504 When a subscriber wishes to subscribe to a particular state for a 505 resource, it forms a SUBSCRIBE message. If the initial SUBSCRIBE 506 represents a request outside of a dialog (as it typically will), its 507 construction follows the procedures outlined in SIP [RFC3261] for UAC 508 request generation outside of a dialog. 510 This SUBSCRIBE request will be confirmed with a final response. 200- 511 class responses indicate that the subscription has been accepted, and 512 that a NOTIFY will be sent immediately. A 200 response indicates 513 that the subscription has been accepted and that the user is 514 authorized to subscribe to the requested resource. A 202 response 515 merely indicates that the subscription has been understood, and that 516 authorization may or may not have been granted. 518 The "Expires" header field in a 200-class response to SUBSCRIBE 519 indicates the actual duration for which the subscription will remain 520 active (unless refreshed). 522 Non-200 class final responses indicate that no subscription or dialog 523 has been created, and no subsequent NOTIFY message will be sent. All 524 non-200 class responses (with the exception of "489", described 525 herein) have the same meanings and handling as described in SIP 526 [RFC3261]. 528 4.1.2.2. Refreshing of Subscriptions 530 At any time before a subscription expires, the subscriber may refresh 531 the timer on such a subscription by sending another SUBSCRIBE request 532 on the same dialog as the existing subscription. The handling for 533 such a request is the same as for the initial creation of a 534 subscription except as described below. 536 If a SUBSCRIBE request to refresh a subscription receives a 404, 405, 537 410, 416, 480-485, 489, 501, or 604 response, the subscriber should 538 consider the subscription terminated. (See [RFC5057] for further 539 details and notes about the effect of error codes on dialogs and 540 usages within dialog, such as subscriptions). If the subscriber 541 wishes to re-subscribe to the state, he does so by composing an 542 unrelated initial SUBSCRIBE request with a freshly-generated Call-ID 543 and a new, unique "From" tag (see Section 4.1.2.1.) 545 If a SUBSCRIBE request to refresh a subscription fails with any error 546 code other than those listed above, the original subscription is 547 still considered valid for the duration of the most recently known 548 "Expires" value as negotiated by SUBSCRIBE and its response, or as 549 communicated by NOTIFY in the "Subscription-State" header field 550 "expires" parameter. 552 Note that many such errors indicate that there may be a problem 553 with the network or the notifier such that no further NOTIFY 554 messages will be received. 556 4.1.2.3. Unsubscribing 558 Unsubscribing is handled in the same way as refreshing of a 559 subscription, with the "Expires" header field set to "0". Note that 560 a successful unsubscription will also trigger a final NOTIFY message. 562 The final NOTIFY may or may not contain information about the state 563 of the resource; subscribers need to be prepared to receive final 564 NOTIFY messages both with and without state. 566 4.1.2.4. Confirmation of Subscription Creation 568 The subscriber can expect to receive a NOTIFY message from each node 569 which has processed a successful subscription or subscription 570 refresh. To ensure that subscribers do not wait indefinitely for a 571 subscription to be established, a subscriber starts a Timer L, set to 572 64*T1. If this Timer L expires prior to the receipt of a NOTIFY 573 message, the subscriber considers the subscription failed, and cleans 574 up any state associated with the subscription attempt. 576 Until Timer L expires, several NOTIFY messages may arrive from 577 different destinations (see Section 4.4.1). Each of these messages 578 establish a new dialog and a new subscription. After the expiration 579 of Timer L, the subscriber SHOULD reject any such NOTIFY messages 580 that would otherwise establish a new dialog with a "481" response 581 code. 583 Until the first NOTIFY message arrives, the subscriber should 584 consider the state of the subscribed resource to be in a neutral 585 state. Documents which define new event packages MUST define this 586 "neutral state" in such a way that makes sense for their application 587 (see Section 5.4.7). 589 Due to the potential for both out-of-order messages and forking, the 590 subscriber MUST be prepared to receive NOTIFY messages before the 591 SUBSCRIBE transaction has completed. 593 Except as noted above, processing of this NOTIFY is the same as in 594 Section 4.1.3. 596 4.1.3. Receiving and Processing State Information 598 Subscribers receive information about the state of a resource to 599 which they have subscribed in the form of NOTIFY requests. 601 Upon receiving a NOTIFY request, the subscriber should check that it 602 matches at least one of its outstanding subscriptions; if not, it 603 MUST return a "481 Subscription does not exist" response unless 604 another 400- or 500-class response is more appropriate. The rules 605 for matching NOTIFY requests with subscriptions that create a new 606 dialog are described in Section 4.4.1. Notifications for 607 subscriptions which were created inside an existing dialog match if 608 they are in the same dialog and the "Event" header fields match (as 609 described in Section 8.2.1). 611 If, for some reason, the event package designated in the "Event" 612 header field of the NOTIFY request is not supported, the subscriber 613 will respond with a "489 Bad Event" response. 615 To prevent spoofing of events, NOTIFY requests SHOULD be 616 authenticated, using any defined SIP authentication mechanism. 618 NOTIFY requests MUST contain "Subscription-State" header fields which 619 indicate the status of the subscription. 621 If the "Subscription-State" header field value is "active", it means 622 that the subscription has been accepted and (in general) has been 623 authorized. If the header field also contains an "expires" 624 parameter, the subscriber SHOULD take it as the authoritative 625 subscription duration and adjust accordingly. The "retry-after" and 626 "reason" parameters have no semantics for "active". 628 If the "Subscription-State" value is "pending", the subscription has 629 been received by the notifier, but there is insufficient policy 630 information to grant or deny the subscription yet. If the header 631 field also contains an "expires" parameter, the subscriber SHOULD 632 take it as the authoritative subscription duration and adjust 633 accordingly. No further action is necessary on the part of the 634 subscriber. The "retry-after" and "reason" parameters have no 635 semantics for "pending". 637 If the "Subscription-State" value is "terminated", the subscriber 638 should consider the subscription terminated. The "expires" parameter 639 has no semantics for "terminated" -- notifiers SHOULD NOT include an 640 "expires" parameter on a "Subscription-State" header field with a 641 value of "terminated," and subscribers MUST ignore any such 642 parameter, if present. If a reason code is present, the client 643 should behave as described below. If no reason code or an unknown 644 reason code is present, the client MAY attempt to re-subscribe at any 645 time (unless a "retry-after" parameter is present, in which case the 646 client SHOULD NOT attempt re-subscription until after the number of 647 seconds specified by the "retry-after" parameter). The reason codes 648 defined by this document are: 650 deactivated: The subscription has been terminated, but the 651 subscriber SHOULD retry immediately with a new subscription. One 652 primary use of such a status code is to allow migration of 653 subscriptions between nodes. The "retry-after" parameter has no 654 semantics for "deactivated". 656 probation: The subscription has been terminated, but the client 657 SHOULD retry at some later time. If a "retry-after" parameter is 658 also present, the client SHOULD wait at least the number of 659 seconds specified by that parameter before attempting to re- 660 subscribe. 662 rejected: The subscription has been terminated due to change in 663 authorization policy. Clients SHOULD NOT attempt to re-subscribe. 664 The "retry-after" parameter has no semantics for "rejected". 666 timeout: The subscription has been terminated because it was not 667 refreshed before it expired. Clients MAY re-subscribe 668 immediately. The "retry-after" parameter has no semantics for 669 "timeout". This reason code is also associated with polling of 670 resource state, as detailed in Section 4.4.3 672 giveup: The subscription has been terminated because the notifier 673 could not obtain authorization in a timely fashion. If a "retry- 674 after" parameter is also present, the client SHOULD wait at least 675 the number of seconds specified by that parameter before 676 attempting to re-subscribe; otherwise, the client MAY retry 677 immediately, but will likely get put back into pending state. 679 noresource: The subscription has been terminated because the 680 resource state which was being monitored no longer exists. 681 Clients SHOULD NOT attempt to re-subscribe. The "retry-after" 682 parameter has no semantics for "noresource". 684 invariant: The subscription has been terminated because the resource 685 state is guaranteed not to change for the foreseeable future. 686 This may be the case, for example, when subscribing to the 687 location information of a fixed-location land-line telephone. 688 When using this reason code, notifiers are advised to include a 689 "retry-after" parameter with a large value (for example, 31536000 690 -- or one year) to prevent older, RFC 3265-compliant clients from 691 periodically resubscribing. Clients SHOULD NOT attempt to 692 resubscribe after receiving a reason code of "invariant," 693 regardless of the presence of or value of a "retry-after" 694 parameter. 696 Other specifications may define new reason codes for use with the 697 "Subscription-State" header field. 699 Once the notification is deemed acceptable to the subscriber, the 700 subscriber SHOULD return a 200 response. In general, it is not 701 expected that NOTIFY responses will contain bodies; however, they 702 MAY, if the NOTIFY request contained an "Accept" header field. 704 Other responses defined in SIP [RFC3261] may also be returned, as 705 appropriate. In no case should a NOTIFY transaction extend for any 706 longer than the time necessary for automated processing. In 707 particular, subscribers MUST NOT wait for a user response before 708 returning a final response to a NOTIFY request. 710 4.1.4. Forking of SUBSCRIBE Messages 712 In accordance with the rules for proxying non-INVITE requests as 713 defined in SIP [RFC3261], successful SUBSCRIBE requests will receive 714 only one 200-class response; however, due to forking, the 715 subscription may have been accepted by multiple nodes. The 716 subscriber MUST therefore be prepared to receive NOTIFY requests with 717 "From:" tags which differ from the "To:" tag received in the 718 SUBSCRIBE 200-class response. 720 If multiple NOTIFY messages are received in different dialogs in 721 response to a single SUBSCRIBE message, each dialog represents a 722 different destination to which the SUBSCRIBE request was forked. 723 Subscriber handling in such situations varies by event package; see 724 Section 5.4.9 for details. 726 4.2. Notifier Behavior 728 4.2.1. Subscription Establishment and Maintenance 730 Notifiers learn about subscription requests by receiving SUBSCRIBE 731 requests from interested parties. Notifiers MUST NOT create 732 subscriptions except upon receipt of a SUBSCRIBE message. However, 733 for historical reasons, the implicit creation of subscriptions as 734 defined in [RFC3515] is still permitted. 736 [RFC3265] allowed the creation of subscriptions using means other 737 than SUBSCRIBE. The only standardized use of this mechanism is 738 the REFER method [RFC3515]. Implementation experience with REFER 739 has shown that the implicit creation of a subscription has a 740 number of undesirable effects, such as the inability to signal the 741 success of a REFER while signaling a problem with the 742 subscription; and difficulty performing one action without the 743 other. Additionally, the proper exchange of dialog identifiers is 744 difficult without dialog re-use (which has its own set of 745 problems; see Section 4.5). 747 4.2.1.1. Initial SUBSCRIBE Transaction Processing 749 In no case should a SUBSCRIBE transaction extend for any longer than 750 the time necessary for automated processing. In particular, 751 notifiers MUST NOT wait for a user response before returning a final 752 response to a SUBSCRIBE request. 754 This requirement is imposed primarily to prevent the non-INVITE 755 transaction timeout timer F (see [RFC3261]) from firing during the 756 SUBSCRIBE transaction, since interaction with a user would often 757 exceed 64*T1 seconds. 759 The notifier SHOULD check that the event package specified in the 760 "Event" header field is understood. If not, the notifier SHOULD 761 return a "489 Bad Event" response to indicate that the specified 762 event/event class is not understood. 764 The notifier SHOULD also perform any necessary authentication and 765 authorization per its local policy. See Section 4.2.1.3. 767 The notifier MAY also check that the duration in the "Expires" header 768 field is not too small. If and only if the expiration interval is 769 greater than zero AND smaller than one hour AND less than a notifier- 770 configured minimum, the notifier MAY return a "423 Interval Too 771 Brief" error which contains a "Min-Expires" header field field. The 772 "Min-Expires" header field is described in SIP [RFC3261]. 774 If the notifier is able to immediately determine that it understands 775 the event package, that the authenticated subscriber is authorized to 776 subscribe, and that there are no other barriers to creating the 777 subscription, it creates the subscription and a dialog (if 778 necessary), and returns a "200 OK" response (unless doing so would 779 reveal authorization policy in an undesirable fashion; see 780 Section 6.2). 782 If the notifier cannot immediately create the subscription (e.g., it 783 needs to wait for user input for authorization, or is acting for 784 another node which is not currently reachable), or wishes to mask 785 authorization policy, it will return a "202 Accepted" response. This 786 response indicates that the request has been received and understood, 787 but does not necessarily imply that the subscription has been 788 authorized yet. 790 When a subscription is created in the notifier, it stores the event 791 package name as part of the subscription information. 793 The "Expires" values present in SUBSCRIBE 200-class responses behave 794 in the same way as they do in REGISTER responses: the server MAY 795 shorten the interval, but MUST NOT lengthen it. 797 If the duration specified in a SUBSCRIBE message is unacceptably 798 short, the notifier may be able to send a 423 response, as 799 described earlier in this section. 801 200-class responses to SUBSCRIBE requests will not generally contain 802 any useful information beyond subscription duration; their primary 803 purpose is to serve as a reliability mechanism. State information 804 will be communicated via a subsequent NOTIFY request from the 805 notifier. 807 The other response codes defined in SIP [RFC3261] may be used in 808 response to SUBSCRIBE requests, as appropriate. 810 4.2.1.2. Confirmation of Subscription Creation/Refreshing 812 Upon successfully accepting or refreshing a subscription, notifiers 813 MUST send a NOTIFY message immediately to communicate the current 814 resource state to the subscriber. This NOTIFY message is sent on the 815 same dialog as created by the SUBSCRIBE response. If the resource 816 has no meaningful state at the time that the SUBSCRIBE message is 817 processed, this NOTIFY message MAY contain an empty or neutral body. 818 See Section 4.2.2 for further details on NOTIFY message generation. 820 Note that a NOTIFY message is always sent immediately after any 200- 821 class response to a SUBSCRIBE request, regardless of whether the 822 subscription has already been authorized. 824 4.2.1.3. Authentication/Authorization of SUBSCRIBE requests 826 Privacy concerns may require that notifiers apply policy to determine 827 whether a particular subscriber is authorized to subscribe to a 828 certain set of events. Such policy may be defined by mechanisms such 829 as access control lists or real-time interaction with a user. In 830 general, authorization of subscribers prior to authentication is not 831 particularly useful. 833 SIP authentication mechanisms are discussed in SIP [RFC3261]. Note 834 that, even if the notifier node typically acts as a proxy, 835 authentication for SUBSCRIBE requests will always be performed via a 836 "401" response, not a "407;" notifiers always act as a user agents 837 when accepting subscriptions and sending notifications. 839 Of course, when acting as a proxy, a node will perform normal 840 proxy authentication (using 407). The foregoing explanation is a 841 reminder that notifiers are always UAs, and as such perform UA 842 authentication. 844 If authorization fails based on an access list or some other 845 automated mechanism (i.e., it can be automatically authoritatively 846 determined that the subscriber is not authorized to subscribe), the 847 notifier SHOULD reply to the request with a "403 Forbidden" or "603 848 Decline" response, unless doing so might reveal information that 849 should stay private; see Section 6.2. 851 If the notifier owner is interactively queried to determine whether a 852 subscription is allowed, a "202 Accept" response is returned 853 immediately. Note that a NOTIFY message is still formed and sent 854 under these circumstances, as described in the previous section. 856 If subscription authorization was delayed and the notifier wishes to 857 convey that such authorization has been declined, it may do so by 858 sending a NOTIFY message containing a "Subscription-State" header 859 field with a value of "terminated" and a reason parameter of 860 "rejected". 862 4.2.1.4. Refreshing of Subscriptions 864 When a notifier receives a subscription refresh, assuming that the 865 subscriber is still authorized, the notifier updates the expiration 866 time for subscription. As with the initial subscription, the server 867 MAY shorten the amount of time until expiration, but MUST NOT 868 increase it. The final expiration time is placed in the "Expires" 869 header field in the response. If the duration specified in a 870 SUBSCRIBE message is unacceptably short, the notifier SHOULD respond 871 with a "423 Interval Too Brief" message. 873 If no refresh for a notification address is received before its 874 expiration time, the subscription is removed. When removing a 875 subscription, the notifier SHOULD send a NOTIFY message with a 876 "Subscription-State" value of "terminated" to inform it that the 877 subscription is being removed. If such a message is sent, the 878 "Subscription-State" header field SHOULD contain a "reason=timeout" 879 parameter. 881 Clients can cause a subscription to be terminated immediately by 882 sending a SUBSCRIBE with an "Expires" header field set to '0'. 883 Notifiers largely treat this the same way as any other subscription 884 expiration: they send a NOTIFY message containing a "Subscription- 885 State" of "terminated", with a reason code of "timeout." For 886 consistency with state polling (see Section 4.4.3) and subscription 887 refreshes, the notifier may choose to include resource state in this 888 final NOTIFY. However, in some cases, including such state makes no 889 sense. Under such circumstances, the notifier may choose to omit 890 state information from the terminal NOTIFY message. 892 The sending of a NOTIFY when a subscription expires allows the 893 corresponding dialog to be terminated, if appropriate. 895 4.2.2. Sending State Information to Subscribers 897 Notifiers use the NOTIFY method to send information about the state 898 of a resource to subscribers. The notifier's view of a subscription 899 is shown in the following state diagram: 901 +-------------+ 902 | init | 903 +-------------+ 904 | 905 Receive SUBSCRIBE, 906 Send NOTIFY 907 | 908 V NOTIFY failure, 909 +-------------+ subscription expires, 910 +------------| resp_wait |-- or terminated ----+ 911 | +-------------+ per local policy | 912 | | | 913 | | | 914 | | V 915 Policy grants Policy needed +-------------+ 916 permission | | terminated | 917 | | +-------------+ 918 | | A A 919 | V NOTIFY failure, | | 920 | +-------------+ subscription expires,| | 921 | | pending |-- or terminated -------+ | 922 | +-------------+ per local policy | 923 | | | 924 | Policy changed to | 925 | grant permission | 926 | | | 927 | V NOTIFY failure, | 928 | +-------------+ subscription expires, | 929 +----------->| active |-- or terminated ---------+ 930 +-------------+ per local policy 932 When a SUBSCRIBE request is answered with a 200-class response, the 933 notifier MUST immediately construct and send a NOTIFY request to the 934 subscriber. When a change in the subscribed state occurs, the 935 notifier SHOULD immediately construct and send a NOTIFY request, 936 subject to authorization, local policy, and throttling 937 considerations. 939 If the NOTIFY request fails due to expiration of SIP Timer F 940 (transaction timeout), the notifier SHOULD remove the subscription. 942 This behavior prevents unnecessary transmission of state 943 information for subscribers who have crashed or disappeared from 944 the network. Because such transmissions will be sent multiple 945 times, per the retransmission algorithm defined in SIP [RFC3261] 946 (instead of the typical single transmission for functioning 947 clients), continuing to service them when no client is available 948 to acknowledge them could place undue strain on a network. Upon 949 client restart or reestablishment of a network connection, it is 950 expected that clients will send SUBSCRIBE messages to refresh 951 potentially stale state information; such messages will re-install 952 subscriptions in all relevant nodes. 954 If the NOTIFY transaction fails due to the receipt of a 404, 405, 955 410, 416, 480-485, 489, 501, or 604 response to the NOTIFY, the 956 notifier MUST remove the corresponding subscription. See [RFC5057] 957 for further details and notes about the effect of error codes on 958 dialogs and usages within dialog (such as subscriptions). 960 A notify error response would generally indicate that something 961 has gone wrong with the subscriber or with some proxy on the way 962 to the subscriber. If the subscriber is in error, it makes the 963 most sense to allow the subscriber to rectify the situation (by 964 re-subscribing) once the error condition has been handled. If a 965 proxy is in error, the periodic SUBSCRIBE refreshes will re- 966 install subscription state once the network problem has been 967 resolved. 969 NOTIFY requests MUST contain a "Subscription-State" header field with 970 a value of "active", "pending", or "terminated". The "active" value 971 indicates that the subscription has been accepted and has been 972 authorized (in most cases; see Section 6.2). The "pending" value 973 indicates that the subscription has been received, but that policy 974 information is insufficient to accept or deny the subscription at 975 this time. The "terminated" value indicates that the subscription is 976 not active. 978 If the value of the "Subscription-State" header field is "active" or 979 "pending", the notifier MUST also include in the "Subscription-State" 980 header field an "expires" parameter which indicates the time 981 remaining on the subscription. The notifier MAY use this mechanism 982 to shorten a subscription; however, this mechanism MUST NOT be used 983 to lengthen a subscription. 985 Including expiration information for active and pending 986 subscriptions is necessary in case the SUBSCRIBE request forks, 987 since the response to a forked SUBSCRIBE may not be received by 988 the subscriber. [RFC3265] allowed the notifier some discretion in 989 the inclusion of this parameter, so subscriber implementations are 990 warned to handle the lack of an "expires" parameter gracefully. 991 Note well that this "expires" value is a parameter on the 992 "Subscription-State" header field, NOT an "Expires" header field. 994 The period of time for a subscription can be shortened to zero by 995 the notifier. In other words, it is perfectly valid for a 996 SUBSCRIBE with a non-zero expires to be answered with a NOTIFY 997 that contains "Subscription-Status: terminated;reason=expired". 998 This merely means that the notifier has shortened the subscription 999 timeout to zero, and the subscription has expired instantaneously. 1000 The body may contain valid state, or it may contain a neutral 1001 state (see Section 5.4.7). 1003 If the value of the "Subscription-State" header field is 1004 "terminated", the notifier SHOULD also include a "reason" parameter. 1005 The notifier MAY also include a "retry-after" parameter, where 1006 appropriate. For details on the value and semantics of the "reason" 1007 and "retry-after" parameters, see Section 4.1.3. 1009 4.2.3. PINT Compatibility 1011 The "Event" header field is considered mandatory for the purposes of 1012 this document. However, to maintain compatibility with PINT (see 1013 [RFC2848]), notifiers MAY interpret a SUBSCRIBE request with no 1014 "Event" header field as requesting a subscription to PINT events. If 1015 a notifier does not support PINT, it SHOULD return "489 Bad Event" to 1016 any SUBSCRIBE messages without an "Event" header field. 1018 4.3. Proxy Behavior 1020 Proxies need no additional behavior beyond that described in SIP 1021 [RFC3261] to support SUBSCRIBE and NOTIFY. If a proxy wishes to see 1022 all of the SUBSCRIBE and NOTIFY requests for a given dialog, it MUST 1023 add a Record-Route header field to the initial SUBSCRIBE request and 1024 all NOTIFY requests. It MAY choose to include Record-Route in 1025 subsequent SUBSCRIBE messages; however, these requests cannot cause 1026 the dialog's route set to be modified. 1028 Note that subscribers and notifiers may elect to use S/MIME 1029 encryption of SUBSCRIBE and NOTIFY requests; consequently, proxies 1030 cannot rely on being able to access any information that is not 1031 explicitly required to be proxy-readable by SIP [RFC3261]. 1033 4.4. Common Behavior 1035 4.4.1. Dialog Creation and Termination 1037 Dialogs are created upon completion of a NOTIFY transaction for a new 1038 subscription, unless the NOTIFY contains a "Subscription-State" of 1039 "terminated." 1041 NOTIFY requests are matched to such SUBSCRIBE requests if they 1042 contain the same "Call-ID", a "To" header field "tag" parameter which 1043 matches the "From" header field "tag" parameter of the SUBSCRIBE, and 1044 the same "Event" header field. Rules for comparisons of the "Event" 1045 header fields are described in Section 8.2.1. 1047 A subscription is destroyed after a notifier sends a NOTIFY request 1048 with a "Subscription-State" of "terminated." The subscriber will 1049 generally answer such final requests with a "200 OK" response (unless 1050 a condition warranting an alternate response has arisen). Except 1051 when the mechanism described in Section 4.5.2 is used, the 1052 destruction of a subscription results in the termination of its 1053 associated dialog. 1055 A subscriber may send a SUBSCRIBE request with an "Expires" header 1056 field of 0 in order to trigger the sending of such a NOTIFY 1057 request; however, for the purposes of subscription and dialog 1058 lifetime, the subscription is not considered terminated until the 1059 NOTIFY transaction with a "Subscription-State" of "terminated" 1060 completes. 1062 4.4.2. Notifier Migration 1064 It is often useful to allow migration of subscriptions between 1065 notifiers. Such migration may be effected by sending a NOTIFY 1066 message with a "Subscription-State" header field of "terminated", and 1067 a reason parameter of "deactivated". This NOTIFY request is 1068 otherwise normal, and is formed as described in Section 4.2.2. 1070 Upon receipt of this NOTIFY message, the subscriber SHOULD attempt to 1071 re-subscribe (as described in the preceding sections). Note that 1072 this subscription is established on a new dialog, and does not re-use 1073 the route set from the previous subscription dialog. 1075 The actual migration is effected by making a change to the policy 1076 (such as routing decisions) of one or more servers to which the 1077 SUBSCRIBE request will be sent in such a way that a different node 1078 ends up responding to the SUBSCRIBE request. This may be as simple 1079 as a change in the local policy in the notifier from which the 1080 subscription is migrating so that it serves as a proxy or redirect 1081 server instead of a notifier. 1083 Whether, when, and why to perform notifier migrations may be 1084 described in individual event packages; otherwise, such decisions are 1085 a matter of local notifier policy, and are left up to individual 1086 implementations. 1088 4.4.3. Polling Resource State 1090 A natural consequence of the behavior described in the preceding 1091 sections is that an immediate fetch without a persistent subscription 1092 may be effected by sending a SUBSCRIBE with an "Expires" of 0. 1094 Of course, an immediate fetch while a subscription is active may be 1095 effected by sending a SUBSCRIBE with an "Expires" equal to the number 1096 of seconds remaining in the subscription. 1098 Upon receipt of this SUBSCRIBE request, the notifier (or notifiers, 1099 if the SUBSCRIBE request was forked) will send a NOTIFY request 1100 containing resource state in the same dialog. 1102 Note that the NOTIFY messages triggered by SUBSCRIBE messages with 1103 "Expires" header fields of 0 will contain a "Subscription-State" 1104 value of "terminated", and a "reason" parameter of "timeout". 1106 Polling of event state can cause significant increases in load on the 1107 network and notifiers; as such, it should be used only sparingly. In 1108 particular, polling SHOULD NOT be used in circumstances in which it 1109 will typically result in more network messages than long-running 1110 subscriptions. 1112 When polling is used, subscribers SHOULD attempt to cache 1113 authentication credentials between polls so as to reduce the number 1114 of messages sent. 1116 4.4.4. Allow-Events header field usage 1118 The "Allow-Events" header field, if present, includes a list of 1119 tokens which indicates the event packages supported by a notifier. 1120 In other words, a user agent sending an "Allow-Events" header field 1121 is advertising that it can process SUBSCRIBE requests and generate 1122 NOTIFY requests for all of the event packages listed in that header 1123 field. 1125 Any user agent that can act as a notifier for one or more event 1126 packages SHOULD include an appropriate "Allow-Events" header field 1127 indicating all supported events in all methods which initiate dialogs 1128 and their responses (such as INVITE) and OPTIONS responses. 1130 This information is very useful, for example, in allowing user 1131 agents to render particular interface elements appropriately 1132 according to whether the events required to implement the features 1133 they represent are supported by the appropriate nodes. 1134 On the other hand, it doesn't necessarily make much sense to 1135 indicate supported events inside a NOTIFY-established dialog if 1136 the only event package supported is the one associated with that 1137 subscription. 1139 Note that "Allow-Events" header fields MUST NOT be inserted by 1140 proxies. 1142 4.5. Targeting Subscriptions at Devices 1144 [RFC3265] defined a mechanism by which subscriptions could share 1145 dialogs with invite usages and with other subscriptions. The purpose 1146 of this behavior was to allow subscribers to ensure that a 1147 subscription arrived at the same device as an established dialog. 1148 Unfortunately, the re-use of dialogs has proven to be exceedingly 1149 confusing. [RFC5057] attempted to clarify proper behavior in a 1150 variety of circumstances; however, the ensuing rules remain confusing 1151 and prone to implementation error. At the same time, the mechanism 1152 described in [I-D.ietf-sip-gruu] now provides a far more elegant and 1153 unambiguous means to achieve the same goal. 1155 Consequently, the dialog re-use technique described in RFC 3265 is 1156 now deprecated. 1158 4.5.1. Using GRUUs to Route to Devices 1160 Notifiers MUST implement the GRUU extension defined in 1161 [I-D.ietf-sip-gruu], and MUST use a GRUU as their local target. This 1162 allows subscribers to explicitly target desired devices. 1164 If a subscriber wishes to subscribe to a resource on the same device 1165 as an established dialog, it should check whether the remote contact 1166 in that dialog is a GRUU (i.e., whether it contains a "gr" URI 1167 parameter). If so, the subscriber creates a new dialog, using the 1168 GRUU as the request URI for the new SUBSCRIBE. 1170 Because GRUUs are guaranteed to route to a a specific device, this 1171 ensures that the subscription will be routed to the same place as 1172 the established dialog. 1174 4.5.2. Sharing Dialogs 1176 For compatibility with older clients, subscriber and notifier 1177 implementations may choose to allow dialog sharing. The behavior of 1178 multiple usages within a dialog are described in [RFC5057]. 1180 Subscribers MUST NOT attempt to re-use dialogs whose remote target is 1181 a GRUU. 1183 Note that the techniques described in this section are included 1184 for backwards compatibility purposes only. Because subscribers 1185 cannot re-use dialogs with a GRUU for their remote target, and 1186 because notifiers must use GRUUs as their local target, any two 1187 implementations that conform to this specification will 1188 automatically use the mechanism described in Section 4.5.1. 1190 If a subscriber wishes to subscribe to a resource on the same device 1191 as an established dialog and the remote contact is not a GRUU, it MAY 1192 revert to dialog sharing behavior. Alternately, it MAY choose to 1193 treat the remote party as incapable of servicing the subscription 1194 (i.e., the same way it would behave if the remote party did not 1195 support SIP events at all). 1197 If a notifier receives a SUBSCRIBE request for a new subscription on 1198 an existing dialog, it MAY choose to implement dialog sharing 1199 behavior. Alternately, it may choose to fail the SUBSCRIBE request 1200 with a 403 response. The error text of such 403 responses SHOULD 1201 indicate that dialog sharing is not supported. 1203 To implement dialog sharing, subscribers and notifiers perform the 1204 following additional processing: 1206 o When subscriptions exist in dialogs associated with INVITE-created 1207 application state and/or other subscriptions, these sets of 1208 application state do not interact beyond the behavior described 1209 for a dialog (e.g., route set handling). In particular, multiple 1210 subscriptions within a dialog are expire independently, and 1211 require independent SUBSCRIBE refreshes. 1213 o If a subscription's destruction leaves no other application state 1214 associated with the dialog, the dialog terminates. The 1215 destruction of other application state (such as that created by an 1216 INVITE) will not terminate the dialog if a subscription is still 1217 associated with that dialog. This means that, when dialog are re- 1218 used, then a dialog created with an INVITE does not necessarily 1219 terminate upon receipt of a BYE. Similarly, in the case that 1220 several subscriptions are associated with a single dialog, the 1221 dialog does not terminate until all the subscriptions in it are 1222 destroyed. 1224 o Subscribers MAY include an "id" parameter in SUBSCRIBE request 1225 "Event" header field to allow differentiation between multiple 1226 subscriptions in the same dialog. This "id" parameter, if 1227 present, contains an opaque token which identifies the specific 1228 subscription within a dialog. An "id" parameter is only valid 1229 within the scope of a single dialog. 1231 o If an "id" parameter is present in the SUBSCRIBE message used to 1232 establish a subscription, that "id" parameter MUST also be present 1233 in all corresponding NOTIFY messages. 1235 o When a subscriber refreshes a the subscription timer, the 1236 SUBSCRIBE MUST contain the same "Event" header field "id" 1237 parameter as was present in the initial subscription. (Otherwise, 1238 the notifier will interpret the SUBSCRIBE message as a request for 1239 a new subscription in the same dialog). 1241 o When a subscription is created in the notifier, it stores the any 1242 "Event" header field "id" parameter as part of the subscription 1243 information (along with the event package name). 1245 o If an initial SUBSCRIBE is sent on a pre-existing dialog, a 1246 matching NOTIFY request merely creates a new subscription 1247 associated with that dialog. 1249 4.6. CANCEL Requests for SUBSCRIBE and NOTIFY 1251 Neither SUBSCRIBE nor NOTIFY messages can be canceled. If a UAS 1252 receives a CANCEL request that matches a known SUBSCRIBE or NOTIFY 1253 transaction, it MUST respond to the CANCEL request, but otherwise 1254 ignore it. In particular, the CANCEL request MUST NOT affect 1255 processing of the SUBSCRIBE or NOTIFY request in any way. 1257 UACs SHOULD NOT send CANCEL requests for SUBSCRIBE or NOTIFY 1258 transactions. 1260 5. Event Packages 1262 This section covers several issues which should be taken into 1263 consideration when event packages based on SUBSCRIBE and NOTIFY are 1264 proposed. Event package definitions contain sections addressing each 1265 of these issues, ideally in the same order and with the same titles 1266 as the following sections. 1268 5.1. Appropriateness of Usage 1270 When designing an event package using the methods described in this 1271 document for event notification, it is important to consider: is SIP 1272 an appropriate mechanism for the problem set? Is SIP being selected 1273 because of some unique feature provided by the protocol (e.g., user 1274 mobility), or merely because "it can be done?" If you find yourself 1275 defining event packages for notifications related to, for example, 1276 network management or the temperature inside your car's engine, you 1277 may want to reconsider your selection of protocols. 1279 Those interested in extending the mechanism defined in this 1280 document are urged to follow the development of "Guidelines for 1281 Authors of SIP Extensions" [RFC4485] for further guidance 1282 regarding appropriate uses of SIP. 1284 Further, it is expected that this mechanism is not to be used in 1285 applications where the frequency of reportable events is excessively 1286 rapid (e.g., more than about once per second). A SIP network is 1287 generally going to be provisioned for a reasonable signaling volume; 1288 sending a notification every time a user's GPS position changes by 1289 one hundredth of a second could easily overload such a network. 1291 5.2. Event Template-packages 1293 Normal event packages define a set of state applied to a specific 1294 type of resource, such as user presence, call state, and messaging 1295 mailbox state. 1297 Event template-packages are a special type of package which define a 1298 set of state applied to other packages, such as statistics, access 1299 policy, and subscriber lists. Event template-packages may even be 1300 applied to other event template-packages. 1302 To extend the object-oriented analogy made earlier, event template- 1303 packages can be thought of as templatized C++ packages which must be 1304 applied to other packages to be useful. 1306 The name of an event template-package as applied to a package is 1307 formed by appending a period followed by the event template-package 1308 name to the end of the package. For example, if a template-package 1309 called "winfo" were being applied to a package called "presence", the 1310 event token used in "Event" and "Allow-Events" would be 1311 "presence.winfo". 1313 Event template-packages must be defined so that they can be applied 1314 to any arbitrary package. In other words, event template-packages 1315 cannot be specifically tied to one or a few "parent" packages in such 1316 a way that they will not work with other packages. 1318 5.3. Amount of State to be Conveyed 1320 When designing event packages, it is important to consider the type 1321 of information which will be conveyed during a notification. 1323 A natural temptation is to convey merely the event (e.g., "a new 1324 voice message just arrived") without accompanying state (e.g., "7 1325 total voice messages"). This complicates implementation of 1326 subscribing entities (since they have to maintain complete state for 1327 the entity to which they have subscribed), and also is particularly 1328 susceptible to synchronization problems. 1330 There are two possible solutions to this problem that event packages 1331 may choose to implement. 1333 5.3.1. Complete State Information 1335 For packages which typically convey state information that is 1336 reasonably small (on the order of 1 KB or so), it is suggested that 1337 event packages are designed so as to send complete state information 1338 when an event occurs. 1340 In some circumstances, conveying the current state alone may be 1341 insufficient for a particular class of events. In these cases, the 1342 event packages should include complete state information along with 1343 the event that occurred. For example, conveying "no customer service 1344 representatives available" may not be as useful as conveying "no 1345 customer service representatives available; representative 1346 sip:46@cs.xyz.int just logged off". 1348 5.3.2. State Deltas 1350 In the case that the state information to be conveyed is large, the 1351 event package may choose to detail a scheme by which NOTIFY messages 1352 contain state deltas instead of complete state. 1354 Such a scheme would work as follows: any NOTIFY sent in immediate 1355 response to a SUBSCRIBE contains full state information. NOTIFY 1356 messages sent because of a state change will contain only the state 1357 information that has changed; the subscriber will then merge this 1358 information into its current knowledge about the state of the 1359 resource. 1361 Any event package that supports delta changes to states MUST include 1362 a version number that increases by exactly one for each NOTIFY 1363 transaction in a subscription. Note that the state version number 1364 appears in the body of the message, not in a SIP header field. 1366 If a NOTIFY arrives that has a version number that is incremented by 1367 more than one, the subscriber knows that a state delta has been 1368 missed; it ignores the NOTIFY message containing the state delta 1369 (except for the version number, which it retains to detect message 1370 loss), and re-sends a SUBSCRIBE to force a NOTIFY containing a 1371 complete state snapshot. 1373 5.4. Event Package Responsibilities 1375 Event packages are not required to reiterate any of the behavior 1376 described in this document, although they may choose to do so for 1377 clarity or emphasis. In general, though, such packages are expected 1378 to describe only the behavior that extends or modifies the behavior 1379 described in this document. 1381 Note that any behavior designated with "SHOULD" or "MUST" in this 1382 document is not allowed to be weakened by extension documents; 1383 however, such documents may elect to strengthen "SHOULD" requirements 1384 to "MUST" strength if required by their application. 1386 In addition to the normal sections expected in standards-track 1387 RFCs and SIP extension documents, authors of event packages need 1388 to address each of the issues detailed in the following 1389 subsections, whenever applicable. 1391 5.4.1. Event Package Name 1393 This section, which MUST be present, defines the token name to be 1394 used to designate the event package. It MUST include the information 1395 which appears in the IANA registration of the token. For information 1396 on registering such types, see Section 7. 1398 5.4.2. Event Package Parameters 1400 If parameters are to be used on the "Event" header field to modify 1401 the behavior of the event package, the syntax and semantics of such 1402 header fields MUST be clearly defined. 1404 5.4.3. SUBSCRIBE Bodies 1406 It is expected that most, but not all, event packages will define 1407 syntax and semantics for SUBSCRIBE method bodies; these bodies will 1408 typically modify, expand, filter, throttle, and/or set thresholds for 1409 the class of events being requested. Designers of event packages are 1410 strongly encouraged to re-use existing MIME types for message bodies 1411 where practical. 1413 This mandatory section of an event package defines what type or types 1414 of event bodies are expected in SUBSCRIBE requests (or specify that 1415 no event bodies are expected). It should point to detailed 1416 definitions of syntax and semantics for all referenced body types. 1418 5.4.4. Subscription Duration 1420 It is RECOMMENDED that event packages give a suggested range of times 1421 considered reasonable for the duration of a subscription. Such 1422 packages MUST also define a default "Expires" value to be used if 1423 none is specified. 1425 5.4.5. NOTIFY Bodies 1427 The NOTIFY body is used to report state on the resource being 1428 monitored. Each package MUST define what type or types of event 1429 bodies are expected in NOTIFY requests. Such packages MUST specify 1430 or cite detailed specifications for the syntax and semantics 1431 associated with such event body. 1433 Event packages also MUST define which MIME type is to be assumed if 1434 none are specified in the "Accept" header field of the SUBSCRIBE 1435 request. 1437 5.4.6. Notifier processing of SUBSCRIBE requests 1439 This section describes the processing to be performed by the notifier 1440 upon receipt of a SUBSCRIBE request. Such a section is required. 1442 Information in this section includes details of how to authenticate 1443 subscribers and authorization issues for the package. Such 1444 authorization issues may include, for example, whether all SUBSCRIBE 1445 requests for this package are answered with 202 responses (see 1446 Section 6.2). 1448 5.4.7. Notifier generation of NOTIFY requests 1450 This section of an event package describes the process by which the 1451 notifier generates and sends a NOTIFY request. This includes 1452 detailed information about what events cause a NOTIFY to be sent, how 1453 to compute the state information in the NOTIFY, how to generate 1454 neutral or fake state information to hide authorization delays and 1455 decisions from users, and whether state information is complete or 1456 deltas for notifications; see Section 5.3. Such a section is 1457 required. 1459 This section may optionally describe the behavior used to process the 1460 subsequent response. 1462 5.4.8. Subscriber processing of NOTIFY requests 1464 This section of an event package describes the process followed by 1465 the subscriber upon receipt of a NOTIFY request, including any logic 1466 required to form a coherent resource state (if applicable). 1468 5.4.9. Handling of forked requests 1470 Each event package MUST specify whether forked SUBSCRIBE requests are 1471 allowed to install multiple subscriptions. 1473 If such behavior is not allowed, the first potential dialog- 1474 establishing message will create a dialog. All subsequent NOTIFY 1475 messages which correspond to the SUBSCRIBE message (i.e., match "To", 1476 "From", "From" header field "tag" parameter, "Call-ID", "Event", and 1477 "Event" header field "id" parameter) but which do not match the 1478 dialog would be rejected with a 481 response. Note that the 200- 1479 class response to the SUBSCRIBE can arrive after a matching NOTIFY 1480 has been received; such responses might not correlate to the same 1481 dialog established by the NOTIFY. Except as required to complete the 1482 SUBSCRIBE transaction, such non-matching 200-class responses are 1483 ignored. 1485 If installing of multiple subscriptions by way of a single forked 1486 SUBSCRIBE is allowed, the subscriber establishes a new dialog towards 1487 each notifier by returning a 200-class response to each NOTIFY. Each 1488 dialog is then handled as its own entity, and is refreshed 1489 independent of the other dialogs. 1491 In the case that multiple subscriptions are allowed, the event 1492 package MUST specify whether merging of the notifications to form a 1493 single state is required, and how such merging is to be performed. 1494 Note that it is possible that some event packages may be defined in 1495 such a way that each dialog is tied to a mutually exclusive state 1496 which is unaffected by the other dialogs; this MUST be clearly stated 1497 if it is the case. 1499 5.4.10. Rate of notifications 1501 Each event package is expected to define a requirement (SHOULD or 1502 MUST strength) which defines an absolute maximum on the rate at which 1503 notifications are allowed to be generated by a single notifier. 1505 Each package MAY further define a throttle mechanism which allows 1506 subscribers to further limit the rate of notification. 1508 5.4.11. State Aggregation 1510 Many event packages inherently work by collecting information about a 1511 resource from a number of other sources -- either through the use of 1512 PUBLISH [RFC3903], by subscribing to state information, or through 1513 other state gathering mechanisms. 1515 Event packages that involve retrieval of state information for a 1516 single resource from more than one source need to consider how 1517 notifiers aggregate information into a single, coherent state. Such 1518 packages MUST specify how notifiers aggregate information and how 1519 they provide authentication and authorization. 1521 5.4.12. Examples 1523 Event packages SHOULD include several demonstrative message flow 1524 diagrams paired with several typical, syntactically correct, and 1525 complete messages. 1527 It is RECOMMENDED that documents describing event packages clearly 1528 indicate that such examples are informative and not normative, with 1529 instructions that implementors refer to the main text of the document 1530 for exact protocol details. 1532 5.4.13. Use of URIs to Retrieve State 1534 Some types of event packages may define state information which is 1535 potentially too large to reasonably send in a SIP message. To 1536 alleviate this problem, event packages may include the ability to 1537 convey a URI instead of state information; this URI will then be used 1538 to retrieve the actual state information. 1540 [RFC4483] defines a mechanism that can be used by event packages to 1541 convey information in such a fashion. 1543 6. Security Considerations 1545 6.1. Access Control 1547 The ability to accept subscriptions should be under the direct 1548 control of the notifier's user, since many types of events may be 1549 considered sensitive for the purposes of privacy. Similarly, the 1550 notifier should have the ability to selectively reject subscriptions 1551 based on the subscriber identity (based on access control lists), 1552 using standard SIP authentication mechanisms. The methods for 1553 creation and distribution of such access control lists is outside the 1554 scope of this document. 1556 6.2. Notifier Privacy Mechanism 1558 The mere act of returning a 200 or certain 4xx and 6xx responses to 1559 SUBSCRIBE requests may, under certain circumstances, create privacy 1560 concerns by revealing sensitive policy information. In these cases, 1561 the notifier SHOULD always return a 202 response. While the 1562 subsequent NOTIFY message may not convey true state, it MUST appear 1563 to contain a potentially correct piece of data from the point of view 1564 of the subscriber, indistinguishable from a valid response. 1565 Information about whether a user is authorized to subscribe to the 1566 requested state is never conveyed back to the original user under 1567 these circumstances. 1569 Individual packages and their related documents for which such a mode 1570 of operation makes sense can further describe how and why to generate 1571 such potentially correct data. For example, such a mode of operation 1572 is mandated by [RFC2779] for user presence information. 1574 6.3. Denial-of-Service attacks 1576 The current model (one SUBSCRIBE request triggers a SUBSCRIBE 1577 response and one or more NOTIFY requests) is a classic setup for an 1578 amplifier node to be used in a smurf attack. 1580 Also, the creation of state upon receipt of a SUBSCRIBE request can 1581 be used by attackers to consume resources on a victim's machine, 1582 rendering it unusable. 1584 To reduce the chances of such an attack, implementations of notifiers 1585 SHOULD require authentication. Authentication issues are discussed 1586 in SIP [RFC3261]. 1588 6.4. Replay Attacks 1590 Replaying of either SUBSCRIBE or NOTIFY can have detrimental effects. 1592 In the case of SUBSCRIBE messages, attackers may be able to install 1593 any arbitrary subscription which it witnessed being installed at some 1594 point in the past. Replaying of NOTIFY messages may be used to spoof 1595 old state information (although a good versioning mechanism in the 1596 body of the NOTIFY messages may help mitigate such an attack). Note 1597 that the prohibition on sending NOTIFY messages to nodes which have 1598 not subscribed to an event also aids in mitigating the effects of 1599 such an attack. 1601 To prevent such attacks, implementations SHOULD require 1602 authentication with anti-replay protection. Authentication issues 1603 are discussed in SIP [RFC3261]. 1605 6.5. Man-in-the middle attacks 1607 Even with authentication, man-in-the-middle attacks using SUBSCRIBE 1608 may be used to install arbitrary subscriptions, hijack existing 1609 subscriptions, terminate outstanding subscriptions, or modify the 1610 resource to which a subscription is being made. To prevent such 1611 attacks, implementations SHOULD provide integrity protection across 1612 "Contact", "Route", "Expires", "Event", and "To" header fields of 1613 SUBSCRIBE messages, at a minimum. If SUBSCRIBE bodies are used to 1614 define further information about the state of the call, they SHOULD 1615 be included in the integrity protection scheme. 1617 Man-in-the-middle attacks may also attempt to use NOTIFY messages to 1618 spoof arbitrary state information and/or terminate outstanding 1619 subscriptions. To prevent such attacks, implementations SHOULD 1620 provide integrity protection across the "Call-ID", "CSeq", and 1621 "Subscription-State" header fields and the bodies of NOTIFY messages. 1623 Integrity protection of message header fields and bodies is discussed 1624 in SIP [RFC3261]. 1626 6.6. Confidentiality 1628 The state information contained in a NOTIFY message has the potential 1629 to contain sensitive information. Implementations MAY encrypt such 1630 information to ensure confidentiality. 1632 While less likely, it is also possible that the information contained 1633 in a SUBSCRIBE message contains information that users might not want 1634 to have revealed. Implementations MAY encrypt such information to 1635 ensure confidentiality. 1637 To allow the remote party to hide information it considers sensitive, 1638 all implementations SHOULD be able to handle encrypted SUBSCRIBE and 1639 NOTIFY messages. 1641 The mechanisms for providing confidentiality are detailed in SIP 1642 [RFC3261]. 1644 7. IANA Considerations 1646 (This section is not applicable until this document is published as 1647 an RFC.) 1649 7.1. Event Packages 1651 This document defines an event-type namespace which requires a 1652 central coordinating body. The body chosen for this coordination is 1653 the Internet Assigned Numbers Authority (IANA). 1655 There are two different types of event-types: normal event packages, 1656 and event template-packages; see Section 5.2. To avoid confusion, 1657 template-package names and package names share the same namespace; in 1658 other words, an event template-package MUST NOT share a name with a 1659 package. 1661 Following the policies outlined in "Guidelines for Writing an IANA 1662 Considerations Section in RFCs" [RFC2434], normal event package 1663 identification tokens are allocated as First Come First Served, and 1664 event template-package identification tokens are allocated on a IETF 1665 Consensus basis. 1667 Registrations with the IANA MUST include the token being registered 1668 and whether the token is a package or a template-package. Further, 1669 packages MUST include contact information for the party responsible 1670 for the registration and/or a published document which describes the 1671 event package. Event template-package token registrations MUST 1672 include a pointer to the published RFC which defines the event 1673 template-package. 1675 Registered tokens to designate packages and template-packages MUST 1676 NOT contain the character ".", which is used to separate template- 1677 packages from packages. 1679 7.1.1. Registration Information 1681 As this document specifies no package or template-package names, the 1682 initial IANA registration for event types will be empty. The 1683 remainder of the text in this section gives an example of the type of 1684 information to be maintained by the IANA; it also demonstrates all 1685 five possible permutations of package type, contact, and reference. 1687 The table below lists the event packages and template-packages 1688 defined in "SIP-Specific Event Notification" [RFC xxxx]. Each name 1689 is designated as a package or a template-package under "Type". 1691 Package Name Type Contact Reference 1692 ------------ ---- ------- --------- 1693 example1 package [Roach] 1694 example2 package [Roach] [RFC xxxx] 1695 example3 package [RFC xxxx] 1696 example4 template [Roach] [RFC xxxx] 1697 example5 template [RFC xxxx] 1699 PEOPLE 1700 ------ 1701 [Roach] Adam Roach 1703 REFERENCES 1704 ---------- 1705 [RFC xxxx] A.B. Roach, "SIP-Specific Event Notification", RFC XXXX, 1706 Monthname 20XX 1708 7.1.2. Registration Template 1710 To: ietf-sip-events@iana.org 1711 Subject: Registration of new SIP event package 1713 Package Name: 1715 (Package names must conform to the syntax described in 1716 Section 8.2.1.) 1718 Is this registration for a Template Package: 1720 (indicate yes or no) 1722 Published Specification(s): 1724 (Template packages require a published RFC. Other packages may 1725 reference a specification when appropriate). 1727 Person & email address to contact for further information: 1729 7.2. Reason Codes 1731 This document further defines "reason" codes for use in the 1732 "Subscription-State" header field (see Section 4.1.3). 1734 Following the policies outlined in "Guidelines for Writing an IANA 1735 Considerations Section in RFCs" [RFC2434], new reason codes require a 1736 Standards Action. 1738 Registrations with the IANA include the reason code being registered 1739 and a reference to a published document which describes the event 1740 package. Insertion of such values takes place as part of the RFC 1741 publication process or as the result of inter-SDO liaison activity. 1742 New reason codes must conform to the syntax of the ABNF "token" 1743 element defined in SIP [RFC3261]. 1745 [RFC4660] defined a new reason code prior to the establishment of an 1746 IANA registry. We include its reason code ("badfilter") in the 1747 initial list of reason codes to ensure a complete registry. 1749 The IANA registry for reason code will be initialized with the 1750 following values: 1752 Reason Code Reference 1753 ----------- --------- 1754 deactivated [RFC xxxx] 1755 probation [RFC xxxx] 1756 rejected [RFC xxxx] 1757 timeout [RFC xxxx] 1758 giveup [RFC xxxx] 1759 noresource [RFC xxxx] 1760 invariant [RFC xxxx] 1761 badfilter [RFC 4660] 1763 REFERENCES 1764 ---------- 1765 [RFC xxxx] A.B. Roach, "SIP-Specific Event Notification", RFC XXXX, 1766 Monthname 20XX 1768 [RFC 4660] Khartabil, H., Leppanen, E., Lonnfors, M., and 1769 J. Costa-Requena, "Functional Description of Event 1770 Notification Filtering", September 2006. 1772 7.3. Header Field Names 1774 This document registers three new header field names, described 1775 elsewhere in this document. These header fields are defined by the 1776 following information, which is to be added to the header field sub- 1777 registry under http://www.iana.org/assignments/sip-parameters. 1779 Header Name: Allow-Events 1780 Compact Form: u 1782 Header Name: Subscription-State 1783 Compact Form: (none) 1785 Header Name: Event 1786 Compact Form: o 1788 7.4. Response Codes 1790 This document registers two new response codes. These response codes 1791 are defined by the following information, which is to be added to the 1792 method and response-code sub-registry under 1793 http://www.iana.org/assignments/sip-parameters. 1795 Response Code Number: 202 1796 Default Reason Phrase: Accepted 1798 Response Code Number: 489 1799 Default Reason Phrase: Bad Event 1801 8. Syntax 1803 This section describes the syntax extensions required for event 1804 notification in SIP. Semantics are described in Section 4. Note 1805 that the formal syntax definitions described in this document are 1806 expressed in the ABNF format used in SIP [RFC3261], and contain 1807 references to elements defined therein. 1809 8.1. New Methods 1811 This document describes two new SIP methods: SUBSCRIBE and NOTIFY. 1813 This table expands on tables 2 and 3 in SIP [RFC3261]. 1815 Header Where SUB NOT 1816 ------ ----- --- --- 1817 Accept R o o 1818 Accept 2xx - - 1819 Accept 415 o o 1820 Accept-Encoding R o o 1821 Accept-Encoding 2xx - - 1822 Accept-Encoding 415 o o 1823 Accept-Language R o o 1824 Accept-Language 2xx - - 1825 Accept-Language 415 o o 1826 Alert-Info R - - 1827 Alert-Info 180 - - 1828 Allow R o o 1829 Allow 2xx o o 1830 Allow r o o 1831 Allow 405 m m 1832 Authentication-Info 2xx o o 1833 Authorization R o o 1834 Call-ID c m m 1835 Contact R m m 1836 Contact 1xx o o 1837 Contact 2xx m o 1838 Contact 3xx m m 1839 Contact 485 o o 1840 Content-Disposition o o 1841 Content-Encoding o o 1842 Content-Language o o 1843 Content-Length t t 1844 Content-Type * * 1845 CSeq c m m 1846 Date o o 1847 Error-Info 300-699 o o 1848 Expires o - 1849 Expires 2xx m - 1850 From c m m 1851 In-Reply-To R - - 1852 Max-Forwards R m m 1853 Min-Expires 423 m - 1854 MIME-Version o o 1855 Organization o - 1856 Priority R o - 1857 Proxy-Authenticate 407 m m 1858 Proxy-Authorization R o o 1859 Proxy-Require R o o 1860 RAck R - - 1861 Record-Route R o o 1862 Record-Route 2xx,401,484 o o 1863 Reply-To - - 1864 Require o o 1865 Retry-After 404,413,480,486 o o 1866 Retry-After 500,503 o o 1867 Retry-After 600,603 o o 1868 Route R c c 1869 RSeq 1xx o o 1870 Server r o o 1871 Subject R - - 1872 Supported R o o 1873 Supported 2xx o o 1874 Timestamp o o 1875 To c(1) m m 1876 Unsupported 420 o o 1877 User-Agent o o 1878 Via c m m 1879 Warning R - o 1880 Warning r o o 1881 WWW-Authenticate 401 m m 1883 8.1.1. SUBSCRIBE method 1885 "SUBSCRIBE" is added to the definition of the element "Method" in the 1886 SIP message grammar. 1888 Like all SIP method names, the SUBSCRIBE method name is case 1889 sensitive. The SUBSCRIBE method is used to request asynchronous 1890 notification of an event or set of events at a later time. 1892 8.1.2. NOTIFY method 1894 "NOTIFY" is added to the definition of the element "Method" in the 1895 SIP message grammar. 1897 The NOTIFY method is used to notify a SIP node that an event which 1898 has been requested by an earlier SUBSCRIBE method has occurred. It 1899 may also provide further details about the event. 1901 8.2. New Header Fields 1903 This table expands on tables 2 and 3 in SIP [RFC3261], as amended by 1904 the changes described in Section 8.1. 1906 Header field where proxy ACK BYE CAN INV OPT REG PRA SUB NOT 1907 ----------------------------------------------------------------- 1908 Allow-Events R o o - o o o o o o 1909 Allow-Events 2xx - o - o o o o o o 1910 Allow-Events 489 - - - - - - - m m 1911 Event R - - - - - - - m m 1912 Subscription-State R - - - - - - - - m 1914 8.2.1. "Event" Header Field 1916 Event is added to the definition of the element "message-header 1917 field" in the SIP message grammar. 1919 For the purposes of matching NOTIFY messages with SUBSCRIBE messages, 1920 the event-type portion of the "Event" header field is compared byte- 1921 by-byte, and the "id" parameter token (if present) is compared byte- 1922 by-byte. An "Event" header field containing an "id" parameter never 1923 matches an "Event" header field without an "id" parameter. No other 1924 parameters are considered when performing a comparison. SUBSCRIBE 1925 responses are matched per the transaction handling rules in SIP 1926 [RFC3261]. 1928 Note that the forgoing text means that "Event: foo; id=1234" would 1929 match "Event: foo; param=abcd; id=1234", but not "Event: foo" (id 1930 does not match) or "Event: Foo; id=1234" (event portion does not 1931 match). 1933 This document does not define values for event-types. These values 1934 will be defined by individual event packages, and MUST be registered 1935 with the IANA. 1937 There MUST be exactly one event type listed per event header field. 1938 Multiple events per message are disallowed. 1940 8.2.2. "Allow-Events" Header Field 1942 Allow-Events is added to the definition of the element "general- 1943 header field" in the SIP message grammar. Its usage is described in 1944 Section 4.4.4. 1946 8.2.3. "Subscription-State" Header Field 1948 Subscription-State is added to the definition of the element 1949 "request-header field" in the SIP message grammar. Its usage is 1950 described in Section 4.1.3. 1952 8.3. New Response Codes 1954 8.3.1. "202 Accepted" Response Code 1956 The 202 response is added to the "Success" header field definition. 1957 "202 Accepted" has the same meaning as that defined in HTTP/1.1 1958 [RFC2616]. 1960 8.3.2. "489 Bad Event" Response Code 1962 The 489 event response is added to the "Client-Error" header field 1963 field definition. "489 Bad Event" is used to indicate that the server 1964 did not understand the event package specified in a "Event" header 1965 field. 1967 8.4. Augmented BNF Definitions 1969 The Augmented BNF definitions for the various new and modified syntax 1970 elements follows. The notation is as used in SIP [RFC3261], and any 1971 elements not defined in this section are as defined in SIP and the 1972 documents to which it refers. 1974 SUBSCRIBEm = %x53.55.42.53.43.52.49.42.45 ; SUBSCRIBE in caps 1975 NOTIFYm = %x4E.4F.54.49.46.59 ; NOTIFY in caps 1976 extension-method = SUBSCRIBEm / NOTIFYm / token 1978 Event = ( "Event" / "o" ) HCOLON event-type 1979 *( SEMI event-param ) 1980 event-type = event-package *( "." event-template ) 1981 event-package = token-nodot 1982 event-template = token-nodot 1983 token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" 1984 / "_" / "+" / "`" / "'" / "~" ) 1986 ; The use of the "id" parameter is deprecated; it is included 1987 ; for backwards compatibility purposes only. 1988 event-param = generic-param / ( "id" EQUAL token ) 1990 Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type 1991 *(COMMA event-type) 1993 Subscription-State = "Subscription-State" HCOLON substate-value 1994 *( SEMI subexp-params ) 1995 substate-value = "active" / "pending" / "terminated" 1996 / extension-substate 1997 extension-substate = token 1998 subexp-params = ("reason" EQUAL event-reason-value) 1999 / ("expires" EQUAL delta-seconds) 2000 / ("retry-after" EQUAL delta-seconds) 2001 / generic-param 2002 event-reason-value = "deactivated" 2003 / "probation" 2004 / "rejected" 2005 / "timeout" 2006 / "giveup" 2007 / "noresource" 2008 / "invariant" 2009 / event-reason-extension 2010 event-reason-extension = token 2012 9. References 2014 9.1. Normative References 2016 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2017 Requirement Levels", BCP 14, RFC 2119, March 1997. 2019 [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2020 IANA Considerations Section in RFCs", BCP 26, RFC 2434, 2021 October 1998. 2023 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2024 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2025 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2027 [RFC2779] Day, M., Aggarwal, S., Mohr, G., and J. Vincent, "Instant 2028 Messaging / Presence Protocol Requirements", RFC 2779, 2029 February 2000. 2031 [RFC2848] Petrack, S. and L. Conroy, "The PINT Service Protocol: 2032 Extensions to SIP and SDP for IP Access to Telephone Call 2033 Services", RFC 2848, June 2000. 2035 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 2036 A., Peterson, J., Sparks, R., Handley, M., and E. 2037 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 2038 June 2002. 2040 [RFC3265] Roach, A., "Session Initiation Protocol (SIP)-Specific 2041 Event Notification", RFC 3265, June 2002. 2043 [RFC4483] Burger, E., "A Mechanism for Content Indirection in 2044 Session Initiation Protocol (SIP) Messages", RFC 4483, 2045 May 2006. 2047 [I-D.ietf-sip-gruu] 2048 Rosenberg, J., "Obtaining and Using Globally Routable User 2049 Agent (UA) URIs (GRUU) in the Session Initiation Protocol 2050 (SIP)", draft-ietf-sip-gruu-15 (work in progress), 2051 October 2007. 2053 9.2. Informative References 2055 [RFC3515] Sparks, R., "The Session Initiation Protocol (SIP) Refer 2056 Method", RFC 3515, April 2003. 2058 [RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, 2059 "Indicating User Agent Capabilities in the Session 2060 Initiation Protocol (SIP)", RFC 3840, August 2004. 2062 [RFC3903] Niemi, A., "Session Initiation Protocol (SIP) Extension 2063 for Event State Publication", RFC 3903, October 2004. 2065 [RFC4485] Rosenberg, J. and H. Schulzrinne, "Guidelines for Authors 2066 of Extensions to the Session Initiation Protocol (SIP)", 2067 RFC 4485, May 2006. 2069 [RFC4660] Khartabil, H., Leppanen, E., Lonnfors, M., and J. Costa- 2070 Requena, "Functional Description of Event Notification 2071 Filtering", RFC 4660, September 2006. 2073 [RFC5057] Sparks, R., "Multiple Dialog Usages in the Session 2074 Initiation Protocol", RFC 5057, November 2007. 2076 Appendix A. Acknowledgements 2078 Thanks to the participants in the Events BOF at the 48th IETF meeting 2079 in Pittsburgh, as well as those who gave ideas and suggestions on the 2080 SIP Events mailing list. In particular, I wish to thank Henning 2081 Schulzrinne of Columbia University for coming up with the final 2082 three-tiered event identification scheme, Sean Olson for 2083 miscellaneous guidance, Jonathan Rosenberg for a thorough scrubbing 2084 of the -00 draft, and the authors of the "SIP Extensions for 2085 Presence" document for their input to SUBSCRIBE and NOTIFY request 2086 semantics. 2088 I also owe a debt of gratitude to all the implementors who have 2089 provided feedback on areas of confusion or difficulty in the original 2090 specification. In particular, Robert Sparks' Herculean efforts 2091 organizing, running, and collecting data from the SIPit events have 2092 proven invaluable in shaking out specification bugs. Robert Sparks 2093 is also responsible for untangling the dialog usage mess, in the form 2094 of RFC 5057. 2096 Appendix B. Open Issues 2098 B.1. Bug 711: Allow-Events can't express template support 2100 OPEN ISSUE: There are several things we can do here. I have not 2101 proposed on in particular; I would prefer to solicit initial feedback 2102 from implementors regarding what has been developed and deployed so 2103 far. 2105 The key problem is that support of template event packages can't be 2106 expressed in a complete yet bounded fashion. It would not be 2107 reasonable, for example, to require notifiers that support winfo on 2108 arbitrary packages to include an "Allow-Events" header field with 2109 contents like "presence, presence.winfo, presence.winfo.winfo, 2110 presence.winfo.winfo.winfo, presence.winfo.winfo.winfo.winfo, 2111 presence.winfo.winfo.winfo.winfo.winfo...." 2113 One alternative would be to list event packages and template event 2114 packages, without explicitly indicating which templates can be 2115 applied to which other packages. In such a case, the preceding 2116 example would be collapsed to "Allow-Events: presence, winfo". The 2117 notifier may have local policy that limits how they can be combined 2118 -- but we have plenty of other places where protocol allows 2119 something, but policy forbids it. 2121 B.2. Remove 202 Response Code? 2123 In practice, the 202 response code defined in RFC 3265 has proven to 2124 be nearly useless, due to its redundancy with the "pending" state, 2125 and its interaction with the HERFP problem. Given that 202 must be 2126 treated as 200 if an implementation does not understand it: would 2127 removing the 202 response code cause any issues for current 2128 implementations? 2130 B.3. Timer L and Resubscribes 2132 Section 4.1.2.4 defines a new Timer L that is used upon initial 2133 subscription to bound the amount of time that a subscriber needs to 2134 wait for a NOTIFY. Should this also apply to resubscribes? On one 2135 hand, the mechanism is not as necessary, since the subscriber already 2136 has a negotiated expiration time associated with the subscription. 2137 On the other hand, if no NOTIFY arrives in 64*T1, it is highly likely 2138 that the notifier has gone off the rails, which means that the 2139 subscriber can safely clean up state associated with that 2140 subscription. The key question involved in applying Timer L to 2141 resubscriptions is whether doing so makes subscriptions unnecessarily 2142 brittle. 2144 Appendix C. Changes 2146 This section, and all of its subsections, will be consolidated into a 2147 single "Changes Since RFC 3265" section prior to publication. Bug 2148 numbers refer to the identifiers for the bug reports kept on file at 2149 http://bugs.sipit.net/. 2151 C.1. Changes since RFC 3265 2153 C.1.1. Bug 666: Clarify use of expires=xxx with terminated 2155 Strengthened language in Section 4.1.3 to clarify that expires should 2156 not be sent with terminated, and must be ignored if received. 2158 C.1.2. Bug 667: Reason code for unsub/poll not clearly spelled out 2160 Clarified description of "timeout" in Section 4.1.3. (n.b., the text 2161 in Section 4.4.3 is actually pretty clear about this). 2163 C.1.3. Bug 669: Clarify: SUBSCRIBE for a duration might be answered 2164 with a NOTIFY/expires=0 2166 Added clarifying text to Section 4.2.2 explaining that shortening a 2167 subscription to zero seconds is valid. Also added sentence to 2168 Section 3.1.1 explicitly allowing shortening to zero. 2170 C.1.4. Bug 670: Dialog State Machine needs clarification 2172 The issues associated with the bug deal exclusively with the handling 2173 of multiple usages with a dialog. This behavior has been deprecated 2174 and moved to Section 4.5.2. This section, in turn, cites [RFC5057], 2175 which addresses all of the issues in Bug 670. 2177 C.1.5. Bug 671: Clarify timeout-based removal of subscriptions 2179 Changed Section 4.2.2 to specifically cite Timer F (so as to avoid 2180 ambiguity between transaction timeouts and retransmission timeouts). 2182 C.1.6. Bug 672: Mandate expires= in NOTIFY 2184 Changed strength of including of "expires" in a NOTIFY from SHOULD to 2185 MUST in Section 4.2.2. 2187 C.1.7. Bug 673: INVITE 481 response effect clarification 2189 This bug was addressed in [RFC5057]. 2191 C.1.8. Bug 677: SUBSCRIBE response matching text in error 2193 Fixed Section 8.2.1 to remove incorrect "...responses and..." -- 2194 explicitly pointed to SIP for transaction response handling. 2196 C.1.9. Bug 695: Document is not explicit about response to NOTIFY at 2197 subscription termination 2199 Added text to Section 4.4.1 indicating that the typical response to a 2200 terminal NOTIFY is a "200 OK". 2202 C.1.10. Bug 696: Subscription state machine needs clarification 2204 Added state machine diagram to Section 4.1.2 with explicit handling 2205 of what to do when a SUBSCRIBE never shows up. Added definition of 2206 and handling for new Timer L to Section 4.1.2.4. Added state machine 2207 to Section 4.2.2 to reinforce text. 2209 C.1.11. Bug 697: Unsubscription behavior could be clarified 2211 Added text to Section 4.2.1.4 encouraging (but not requiring) full 2212 state in final NOTIFY message. Also added text to Section 4.1.2.3 2213 warning subscribers that full state may or may not be present in the 2214 final NOTIFY. 2216 C.1.12. Bug 699: NOTIFY and SUBSCRIBE are target refresh requests 2218 Added text to both Section 3.1 and Section 3.2 explicitly indicating 2219 that SUBSCRIBE and NOTIFY are target refresh methods. 2221 C.1.13. Bug 722: Inconsistent 423 reason phrase text 2223 Changed reason code to "Interval Too Brief" in Section 4.2.1.1 and 2224 Section 4.2.1.4, to match 423 reason code in SIP [RFC3261]. 2226 C.1.14. Bug 741: guidance needed on when to not include Allow-Events 2228 Added non-normative clarification to Section 4.4.4 regarding 2229 inclusion of Allow-Events in a NOTIFY for the one-and-only package 2230 supported by the notifier. 2232 C.1.15. Bug 744: 5xx to NOTIFY terminates a subscription, but should 2233 not 2235 Issue of subscription (usage) termination versus dialog termination 2236 is handled in [RFC5057]. The text in Section 4.2.2 has been updated 2237 to summarize the behavior described by 5057, and cites it for 2238 additional detail and rationale. 2240 C.1.16. Bug 752: Detection of forked requests is incorrect 2242 Removed erroneous "CSeq" from list of matching criteria in 2243 Section 5.4.9. 2245 C.1.17. Bug 773: Reason code needs IANA registry 2247 Added Section 7.2 to create and populate IANA registry. 2249 C.1.18. Bug 774: Need new reason for terminating subscriptions to 2250 resources that never change 2252 Added new "invariant" reason code to Section 4.1.3, ABNF syntax. 2254 C.1.19. Clarify handling of Route/Record-Route in NOTIFY 2256 Changed text in Section 4.3 mandating Record-Route in initial 2257 SUBSCRIBE and all NOTIFY messages, and adding "MAY" level statements 2258 for subsequent SUBSCRIBE messages. 2260 C.1.20. Eliminate implicit subscriptions 2262 Added text to Section 4.2.1 explaining some of the problems 2263 associated with implicit subscriptions, normative language 2264 prohibiting them. Removed language from Section 3.2 describing "non- 2265 SUBSCRIBE" mechanisms for creating subscriptions. Simplified 2266 language in Section 4.2.2, now that the soft-state/non-soft-state 2267 distinction is unnecessary. 2269 C.1.21. Deprecate dialog re-use 2271 Moved handling of dialog re-use and "id" handling to Section 4.5.2. 2272 It is documented only for backwards-compatibility purposes. 2274 C.1.22. Rationalize dialog creation 2276 Section 4.4.1 has been updated to specify that dialogs should be 2277 created when the NOTIFY arrives. Previously, the dialog was 2278 established by the SUBSCRIBE 200, or by the NOTIFY transaction. This 2279 was unnecessarily complicated; the newer rules are easier to 2280 implement (and result in effectively the same behavior on the wire). 2282 C.1.23. Refactor behavior sections 2284 Reorganized Section 4 to consolidate behavior along role lines 2285 (subscriber/notifier/proxy) instead of method lines. 2287 C.1.24. Clarify sections that need to be present in event packages 2289 Added sentence to Section 5 clarifying that event packages are 2290 expected to include explicit sections covering the issues discussed 2291 in this section. 2293 C.1.25. Make CANCEL handling more explicit 2295 Text in Section 4.6 now clearly calls out behavior upon receipt of a 2296 CANCEL. We also echo the "...SHOULD NOT send..." requirement from 2297 [RFC3261]. 2299 C.1.26. Remove State Agent Terminology 2301 As originally planned, we anticipated a fairly large number of event 2302 packages that would move back and forth between end-user devices and 2303 servers in the network. In practice, this has ended up not being the 2304 case. Certain events, like dialog state, are inherently hosted at 2305 end-user devices; others, like presence, are almost always hosted in 2306 the network (due to issues like composition, and the ability to 2307 deliver information when user devices are offline). Further, the 2308 concept of State Agents is the most misunderstood by event package 2309 authors. In my expert review of event packages, I have yet to find 2310 one that got the concept of State Agents completely correct -- and 2311 most of them start out with the concept being 100% backwards from the 2312 way RFC 3265 described it. 2314 Rather than remove the ability to perform the actions previously 2315 attributed to the widely misunderstood term "State Agent," we have 2316 simply eliminated this term. Instead, we talk about the behaviors 2317 required to create state agents (state aggregation, subscription 2318 notification) without defining a formal term to describe the servers 2319 that exhibit these behaviors. In effect, this is an editorial change 2320 to make life easier for event package authors; the actual protocol 2321 does not change as a result. 2323 The definition of "State Agent" has been removed from Section 2. 2324 Section 4.4.2 has been retooled to discuss migration of subscription 2325 in general, without calling out the specific example of state agents. 2326 Section 5.4.11 has been focused on state aggregation in particular, 2327 instead of state aggregation as an aspect of state agents. 2329 Author's Address 2331 Adam Roach 2332 Tekelec 2333 17210 Campbell Rd. 2334 Suite 250 2335 Dallas, TX 75252 2336 US 2338 Email: adam@nostrum.com