idnits 2.17.1 draft-ietf-sipcore-rfc3265bis-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. 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 (Using the creation date from RFC4660, updated by this document, for RFC5378 checks: 2004-02-06) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 27, 2012) is 4440 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 1763, but not defined ** Obsolete normative reference: RFC 3265 (Obsoleted by RFC 6665) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) -- Duplicate reference: RFC4660, mentioned in 'RFC4660', was also mentioned in 'RFC 4660'. Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 3 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 Obsoletes: 3265 (if approved) February 27, 2012 5 Updates: 4660 (if approved) 6 Intended status: Standards Track 7 Expires: August 30, 2012 9 SIP-Specific Event Notification 10 draft-ietf-sipcore-rfc3265bis-07 12 Abstract 14 This document describes an extension to the Session Initiation 15 Protocol (SIP). The purpose of this extension is to provide an 16 extensible framework by which SIP nodes can request notification from 17 remote nodes indicating that certain events have occurred. 19 Note that the event notification mechanisms defined herein are NOT 20 intended to be a general-purpose infrastructure for all classes of 21 event subscription and notification. 23 This document represents a backwards-compatible improvement on the 24 original mechanism described by RFC 3265, taking into account several 25 years of implementation experience. Accordingly, this document 26 obsoletes RFC 3265. This document also updates RFC 4660 slightly to 27 accommodate some small changes to the mechanism that were discussed 28 in that document. 30 Status of this Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on August 30, 2012. 47 Copyright Notice 48 Copyright (c) 2012 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 64 1.1. Overview of Operation . . . . . . . . . . . . . . . . . . 5 65 1.2. Documentation Conventions . . . . . . . . . . . . . . . . 6 66 2. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 3. SIP Methods for Event Notification . . . . . . . . . . . . . . 7 68 3.1. SUBSCRIBE . . . . . . . . . . . . . . . . . . . . . . . . 7 69 3.1.1. Subscription Duration . . . . . . . . . . . . . . . . 7 70 3.1.2. Identification of Subscribed Events and Event 71 Classes . . . . . . . . . . . . . . . . . . . . . . . 8 72 3.1.3. Additional SUBSCRIBE Header Field Values . . . . . . . 9 73 3.2. NOTIFY . . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 3.2.1. Identification of Reported Events, Event Classes, 75 and Current State . . . . . . . . . . . . . . . . . . 9 76 4. Node Behavior . . . . . . . . . . . . . . . . . . . . . . . . 10 77 4.1. Subscriber Behavior . . . . . . . . . . . . . . . . . . . 10 78 4.1.1. Detecting Support for SIP Events . . . . . . . . . . . 10 79 4.1.2. Creating and Maintaining Subscriptions . . . . . . . . 10 80 4.1.3. Receiving and Processing State Information . . . . . . 14 81 4.1.4. Forking of SUBSCRIBE Requests . . . . . . . . . . . . 16 82 4.2. Notifier Behavior . . . . . . . . . . . . . . . . . . . . 17 83 4.2.1. Subscription Establishment and Maintenance . . . . . . 17 84 4.2.2. Sending State Information to Subscribers . . . . . . . 20 85 4.2.3. PINT Compatibility . . . . . . . . . . . . . . . . . . 23 86 4.3. Proxy Behavior . . . . . . . . . . . . . . . . . . . . . . 23 87 4.4. Common Behavior . . . . . . . . . . . . . . . . . . . . . 23 88 4.4.1. Dialog Creation and Termination . . . . . . . . . . . 24 89 4.4.2. Notifier Migration . . . . . . . . . . . . . . . . . . 24 90 4.4.3. Polling Resource State . . . . . . . . . . . . . . . . 25 91 4.4.4. Allow-Events header field usage . . . . . . . . . . . 26 92 4.5. Targeting Subscriptions at Devices . . . . . . . . . . . . 26 93 4.5.1. Using GRUUs to Route to Devices . . . . . . . . . . . 27 94 4.5.2. Sharing Dialogs . . . . . . . . . . . . . . . . . . . 27 96 4.6. CANCEL Requests for SUBSCRIBE and NOTIFY Transactions . . 29 97 5. Event Packages . . . . . . . . . . . . . . . . . . . . . . . . 29 98 5.1. Appropriateness of Usage . . . . . . . . . . . . . . . . . 29 99 5.2. Event Template-packages . . . . . . . . . . . . . . . . . 30 100 5.3. Amount of State to be Conveyed . . . . . . . . . . . . . . 30 101 5.3.1. Complete State Information . . . . . . . . . . . . . . 31 102 5.3.2. State Deltas . . . . . . . . . . . . . . . . . . . . . 31 103 5.4. Event Package Responsibilities . . . . . . . . . . . . . . 32 104 5.4.1. Event Package Name . . . . . . . . . . . . . . . . . . 32 105 5.4.2. Event Package Parameters . . . . . . . . . . . . . . . 32 106 5.4.3. SUBSCRIBE Request Bodies . . . . . . . . . . . . . . . 33 107 5.4.4. Subscription Duration . . . . . . . . . . . . . . . . 33 108 5.4.5. NOTIFY Request Bodies . . . . . . . . . . . . . . . . 33 109 5.4.6. Notifier processing of SUBSCRIBE requests . . . . . . 33 110 5.4.7. Notifier generation of NOTIFY requests . . . . . . . . 33 111 5.4.8. Subscriber processing of NOTIFY requests . . . . . . . 34 112 5.4.9. Handling of forked requests . . . . . . . . . . . . . 34 113 5.4.10. Rate of notifications . . . . . . . . . . . . . . . . 34 114 5.4.11. State Aggregation . . . . . . . . . . . . . . . . . . 35 115 5.4.12. Examples . . . . . . . . . . . . . . . . . . . . . . . 35 116 5.4.13. Use of URIs to Retrieve State . . . . . . . . . . . . 35 117 6. Security Considerations . . . . . . . . . . . . . . . . . . . 35 118 6.1. Access Control . . . . . . . . . . . . . . . . . . . . . . 35 119 6.2. Notifier Privacy Mechanism . . . . . . . . . . . . . . . . 36 120 6.3. Denial-of-Service attacks . . . . . . . . . . . . . . . . 36 121 6.4. Replay Attacks . . . . . . . . . . . . . . . . . . . . . . 36 122 6.5. Man-in-the middle attacks . . . . . . . . . . . . . . . . 37 123 6.6. Confidentiality . . . . . . . . . . . . . . . . . . . . . 37 124 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38 125 7.1. Event Packages . . . . . . . . . . . . . . . . . . . . . . 38 126 7.1.1. Registration Information . . . . . . . . . . . . . . . 38 127 7.1.2. Registration Template . . . . . . . . . . . . . . . . 39 128 7.2. Reason Codes . . . . . . . . . . . . . . . . . . . . . . . 39 129 7.3. Header Field Names . . . . . . . . . . . . . . . . . . . . 40 130 7.4. Response Codes . . . . . . . . . . . . . . . . . . . . . . 41 131 8. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 132 8.1. New Methods . . . . . . . . . . . . . . . . . . . . . . . 41 133 8.1.1. SUBSCRIBE method . . . . . . . . . . . . . . . . . . . 41 134 8.1.2. NOTIFY method . . . . . . . . . . . . . . . . . . . . 41 135 8.2. New Header Fields . . . . . . . . . . . . . . . . . . . . 42 136 8.2.1. "Event" Header Field . . . . . . . . . . . . . . . . . 42 137 8.2.2. "Allow-Events" Header Field . . . . . . . . . . . . . 42 138 8.2.3. "Subscription-State" Header Field . . . . . . . . . . 42 139 8.3. New Response Codes . . . . . . . . . . . . . . . . . . . . 43 140 8.3.1. "202 Accepted" Response Code . . . . . . . . . . . . . 43 141 8.3.2. "489 Bad Event" Response Code . . . . . . . . . . . . 43 142 8.4. Augmented BNF Definitions . . . . . . . . . . . . . . . . 43 143 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 44 144 9.1. Normative References . . . . . . . . . . . . . . . . . . . 44 145 9.2. Informative References . . . . . . . . . . . . . . . . . . 45 146 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 46 147 Appendix B. Changes from RFC 3265 . . . . . . . . . . . . . . . . 47 148 B.1. Bug 666: Clarify use of expires=xxx with terminated . . . 47 149 B.2. Bug 667: Reason code for unsub/poll not clearly 150 spelled out . . . . . . . . . . . . . . . . . . . . . . . 47 151 B.3. Bug 669: Clarify: SUBSCRIBE for a duration might be 152 answered with a NOTIFY/expires=0 . . . . . . . . . . . . . 47 153 B.4. Bug 670: Dialog State Machine needs clarification . . . . 47 154 B.5. Bug 671: Clarify timeout-based removal of subscriptions . 47 155 B.6. Bug 672: Mandate expires= in NOTIFY . . . . . . . . . . . 47 156 B.7. Bug 673: INVITE 481 response effect clarification . . . . 48 157 B.8. Bug 677: SUBSCRIBE response matching text in error . . . . 48 158 B.9. Bug 695: Document is not explicit about response to 159 NOTIFY at subscription termination . . . . . . . . . . . . 48 160 B.10. Bug 696: Subscription state machine needs clarification . 48 161 B.11. Bug 697: Unsubscription behavior could be clarified . . . 48 162 B.12. Bug 699: NOTIFY and SUBSCRIBE are target refresh 163 requests . . . . . . . . . . . . . . . . . . . . . . . . . 48 164 B.13. Bug 722: Inconsistent 423 reason phrase text . . . . . . . 48 165 B.14. Bug 741: guidance needed on when to not include 166 Allow-Events . . . . . . . . . . . . . . . . . . . . . . . 48 167 B.15. Bug 744: 5xx to NOTIFY terminates a subscription, but 168 should not . . . . . . . . . . . . . . . . . . . . . . . . 49 169 B.16. Bug 752: Detection of forked requests is incorrect . . . . 49 170 B.17. Bug 773: Reason code needs IANA registry . . . . . . . . . 49 171 B.18. Bug 774: Need new reason for terminating subscriptions 172 to resources that never change . . . . . . . . . . . . . . 49 173 B.19. Clarify handling of Route/Record-Route in NOTIFY . . . . . 49 174 B.20. Eliminate implicit subscriptions . . . . . . . . . . . . . 49 175 B.21. Deprecate dialog re-use . . . . . . . . . . . . . . . . . 49 176 B.22. Rationalize dialog creation . . . . . . . . . . . . . . . 49 177 B.23. Refactor behavior sections . . . . . . . . . . . . . . . . 50 178 B.24. Clarify sections that need to be present in event 179 packages . . . . . . . . . . . . . . . . . . . . . . . . . 50 180 B.25. Make CANCEL handling more explicit . . . . . . . . . . . . 50 181 B.26. Remove State Agent Terminology . . . . . . . . . . . . . . 50 182 B.27. Miscellanous Changes . . . . . . . . . . . . . . . . . . . 51 183 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 51 185 1. Introduction 187 The ability to request asynchronous notification of events proves 188 useful in many types of SIP services for which cooperation between 189 end-nodes is required. Examples of such services include automatic 190 callback services (based on terminal state events), buddy lists 191 (based on user presence events), message waiting indications (based 192 on mailbox state change events), and PSTN and Internet 193 Internetworking (PINT) [RFC2848] status (based on call state events). 195 The methods described in this document provide a framework by which 196 notification of these events can be ordered. 198 The event notification mechanisms defined herein are NOT intended to 199 be a general-purpose infrastructure for all classes of event 200 subscription and notification. Meeting requirements for the general 201 problem set of subscription and notification is far too complex for a 202 single protocol. Our goal is to provide a SIP-specific framework for 203 event notification which is not so complex as to be unusable for 204 simple features, but which is still flexible enough to provide 205 powerful services. Note, however, that event packages based on this 206 framework may define arbitrarily elaborate rules which govern the 207 subscription and notification for the events or classes of events 208 they describe. 210 This document does not describe an extension which may be used 211 directly; it must be extended by other documents (herein referred to 212 as "event packages"). In object-oriented design terminology, it may 213 be thought of as an abstract base class which must be derived into an 214 instantiatable class by further extensions. Guidelines for creating 215 these extensions are described in Section 5. 217 1.1. Overview of Operation 219 The general concept is that entities in the network can subscribe to 220 resource or call state for various resources or calls in the network, 221 and those entities (or entities acting on their behalf) can send 222 notifications when those states change. 224 A typical flow of messages would be: 226 Subscriber Notifier 227 |-----SUBSCRIBE---->| Request state subscription 228 |<-------200--------| Acknowledge subscription 229 |<------NOTIFY----- | Return current state information 230 |--------200------->| 231 |<------NOTIFY----- | Return current state information 232 |--------200------->| 234 Subscriptions are expired and must be refreshed by subsequent 235 SUBSCRIBE requests. 237 1.2. Documentation Conventions 239 There are several paragraphs throughout this document which provide 240 motivational or clarifying text. Such passages are non-normative, 241 and are provided only to assist with reader comprehension. These 242 passages are set off from the remainder of the text by being indented 243 thus: 245 This is an example of non-normative explanatory text. It does not 246 form part of the specification, and is used only for 247 clarification. 249 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 250 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 251 document are to be interpreted as described in [RFC2119]. 253 In particular, implementors need to take careful note of the meaning 254 of "SHOULD" defined in RFC 2119. To rephrase: violation of SHOULD- 255 strength requirements requires careful analysis and clearly 256 enumerable reasons. It is inappropriate to fail to comply with 257 "SHOULD"-strength requirements whimsically or for ease of 258 implementation. 260 The use of quotation marks next to periods and commas follows the 261 convention used by the American Mathematical Society; although 262 contrary to traditional American English convention, this usage lends 263 clarity to certain passages. 265 2. Definitions 267 Event Package: An event package is an additional specification which 268 defines a set of state information to be reported by a notifier to 269 a subscriber. Event packages also define further syntax and 270 semantics based on the framework defined by this document required 271 to convey such state information. 273 Event Template-Package: An event template-package is a special kind 274 of event package which defines a set of states which may be 275 applied to all possible event packages, including itself. 277 Notification: Notification is the act of a notifier sending a NOTIFY 278 request to a subscriber to inform the subscriber of the state of a 279 resource. 281 Notifier: A notifier is a user agent which generates NOTIFY requests 282 for the purpose of notifying subscribers of the state of a 283 resource. Notifiers typically also accept SUBSCRIBE requests to 284 create subscriptions. 286 Subscriber: A subscriber is a user agent which receives NOTIFY 287 requests from notifiers; these NOTIFY requests contain information 288 about the state of a resource in which the subscriber is 289 interested. Subscribers typically also generate SUBSCRIBE 290 requests and send them to notifiers to create subscriptions. 292 Subscription: A subscription is a set of application state 293 associated with a dialog. This application state includes a 294 pointer to the associated dialog, the event package name, and 295 possibly an identification token. Event packages will define 296 additional subscription state information. By definition, 297 subscriptions exist in both a subscriber and a notifier. 299 Subscription Migration: Subscription migration is the act of moving 300 a subscription from one notifier to another notifier. 302 3. SIP Methods for Event Notification 304 3.1. SUBSCRIBE 306 The SUBSCRIBE method is used to request current state and state 307 updates from a remote node. SUBSCRIBE requests are target refresh 308 requests, as that term is defined in [RFC3261]. 310 3.1.1. Subscription Duration 312 SUBSCRIBE requests SHOULD contain an "Expires" header field (defined 313 in [RFC3261]). This expires value indicates the duration of the 314 subscription. In order to keep subscriptions effective beyond the 315 duration communicated in the "Expires" header field, subscribers need 316 to refresh subscriptions on a periodic basis using a new SUBSCRIBE 317 request on the same dialog as defined in [RFC3261]. 319 If no "Expires" header field is present in a SUBSCRIBE request, the 320 implied default MUST be defined by the event package being used. 322 200-class responses to SUBSCRIBE requests also MUST contain an 323 "Expires" header field. The period of time in the response MAY be 324 shorter but MUST NOT be longer than specified in the request. The 325 notifier is explicitly allowed to shorten the duration to zero. The 326 period of time in the response is the one which defines the duration 327 of the subscription. 329 An "expires" parameter on the "Contact" header field has no semantics 330 for the SUBSCRIBE method and is explicitly not equivalent to an 331 "Expires" header field in a SUBSCRIBE request or response. 333 A natural consequence of this scheme is that a SUBSCRIBE request with 334 an "Expires" of 0 constitutes a request to unsubscribe from an event. 336 In addition to being a request to unsubscribe, a SUBSCRIBE request 337 with "Expires" of 0 also causes a fetch of state; see 338 Section 4.4.3. 340 Notifiers may also wish to cancel subscriptions to events; this is 341 useful, for example, when the resource to which a subscription refers 342 is no longer available. Further details on this mechanism are 343 discussed in Section 4.2.2. 345 3.1.2. Identification of Subscribed Events and Event Classes 347 Identification of events is provided by three pieces of information: 348 Request URI, Event Type, and (optionally) message body. 350 The Request URI of a SUBSCRIBE request, most importantly, contains 351 enough information to route the request to the appropriate entity per 352 the request routing procedures outlined in [RFC3261]. It also 353 contains enough information to identify the resource for which event 354 notification is desired, but not necessarily enough information to 355 uniquely identify the nature of the event (e.g., 356 "sip:adam@example.com" would be an appropriate URI to subscribe to 357 for my presence state; it would also be an appropriate URI to 358 subscribe to the state of my voice mailbox). 360 Subscribers MUST include exactly one "Event" header field in 361 SUBSCRIBE requests, indicating to which event or class of events they 362 are subscribing. The "Event" header field will contain a token which 363 indicates the type of state for which a subscription is being 364 requested. This token will be registered with the IANA and will 365 correspond to an event package which further describes the semantics 366 of the event or event class. 368 If the event package to which the event token corresponds defines 369 behavior associated with the body of its SUBSCRIBE requests, those 370 semantics apply. 372 Event packages may also define parameters for the Event header field; 373 if they do so, they must define the semantics for such parameters. 375 3.1.3. Additional SUBSCRIBE Header Field Values 377 Because SUBSCRIBE requests create a dialog usage as defined in 378 [RFC3261], they MAY contain an "Accept" header field. This header 379 field, if present, indicates the body formats allowed in subsequent 380 NOTIFY requests. Event packages MUST define the behavior for 381 SUBSCRIBE requests without "Accept" header fields; usually, this will 382 connote a single, default body type. 384 Header values not described in this document are to be interpreted as 385 described in [RFC3261]. 387 3.2. NOTIFY 389 NOTIFY requests are sent to inform subscribers of changes in state to 390 which the subscriber has a subscription. Subscriptions are created 391 using the SUBSCRIBE method. In legacy implementations, it is 392 possible that other means of subscription creation have been used. 393 However, this specification does not allow the creation of 394 subscriptions except through SUBSCRIBE requests and (for backwards- 395 compatibility) REFER requests [RFC3515]. 397 NOTIFY is a target refresh request, as that term is defined in 398 [RFC3261]. 400 A NOTIFY request does not terminate its corresponding subscription; 401 in other words, a single SUBSCRIBE request may trigger several NOTIFY 402 requests. 404 3.2.1. Identification of Reported Events, Event Classes, and Current 405 State 407 Identification of events being reported in a notification is very 408 similar to that described for subscription to events (see 409 Section 3.1.2). 411 As in SUBSCRIBE requests, NOTIFY request "Event" header fields MUST 412 contain a single event package name for which a notification is being 413 generated. The package name in the "Event" header field MUST match 414 the "Event" header field in the corresponding SUBSCRIBE request. 416 Event packages may define semantics associated with the body of their 417 NOTIFY requests; if they do so, those semantics apply. NOTIFY 418 request bodies are expected to provide additional details about the 419 nature of the event which has occurred and the resultant resource 420 state. 422 When present, the body of the NOTIFY request MUST be formatted into 423 one of the body formats specified in the "Accept" header field of the 424 corresponding SUBSCRIBE request. This body will contain either the 425 state of the subscribed resource or a pointer to such state in the 426 form of a URI (see Section 5.4.13). 428 4. Node Behavior 430 4.1. Subscriber Behavior 432 4.1.1. Detecting Support for SIP Events 434 The extension described in this document does not make use of the use 435 of "Require" or "Proxy-Require" header fields; similarly, there is no 436 token defined for "Supported" header fields. Potential subscribers 437 may probe for the support of SIP Events using the OPTIONS request 438 defined in [RFC3261]. 440 The presence of "SUBSCRIBE" in the "Allow" header field of any 441 request or response indicates support for SIP Events; further, in the 442 absence of an "Allow" header field, the simple presence of an "Allow- 443 Events" header field is sufficient to indicate that the node that 444 sent the message is capable of acting as a notifier (see 445 Section 4.4.4). 447 The "methods" parameter for Contact may also be used to 448 specifically announce support for SUBSCRIBE and NOTIFY requests 449 when registering. (See [RFC3840] for details on the "methods" 450 parameter). 452 4.1.2. Creating and Maintaining Subscriptions 454 From the subscriber's perspective, a subscription proceeds according 455 to the following state diagram: 457 +-------------+ 458 | init |<-----------------------+ 459 +-------------+ | 460 | Retry-after 461 Send SUBSCRIBE expires 462 | | 463 V Timer N Fires; | 464 +-------------+ SUBSCRIBE failure | 465 +------------| notify_wait |-- response; --------+ | 466 | +-------------+ or NOTIFY, | | 467 | | state=terminated | | 468 | | | | 469 ++========|===================|============================|==|====++ 470 || | | V | || 471 || Receive NOTIFY, Receive NOTIFY, +-------------+ || 472 || state=active state=pending | terminated | || 473 || | | +-------------+ || 474 || | | Re-subscription A A || 475 || | V times out; | | || 476 || | +-------------+ Receive NOTIFY, | | || 477 || | | pending |-- state=terminated; --+ | || 478 || | +-------------+ or 481 response | || 479 || | | to SUBSCRIBE | || 480 || | Receive NOTIFY, refresh | || 481 || | state=active | || 482 || | | Re-subscription | || 483 || | V times out; | || 484 || | +-------------+ Receive NOTIFY, | || 485 || +----------->| active |-- state=terminated; -----+ || 486 || +-------------+ or 481 response || 487 || to SUBSCRIBE || 488 || Subscription refresh || 489 ++=================================================================++ 491 In the state diagram, "Re-subscription times out" means that an 492 attempt to refresh or update the subscription using a new SUBSCRIBE 493 request does not result in a NOTIFY request before the corresponding 494 Timer N expires. 496 Any transition from "notify_wait" into a "pending" or "active" state 497 results in a new subscription. Note that multiple subscriptions can 498 be generated as the result of a single SUBSCRIBE request (see 499 Section 4.4.1). Each of these new subscriptions exists in its own 500 independent state machine, and runs its own set of timers. 502 4.1.2.1. Requesting a Subscription 504 SUBSCRIBE is a dialog-creating method, as described in [RFC3261]. 506 When a subscriber wishes to subscribe to a particular state for a 507 resource, it forms a SUBSCRIBE request. If the initial SUBSCRIBE 508 request represents a request outside of a dialog (as it typically 509 will), its construction follows the procedures outlined in [RFC3261] 510 for UAC request generation outside of a dialog. 512 This SUBSCRIBE request will be confirmed with a final response. 200- 513 class responses indicate that the subscription has been accepted, and 514 that a NOTIFY request will be sent immediately. 516 The "Expires" header field in a 200-class response to SUBSCRIBE 517 request indicates the actual duration for which the subscription will 518 remain active (unless refreshed). 520 Non-200 class final responses indicate that no subscription or new 521 dialog usage has been created, and no subsequent NOTIFY request will 522 be sent. All non-200 class responses (with the exception of "489", 523 described herein) have the same meanings and handling as described in 524 [RFC3261]. For the sake of clarity: if a SUBSCRIBE request contains 525 an "Accept" header field, but that field does not indicate a MIME 526 type that the notifier is capable of generating in its NOTIFY 527 requests, then the proper error response is 406 (Not Acceptable). 529 4.1.2.2. Refreshing of Subscriptions 531 At any time before a subscription expires, the subscriber may refresh 532 the timer on such a subscription by sending another SUBSCRIBE request 533 on the same dialog as the existing subscription. The handling for 534 such a request is the same as for the initial creation of a 535 subscription except as described below. 537 If a SUBSCRIBE request to refresh a subscription receives a 404, 405, 538 410, 416, 480-485, 489, 501, or 604 response, the subscriber MUST 539 consider the subscription terminated. (See [RFC5057] for further 540 details and notes about the effect of error codes on dialogs and 541 usages within dialog, such as subscriptions). If the subscriber 542 wishes to re-subscribe to the state, he does so by composing an 543 unrelated initial SUBSCRIBE request with a freshly-generated Call-ID 544 and a new, unique "From" tag (see Section 4.1.2.1.) 546 If a SUBSCRIBE request to refresh a subscription fails with any error 547 code other than those listed above, the original subscription is 548 still considered valid for the duration of the most recently known 549 "Expires" value as negotiated by the most recent successful SUBSCRIBE 550 transaction, or as communicated by a NOTIFY request in its 551 "Subscription-State" header field "expires" parameter. 553 Note that many such errors indicate that there may be a problem 554 with the network or the notifier such that no further NOTIFY 555 requests will be received. 557 When refreshing a subscription, a subscriber starts Timer N, set to 558 64*T1, when it sends the SUBSCRIBE request. If this Timer N expires 559 prior to the receipt of a NOTIFY request, the subscriber considers 560 the subscription terminated. If the subscriber receives a success 561 response to the SUBSCRIBE request that indicates that no NOTIFY 562 request will be generated -- such as the 204 response defined for use 563 with the optional extension described in [RFC5839] -- then it MUST 564 cancel Timer N. 566 4.1.2.3. Unsubscribing 568 Unsubscribing is handled in the same way as refreshing of a 569 subscription, with the "Expires" header field set to "0". Note that 570 a successful unsubscription will also trigger a final NOTIFY request. 572 The final NOTIFY request may or may not contain information about the 573 state of the resource; subscribers need to be prepared to receive 574 final NOTIFY requests both with and without state. 576 4.1.2.4. Confirmation of Subscription Creation 578 The subscriber can expect to receive a NOTIFY request from each node 579 which has processed a successful subscription or subscription 580 refresh. To ensure that subscribers do not wait indefinitely for a 581 subscription to be established, a subscriber starts a Timer N, set to 582 64*T1, when it sends a SUBSCRIBE request. If this Timer N expires 583 prior to the receipt of a NOTIFY request, the subscriber considers 584 the subscription failed, and cleans up any state associated with the 585 subscription attempt. 587 Until Timer N expires, several NOTIFY requests may arrive from 588 different destinations (see Section 4.4.1). Each of these requests 589 establish a new dialog usage and a new subscription. After the 590 expiration of Timer N, the subscriber SHOULD reject any such NOTIFY 591 requests that would otherwise establish a new dialog usage with a 592 "481" response code. 594 Until the first NOTIFY request arrives, the subscriber should 595 consider the state of the subscribed resource to be in a neutral 596 state. Event package specifications MUST define this "neutral state" 597 in such a way that makes sense for their application (see 598 Section 5.4.7). 600 Due to the potential for both out-of-order messages and forking, the 601 subscriber MUST be prepared to receive NOTIFY requests before the 602 SUBSCRIBE transaction has completed. 604 Except as noted above, processing of this NOTIFY request is the same 605 as in Section 4.1.3. 607 4.1.3. Receiving and Processing State Information 609 Subscribers receive information about the state of a resource to 610 which they have subscribed in the form of NOTIFY requests. 612 Upon receiving a NOTIFY request, the subscriber should check that it 613 matches at least one of its outstanding subscriptions; if not, it 614 MUST return a "481 Subscription does not exist" response unless 615 another 400- or 500-class response is more appropriate. The rules 616 for matching NOTIFY requests with subscriptions that create a new 617 dialog usage are described in Section 4.4.1. Notifications for 618 subscriptions which were created inside an existing dialog match if 619 they are in the same dialog and the "Event" header fields match (as 620 described in Section 8.2.1). 622 If, for some reason, the event package designated in the "Event" 623 header field of the NOTIFY request is not supported, the subscriber 624 will respond with a "489 Bad Event" response. 626 To prevent spoofing of events, NOTIFY requests SHOULD be 627 authenticated, using any defined SIP authentication mechanism. 629 NOTIFY requests MUST contain "Subscription-State" header fields which 630 indicate the status of the subscription. 632 If the "Subscription-State" header field value is "active", it means 633 that the subscription has been accepted and (in general) has been 634 authorized. If the header field also contains an "expires" 635 parameter, the subscriber SHOULD take it as the authoritative 636 subscription duration and adjust accordingly. The "retry-after" and 637 "reason" parameters have no semantics for "active". 639 If the "Subscription-State" value is "pending", the subscription has 640 been received by the notifier, but there is insufficient policy 641 information to grant or deny the subscription yet. If the header 642 field also contains an "expires" parameter, the subscriber SHOULD 643 take it as the authoritative subscription duration and adjust 644 accordingly. No further action is necessary on the part of the 645 subscriber. The "retry-after" and "reason" parameters have no 646 semantics for "pending". 648 If the "Subscription-State" value is "terminated", the subscriber 649 MUST consider the subscription terminated. The "expires" parameter 650 has no semantics for "terminated" -- notifiers SHOULD NOT include an 651 "expires" parameter on a "Subscription-State" header field with a 652 value of "terminated," and subscribers MUST ignore any such 653 parameter, if present. If a reason code is present, the client 654 should behave as described below. If no reason code or an unknown 655 reason code is present, the client MAY attempt to re-subscribe at any 656 time (unless a "retry-after" parameter is present, in which case the 657 client SHOULD NOT attempt re-subscription until after the number of 658 seconds specified by the "retry-after" parameter). The reason codes 659 defined by this document are: 661 deactivated: The subscription has been terminated, but the 662 subscriber SHOULD retry immediately with a new subscription. One 663 primary use of such a status code is to allow migration of 664 subscriptions between nodes. The "retry-after" parameter has no 665 semantics for "deactivated". 667 probation: The subscription has been terminated, but the client 668 SHOULD retry at some later time. If a "retry-after" parameter is 669 also present, the client SHOULD wait at least the number of 670 seconds specified by that parameter before attempting to re- 671 subscribe. 673 rejected: The subscription has been terminated due to change in 674 authorization policy. Clients SHOULD NOT attempt to re-subscribe. 675 The "retry-after" parameter has no semantics for "rejected". 677 timeout: The subscription has been terminated because it was not 678 refreshed before it expired. Clients MAY re-subscribe 679 immediately. The "retry-after" parameter has no semantics for 680 "timeout". This reason code is also associated with polling of 681 resource state, as detailed in Section 4.4.3 683 giveup: The subscription has been terminated because the notifier 684 could not obtain authorization in a timely fashion. If a "retry- 685 after" parameter is also present, the client SHOULD wait at least 686 the number of seconds specified by that parameter before 687 attempting to re-subscribe; otherwise, the client MAY retry 688 immediately, but will likely get put back into pending state. 690 noresource: The subscription has been terminated because the 691 resource state which was being monitored no longer exists. 692 Clients SHOULD NOT attempt to re-subscribe. The "retry-after" 693 parameter has no semantics for "noresource". 695 invariant: The subscription has been terminated because the resource 696 state is guaranteed not to change for the foreseeable future. 697 This may be the case, for example, when subscribing to the 698 location information of a fixed-location land-line telephone. 699 When using this reason code, notifiers are advised to include a 700 "retry-after" parameter with a large value (for example, 31536000 701 -- or one year) to prevent older, RFC 3265-compliant clients from 702 periodically resubscribing. Clients SHOULD NOT attempt to 703 resubscribe after receiving a reason code of "invariant," 704 regardless of the presence of or value of a "retry-after" 705 parameter. 707 Other specifications may define new reason codes for use with the 708 "Subscription-State" header field. 710 Once the notification is deemed acceptable to the subscriber, the 711 subscriber SHOULD return a 200 response. In general, it is not 712 expected that NOTIFY responses will contain bodies; however, they 713 MAY, if the NOTIFY request contained an "Accept" header field. 715 Other responses defined in [RFC3261] may also be returned, as 716 appropriate. In no case should a NOTIFY transaction extend for any 717 longer than the time necessary for automated processing. In 718 particular, subscribers MUST NOT wait for a user response before 719 returning a final response to a NOTIFY request. 721 4.1.4. Forking of SUBSCRIBE Requests 723 In accordance with the rules for proxying non-INVITE requests as 724 defined in [RFC3261], successful SUBSCRIBE requests will receive only 725 one 200-class response; however, due to forking, the subscription may 726 have been accepted by multiple nodes. The subscriber MUST therefore 727 be prepared to receive NOTIFY requests with "From:" tags which differ 728 from the "To:" tag received in the SUBSCRIBE 200-class response. 730 If multiple NOTIFY requests are received in different dialogs in 731 response to a single SUBSCRIBE request, each dialog represents a 732 different destination to which the SUBSCRIBE request was forked. 733 Subscriber handling in such situations varies by event package; see 734 Section 5.4.9 for details. 736 4.2. Notifier Behavior 738 4.2.1. Subscription Establishment and Maintenance 740 Notifiers learn about subscription requests by receiving SUBSCRIBE 741 requests from interested parties. Notifiers MUST NOT create 742 subscriptions except upon receipt of a SUBSCRIBE request. However, 743 for historical reasons, the implicit creation of subscriptions as 744 defined in [RFC3515] is still permitted. 746 [RFC3265] allowed the creation of subscriptions using means other 747 than the SUBSCRIBE method. The only standardized use of this 748 mechanism is the REFER method [RFC3515]. Implementation 749 experience with REFER has shown that the implicit creation of a 750 subscription has a number of undesirable effects, such as the 751 inability to signal the success of a REFER request while signaling 752 a problem with the subscription; and difficulty performing one 753 action without the other. Additionally, the proper exchange of 754 dialog identifiers is difficult without dialog re-use (which has 755 its own set of problems; see Section 4.5). 757 4.2.1.1. Initial SUBSCRIBE Transaction Processing 759 In no case should a SUBSCRIBE transaction extend for any longer than 760 the time necessary for automated processing. In particular, 761 notifiers MUST NOT wait for a user response before returning a final 762 response to a SUBSCRIBE request. 764 This requirement is imposed primarily to prevent the non-INVITE 765 transaction timeout timer F (see [RFC3261]) from firing during the 766 SUBSCRIBE transaction, since interaction with a user would often 767 exceed 64*T1 seconds. 769 The notifier SHOULD check that the event package specified in the 770 "Event" header field is understood. If not, the notifier SHOULD 771 return a "489 Bad Event" response to indicate that the specified 772 event/event class is not understood. 774 The notifier SHOULD also perform any necessary authentication and 775 authorization per its local policy. See Section 4.2.1.3. 777 The notifier MAY also check that the duration in the "Expires" header 778 field is not too small. If and only if the expiration interval is 779 greater than zero AND smaller than one hour AND less than a notifier- 780 configured minimum, the notifier MAY return a "423 Interval Too 781 Brief" error which contains a "Min-Expires" header field field. The 782 "Min-Expires" header field is described in [RFC3261]. 784 Once the notifier determines that it has enough information to create 785 the subscription (i.e., it understands the event package, the 786 subscription pertains to a known resource, and there are no other 787 barriers to creating the subscription), it creates the subscription 788 and a dialog usage, and returns a 200 (OK) response. 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 request 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 [RFC3261] may be used in response 808 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 request immediately to communicate the current 814 resource state to the subscriber. This NOTIFY request 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 request is 817 processed, this NOTIFY request MAY contain an empty or neutral body. 818 See Section 4.2.2 for further details on NOTIFY request generation. 820 Note that a NOTIFY request 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 [RFC3261]. Note that, 834 even if the notifier node typically acts as a proxy, authentication 835 for SUBSCRIBE requests will always be performed via a "401" response, 836 not a "407;" notifiers always act as a user agents when accepting 837 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 200 (OK) response is returned immediately. 853 Note that a NOTIFY request is still formed and sent under these 854 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 request 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 request is unacceptably short, the notifier SHOULD respond 871 with a "423 Interval Too Brief" response. 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 request with a 876 "Subscription-State" value of "terminated" to inform it that the 877 subscription is being removed. If such a request 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 request with an "Expires" header field set to 883 '0'. Notifiers largely treat this the same way as any other 884 subscription expiration: they send a NOTIFY request containing a 885 "Subscription-State" of "terminated", with a reason code of 886 "timeout." For consistency with state polling (see Section 4.4.3) 887 and subscription refreshes, the notifier may choose to include 888 resource state in this final NOTIFY request. However, in some cases, 889 including such state makes no sense. Under such circumstances, the 890 notifier may choose to omit state information from the terminal 891 NOTIFY request. 893 The sending of a NOTIFY request when a subscription expires allows 894 the corresponding dialog usage to be terminated, if appropriate. 896 4.2.2. Sending State Information to Subscribers 898 Notifiers use the NOTIFY method to send information about the state 899 of a resource to subscribers. The notifier's view of a subscription 900 is shown in the following state diagram: 902 +-------------+ 903 | init | 904 +-------------+ 905 | 906 Receive SUBSCRIBE, 907 Send NOTIFY 908 | 909 V NOTIFY failure, 910 +-------------+ subscription expires, 911 +------------| resp_wait |-- or terminated ----+ 912 | +-------------+ per local policy | 913 | | | 914 | | | 915 | | V 916 Policy grants Policy needed +-------------+ 917 permission | | terminated | 918 | | +-------------+ 919 | | A A 920 | V NOTIFY failure, | | 921 | +-------------+ subscription expires,| | 922 | | pending |-- or terminated -------+ | 923 | +-------------+ per local policy | 924 | | | 925 | Policy changed to | 926 | grant permission | 927 | | | 928 | V NOTIFY failure, | 929 | +-------------+ subscription expires, | 930 +----------->| active |-- or terminated ---------+ 931 +-------------+ per local policy 933 When a SUBSCRIBE request is answered with a 200-class response, the 934 notifier MUST immediately construct and send a NOTIFY request to the 935 subscriber. When a change in the subscribed state occurs, the 936 notifier SHOULD immediately construct and send a NOTIFY request, 937 subject to authorization, local policy, and throttling 938 considerations. 940 If the NOTIFY request fails due to expiration of SIP Timer F 941 (transaction timeout), the notifier SHOULD remove the subscription. 943 This behavior prevents unnecessary transmission of state 944 information for subscribers who have crashed or disappeared from 945 the network. Because such transmissions will be sent multiple 946 times, per the retransmission algorithm defined in [RFC3261] 947 (instead of the typical single transmission for functioning 948 clients), continuing to service them when no client is available 949 to acknowledge them could place undue strain on a network. Upon 950 client restart or reestablishment of a network connection, it is 951 expected that clients will send SUBSCRIBE requests to refresh 952 potentially stale state information; such requests will re-install 953 subscriptions in all relevant nodes. 955 If the NOTIFY transaction fails due to the receipt of a 404, 405, 956 410, 416, 480-485, 489, 501, or 604 response to the NOTIFY request, 957 the notifier MUST remove the corresponding subscription. See 958 [RFC5057] for further details and notes about the effect of error 959 codes on dialogs and usages within dialog (such as subscriptions). 961 A notify error response would generally indicate that something 962 has gone wrong with the subscriber or with some proxy on the way 963 to the subscriber. If the subscriber is in error, it makes the 964 most sense to allow the subscriber to rectify the situation (by 965 re-subscribing) once the error condition has been handled. If a 966 proxy is in error, the periodic sending of SUBSCRIBE requests to 967 refresh the expiration timer will re-install subscription state 968 once the network problem has been resolved. 970 NOTIFY requests MUST contain a "Subscription-State" header field with 971 a value of "active", "pending", or "terminated". The "active" value 972 indicates that the subscription has been accepted and has been 973 authorized (in most cases; see Section 6.2). The "pending" value 974 indicates that the subscription has been received, but that policy 975 information is insufficient to accept or deny the subscription at 976 this time. The "terminated" value indicates that the subscription is 977 not active. 979 If the value of the "Subscription-State" header field is "active" or 980 "pending", the notifier MUST also include in the "Subscription-State" 981 header field an "expires" parameter which indicates the time 982 remaining on the subscription. The notifier MAY use this mechanism 983 to shorten a subscription; however, this mechanism MUST NOT be used 984 to lengthen a subscription. 986 Including expiration information for active and pending 987 subscriptions is necessary in case the SUBSCRIBE request forks, 988 since the response to a forked SUBSCRIBE request may not be 989 received by the subscriber. [RFC3265] allowed the notifier some 990 discretion in the inclusion of this parameter, so subscriber 991 implementations are warned to handle the lack of an "expires" 992 parameter gracefully. Note well that this "expires" value is a 993 parameter on the "Subscription-State" header field, NOT an 994 "Expires" header field. 996 The period of time for a subscription can be shortened to zero by 997 the notifier. In other words, it is perfectly valid for a 998 SUBSCRIBE request with a non-zero expires to be answered with a 999 NOTIFY request that contains "Subscription-Status: 1000 terminated;reason=expired". This merely means that the notifier 1001 has shortened the subscription timeout to zero, and the 1002 subscription has expired instantaneously. The body may contain 1003 valid state, or it may contain a neutral state (see 1004 Section 5.4.7). 1006 If the value of the "Subscription-State" header field is 1007 "terminated", the notifier SHOULD also include a "reason" parameter. 1008 The notifier MAY also include a "retry-after" parameter, where 1009 appropriate. For details on the value and semantics of the "reason" 1010 and "retry-after" parameters, see Section 4.1.3. 1012 4.2.3. PINT Compatibility 1014 The "Event" header field is considered mandatory for the purposes of 1015 this document. However, to maintain compatibility with PINT (see 1016 [RFC2848]), notifiers MAY interpret a SUBSCRIBE request with no 1017 "Event" header field as requesting a subscription to PINT events. If 1018 a notifier does not support PINT, it SHOULD return "489 Bad Event" to 1019 any SUBSCRIBE requests without an "Event" header field. 1021 4.3. Proxy Behavior 1023 Proxies need no additional behavior beyond that described in 1024 [RFC3261] to support SUBSCRIBE and NOTIFY transactions. If a proxy 1025 wishes to see all of the SUBSCRIBE and NOTIFY requests for a given 1026 dialog, it MUST add a Record-Route header field to the initial 1027 SUBSCRIBE request and all NOTIFY requests. It MAY choose to include 1028 Record-Route in subsequent SUBSCRIBE requests; however, these 1029 requests cannot cause the dialog's route set to be modified. 1031 Proxies that did not add a Record-Route header field to the initial 1032 SUBSCRIBE request MUST NOT add a Record-Route header field to any of 1033 the associated NOTIFY requests. 1035 Note that subscribers and notifiers may elect to use S/MIME 1036 encryption of SUBSCRIBE and NOTIFY requests; consequently, proxies 1037 cannot rely on being able to access any information that is not 1038 explicitly required to be proxy-readable by [RFC3261]. 1040 4.4. Common Behavior 1041 4.4.1. Dialog Creation and Termination 1043 Dialogs usages are created upon completion of a NOTIFY transaction 1044 for a new subscription, unless the NOTIFY request contains a 1045 "Subscription-State" of "terminated." 1047 Because the dialog usage is established by the NOTIFY request, the 1048 route set at the subscriber is taken from the NOTIFY request itself, 1049 as opposed to the route set present in the 200-class response to the 1050 SUBSCRIBE request. 1052 NOTIFY requests are matched to such SUBSCRIBE requests if they 1053 contain the same "Call-ID", a "To" header field "tag" parameter which 1054 matches the "From" header field "tag" parameter of the SUBSCRIBE 1055 request, and the same "Event" header field. Rules for comparisons of 1056 the "Event" header fields are described in Section 8.2.1. 1058 A subscription is destroyed after a notifier sends a NOTIFY request 1059 with a "Subscription-State" of "terminated," or in certain error 1060 situations described elsewhere in this document. The subscriber will 1061 generally answer such final requests with a "200 OK" response (unless 1062 a condition warranting an alternate response has arisen). Except 1063 when the mechanism described in Section 4.5.2 is used, the 1064 destruction of a subscription results in the termination of its 1065 associated dialog. 1067 A subscriber may send a SUBSCRIBE request with an "Expires" header 1068 field of 0 in order to trigger the sending of such a NOTIFY 1069 request; however, for the purposes of subscription and dialog 1070 lifetime, the subscription is not considered terminated until the 1071 NOTIFY transaction with a "Subscription-State" of "terminated" 1072 completes. 1074 4.4.2. Notifier Migration 1076 It is often useful to allow migration of subscriptions between 1077 notifiers. Such migration may be effected by sending a NOTIFY 1078 request with a "Subscription-State" header field of "terminated", and 1079 a reason parameter of "deactivated". This NOTIFY request is 1080 otherwise normal, and is formed as described in Section 4.2.2. 1082 Upon receipt of this NOTIFY request, the subscriber SHOULD attempt to 1083 re-subscribe (as described in the preceding sections). Note that 1084 this subscription is established on a new dialog, and does not re-use 1085 the route set from the previous subscription dialog. 1087 The actual migration is effected by making a change to the policy 1088 (such as routing decisions) of one or more servers to which the 1089 SUBSCRIBE request will be sent in such a way that a different node 1090 ends up responding to the SUBSCRIBE request. This may be as simple 1091 as a change in the local policy in the notifier from which the 1092 subscription is migrating so that it serves as a proxy or redirect 1093 server instead of a notifier. 1095 Whether, when, and why to perform notifier migrations may be 1096 described in individual event packages; otherwise, such decisions are 1097 a matter of local notifier policy, and are left up to individual 1098 implementations. 1100 4.4.3. Polling Resource State 1102 A natural consequence of the behavior described in the preceding 1103 sections is that an immediate fetch without a persistent subscription 1104 may be effected by sending a SUBSCRIBE with an "Expires" of 0. 1106 Of course, an immediate fetch while a subscription is active may be 1107 effected by sending a SUBSCRIBE request with an "Expires" equal to 1108 the number of seconds remaining in the subscription. 1110 Upon receipt of this SUBSCRIBE request, the notifier (or notifiers, 1111 if the SUBSCRIBE request was forked) will send a NOTIFY request 1112 containing resource state in the same dialog. 1114 Note that the NOTIFY requests triggered by SUBSCRIBE requests with 1115 "Expires" header fields of 0 will contain a "Subscription-State" 1116 value of "terminated", and a "reason" parameter of "timeout". 1118 Polling of event state can cause significant increases in load on the 1119 network and notifiers; as such, it should be used only sparingly. In 1120 particular, polling SHOULD NOT be used in circumstances in which it 1121 will typically result in more network messages than long-running 1122 subscriptions. 1124 When polling is used, subscribers SHOULD attempt to cache 1125 authentication credentials between polls so as to reduce the number 1126 of messages sent. 1128 Due to the requirement on notifiers to send a NOTIFY request 1129 immediately upon receipt of a SUBSCRIBE request, the state 1130 provided by polling is limited to the information that the 1131 notifier has immediate local access to when it receives the 1132 SUBSCRIBE request. If, for example, the notifier generally needs 1133 to retrieve state from another network server, then that state 1134 will be absent from the NOTIFY request that results from polling. 1136 4.4.4. Allow-Events header field usage 1138 The "Allow-Events" header field, if present, MUST include a 1139 comprehensive and inclusive list of tokens which indicates the event 1140 packages for which the User Agent can act as a notifier. In other 1141 words, a user agent sending an "Allow-Events" header field is 1142 advertising that it can process SUBSCRIBE requests and generate 1143 NOTIFY requests for all of the event packages listed in that header 1144 field. 1146 Any user agent that can act as a notifier for one or more event 1147 packages SHOULD include an appropriate "Allow-Events" header field 1148 indicating all supported events in all methods which initiate dialogs 1149 and their responses (such as INVITE) and OPTIONS responses. 1151 This information is very useful, for example, in allowing user 1152 agents to render particular interface elements appropriately 1153 according to whether the events required to implement the features 1154 they represent are supported by the appropriate nodes. 1155 On the other hand, it doesn't necessarily make much sense to 1156 indicate supported events inside a dialog established by a NOTIFY 1157 request if the only event package supported is the one associated 1158 with that subscription. 1160 Note that "Allow-Events" header fields MUST NOT be inserted by 1161 proxies. 1163 The "Allow-Events" header field does not include a list of the event 1164 template packages supported by an implementation. If a subscriber 1165 wishes to determine which event template packages are supported by a 1166 notifier, it can probe for such support by attempting to subscribe to 1167 the event template packages it wishes to use. 1169 4.5. Targeting Subscriptions at Devices 1171 [RFC3265] defined a mechanism by which subscriptions could share 1172 dialogs with invite usages and with other subscriptions. The purpose 1173 of this behavior was to allow subscribers to ensure that a 1174 subscription arrived at the same device as an established dialog. 1175 Unfortunately, the re-use of dialogs has proven to be exceedingly 1176 confusing. [RFC5057] attempted to clarify proper behavior in a 1177 variety of circumstances; however, the ensuing rules remain confusing 1178 and prone to implementation error. At the same time, the mechanism 1179 described in [RFC5627] now provides a far more elegant and 1180 unambiguous means to achieve the same goal. 1182 Consequently, the dialog re-use technique described in RFC 3265 is 1183 now deprecated. 1185 This dialog-sharing technique has also historically been used as a 1186 means for targeting an event package at a dialog. This usage can be 1187 seen, for example, in certain applications of the REFER method 1188 [RFC3515]. With the removal of dialog re-use, an alternate (and more 1189 explicit) means of targeting dialogs needs to be used for this type 1190 of correlation. The appropriate means of such targeting is left up 1191 to the actual event packages. Candidates include the "Target-Dialog" 1192 header field [RFC4538], the "Join" header field [RFC3911], and the 1193 "Replaces" header field [RFC3891], depending on the semantics 1194 desired. Alternately, if the semantics of those header fields do not 1195 match the event package's purpose for correlation, event packages can 1196 devise their own means of identifying dialogs. For an example of 1197 this approach, see the Dialog Event Package [RFC4235]. 1199 4.5.1. Using GRUUs to Route to Devices 1201 Notifiers MUST implement the Globally Routable User-Agent URI (GRUU) 1202 extension defined in [RFC5627], and MUST use a GRUU as their local 1203 target. This allows subscribers to explicitly target desired 1204 devices. 1206 If a subscriber wishes to subscribe to a resource on the same device 1207 as an established dialog, it should check whether the remote contact 1208 in that dialog is a GRUU (i.e., whether it contains a "gr" URI 1209 parameter). If so, the subscriber creates a new dialog, using the 1210 GRUU as the request URI for the new SUBSCRIBE request. 1212 Because GRUUs are guaranteed to route to a a specific device, this 1213 ensures that the subscription will be routed to the same place as 1214 the established dialog. 1216 4.5.2. Sharing Dialogs 1218 For compatibility with older clients, subscriber and notifier 1219 implementations may choose to allow dialog sharing. The behavior of 1220 multiple usages within a dialog are described in [RFC5057]. 1222 Subscribers MUST NOT attempt to re-use dialogs whose remote target is 1223 a GRUU. 1225 Note that the techniques described in this section are included 1226 for backwards compatibility purposes only. Because subscribers 1227 cannot re-use dialogs with a GRUU for their remote target, and 1228 because notifiers must use GRUUs as their local target, any two 1229 implementations that conform to this specification will 1230 automatically use the mechanism described in Section 4.5.1. 1232 Further note that the prohibition on re-using dialogs does not 1233 exempt implicit subscriptions created by the REFER method. This 1234 means that implementations complying with this specification are 1235 required to use the "Target-Dialog" mechanism described in 1236 [RFC4538] when the remote target is a GRUU. 1238 If a subscriber wishes to subscribe to a resource on the same device 1239 as an established dialog and the remote contact is not a GRUU, it MAY 1240 revert to dialog sharing behavior. Alternately, it MAY choose to 1241 treat the remote party as incapable of servicing the subscription 1242 (i.e., the same way it would behave if the remote party did not 1243 support SIP events at all). 1245 If a notifier receives a SUBSCRIBE request for a new subscription on 1246 an existing dialog, it MAY choose to implement dialog sharing 1247 behavior. Alternately, it may choose to fail the SUBSCRIBE request 1248 with a 403 response. The error text of such 403 responses SHOULD 1249 indicate that dialog sharing is not supported. 1251 To implement dialog sharing, subscribers and notifiers perform the 1252 following additional processing: 1254 o When subscriptions exist in dialogs associated with INVITE-created 1255 application state and/or other subscriptions, these sets of 1256 application state do not interact beyond the behavior described 1257 for a dialog (e.g., route set handling). In particular, multiple 1258 subscriptions within a dialog are expire independently, and 1259 require independent subscription refreshes. 1261 o If a subscription's destruction leaves no other application state 1262 associated with the dialog, the dialog terminates. The 1263 destruction of other application state (such as that created by an 1264 INVITE) will not terminate the dialog if a subscription is still 1265 associated with that dialog. This means that, when dialog are re- 1266 used, then a dialog created with an INVITE does not necessarily 1267 terminate upon receipt of a BYE. Similarly, in the case that 1268 several subscriptions are associated with a single dialog, the 1269 dialog does not terminate until all the subscriptions in it are 1270 destroyed. 1272 o Subscribers MAY include an "id" parameter in SUBSCRIBE request 1273 "Event" header field to allow differentiation between multiple 1274 subscriptions in the same dialog. This "id" parameter, if 1275 present, contains an opaque token which identifies the specific 1276 subscription within a dialog. An "id" parameter is only valid 1277 within the scope of a single dialog. 1279 o If an "id" parameter is present in the SUBSCRIBE request used to 1280 establish a subscription, that "id" parameter MUST also be present 1281 in all corresponding NOTIFY requests. 1283 o When a subscriber refreshes a the subscription timer, the 1284 SUBSCRIBE request MUST contain the same "Event" header field "id" 1285 parameter as was present in the SUBSCRIBE request that created the 1286 subscription. (Otherwise, the notifier will interpret the 1287 SUBSCRIBE request as a request for a new subscription in the same 1288 dialog). 1290 o When a subscription is created in the notifier, it stores any 1291 "Event" header field "id" parameter as part of the subscription 1292 information (along with the event package name). 1294 o If an initial SUBSCRIBE request is sent on a pre-existing dialog, 1295 a matching NOTIFY request merely creates a new subscription 1296 associated with that dialog. 1298 4.6. CANCEL Requests for SUBSCRIBE and NOTIFY Transactions 1300 Neither SUBSCRIBE nor NOTIFY requests can be canceled. If a UAS 1301 receives a CANCEL request that matches a known SUBSCRIBE or NOTIFY 1302 transaction, it MUST respond to the CANCEL request, but otherwise 1303 ignore it. In particular, the CANCEL request MUST NOT affect 1304 processing of the SUBSCRIBE or NOTIFY request in any way. 1306 UACs SHOULD NOT send CANCEL requests for SUBSCRIBE or NOTIFY 1307 transactions. 1309 5. Event Packages 1311 This section covers several issues which should be taken into 1312 consideration when event packages based on the SUBSCRIBE and NOTIFY 1313 methods are proposed. Event package definitions contain sections 1314 addressing each of these issues, ideally in the same order and with 1315 the same titles as the following sections. 1317 5.1. Appropriateness of Usage 1319 When designing an event package using the methods described in this 1320 document for event notification, it is important to consider: is SIP 1321 an appropriate mechanism for the problem set? Is SIP being selected 1322 because of some unique feature provided by the protocol (e.g., user 1323 mobility), or merely because "it can be done?" If you find yourself 1324 defining event packages for notifications related to, for example, 1325 network management or the temperature inside your car's engine, you 1326 may want to reconsider your selection of protocols. 1328 Those interested in extending the mechanism defined in this 1329 document are urged to follow the development of "Guidelines for 1330 Authors of SIP Extensions" [RFC4485] for further guidance 1331 regarding appropriate uses of SIP. 1333 Further, it is expected that this mechanism is not to be used in 1334 applications where the frequency of reportable events is excessively 1335 rapid (e.g., more than about once per second). A SIP network is 1336 generally going to be provisioned for a reasonable signaling volume; 1337 sending a notification every time a user's GPS position changes by 1338 one hundredth of a second could easily overload such a network. 1340 5.2. Event Template-packages 1342 Normal event packages define a set of state applied to a specific 1343 type of resource, such as user presence, call state, and messaging 1344 mailbox state. 1346 Event template-packages are a special type of package which define a 1347 set of state applied to other packages, such as statistics, access 1348 policy, and subscriber lists. Event template-packages may even be 1349 applied to other event template-packages. 1351 To extend the object-oriented analogy made earlier, event template- 1352 packages can be thought of as templatized C++ packages which must be 1353 applied to other packages to be useful. 1355 The name of an event template-package as applied to a package is 1356 formed by appending a period followed by the event template-package 1357 name to the end of the package. For example, if a template-package 1358 called "winfo" were being applied to a package called "presence", the 1359 event token used in the "Event" header field would be 1360 "presence.winfo". 1362 Event template-packages must be defined so that they can be applied 1363 to any arbitrary package. In other words, event template-packages 1364 cannot be specifically tied to one or a few "parent" packages in such 1365 a way that they will not work with other packages. 1367 5.3. Amount of State to be Conveyed 1369 When designing event packages, it is important to consider the type 1370 of information which will be conveyed during a notification. 1372 A natural temptation is to convey merely the event (e.g., "a new 1373 voice message just arrived") without accompanying state (e.g., "7 1374 total voice messages"). This complicates implementation of 1375 subscribing entities (since they have to maintain complete state for 1376 the entity to which they have subscribed), and also is particularly 1377 susceptible to synchronization problems. 1379 There are two possible solutions to this problem that event packages 1380 may choose to implement. 1382 5.3.1. Complete State Information 1384 In general, event packages need to be able to convey a well-defined 1385 and complete state, rather than just a stream of events. If it is 1386 not possible to describe complete system state for transmission in 1387 NOTIFY requests, then the problem set is not a good candidate for an 1388 event package. 1390 For packages which typically convey state information that is 1391 reasonably small (on the order of 1 KB or so), it is suggested that 1392 event packages are designed so as to send complete state information 1393 whenever an event occurs. 1395 In some circumstances, conveying the current state alone may be 1396 insufficient for a particular class of events. In these cases, the 1397 event packages should include complete state information along with 1398 the event that occurred. For example, conveying "no customer service 1399 representatives available" may not be as useful as conveying "no 1400 customer service representatives available; representative 1401 sip:46@cs.xyz.int just logged off". 1403 5.3.2. State Deltas 1405 In the case that the state information to be conveyed is large, the 1406 event package may choose to detail a scheme by which NOTIFY requests 1407 contain state deltas instead of complete state. 1409 Such a scheme would work as follows: any NOTIFY request sent in 1410 immediate response to a SUBSCRIBE request contains full state 1411 information. NOTIFY requests sent because of a state change will 1412 contain only the state information that has changed; the subscriber 1413 will then merge this information into its current knowledge about the 1414 state of the resource. 1416 Any event package that supports delta changes to states MUST include 1417 a version number that increases by exactly one for each NOTIFY 1418 transaction in a subscription. Note that the state version number 1419 appears in the body of the message, not in a SIP header field. 1421 If a NOTIFY request arrives that has a version number that is 1422 incremented by more than one, the subscriber knows that a state delta 1423 has been missed; it ignores the NOTIFY request containing the state 1424 delta (except for the version number, which it retains to detect 1425 message loss), and re-sends a SUBSCRIBE request to force a NOTIFY 1426 request containing a complete state snapshot. 1428 5.4. Event Package Responsibilities 1430 Event packages are not required to reiterate any of the behavior 1431 described in this document, although they may choose to do so for 1432 clarity or emphasis. In general, though, such packages are expected 1433 to describe only the behavior that extends or modifies the behavior 1434 described in this document. 1436 Note that any behavior designated with "SHOULD" or "MUST" in this 1437 document is not allowed to be weakened by extension documents; 1438 however, such documents may elect to strengthen "SHOULD" requirements 1439 to "MUST" strength if required by their application. 1441 In addition to the normal sections expected in standards-track 1442 RFCs and SIP extension documents, authors of event packages need 1443 to address each of the issues detailed in the following 1444 subsections, whenever applicable. 1446 5.4.1. Event Package Name 1448 This section, which MUST be present, defines the token name to be 1449 used to designate the event package. It MUST include the information 1450 which appears in the IANA registration of the token. For information 1451 on registering such types, see Section 7. 1453 5.4.2. Event Package Parameters 1455 If parameters are to be used on the "Event" header field to modify 1456 the behavior of the event package, the syntax and semantics of such 1457 header fields MUST be clearly defined. 1459 Any "Event" header field parameters defined by an event package MUST 1460 be registered in the "Header Field Parameters and Parameter Values" 1461 registry defined by [RFC3968]. An "Event" header field parameter, 1462 once registered in conjunction with an event package, MUST NOT be re- 1463 used with any other event package. Non-event-package specifications 1464 MAY define "Event" header field parameters that apply across all 1465 event packages (with emphasis on "all", as opposed to "several"), 1466 such as the "id" parameter defined in this document. The restriction 1467 of a parameter to use with a single event package only applies to 1468 parameters that are defined in conjunction with an event package. 1470 5.4.3. SUBSCRIBE Request Bodies 1472 It is expected that most, but not all, event packages will define 1473 syntax and semantics for SUBSCRIBE request bodies; these bodies will 1474 typically modify, expand, filter, throttle, and/or set thresholds for 1475 the class of events being requested. Designers of event packages are 1476 strongly encouraged to re-use existing MIME types for message bodies 1477 where practical. 1479 This mandatory section of an event package defines what type or types 1480 of event bodies are expected in SUBSCRIBE requests (or specify that 1481 no event bodies are expected). It should point to detailed 1482 definitions of syntax and semantics for all referenced body types. 1484 5.4.4. Subscription Duration 1486 It is RECOMMENDED that event packages give a suggested range of times 1487 considered reasonable for the duration of a subscription. Such 1488 packages MUST also define a default "Expires" value to be used if 1489 none is specified. 1491 5.4.5. NOTIFY Request Bodies 1493 The NOTIFY request body is used to report state on the resource being 1494 monitored. Each package MUST define what type or types of event 1495 bodies are expected in NOTIFY requests. Such packages MUST specify 1496 or cite detailed specifications for the syntax and semantics 1497 associated with such event body. 1499 Event packages also MUST define which MIME type is to be assumed if 1500 none are specified in the "Accept" header field of the SUBSCRIBE 1501 request. 1503 5.4.6. Notifier processing of SUBSCRIBE requests 1505 This section describes the processing to be performed by the notifier 1506 upon receipt of a SUBSCRIBE request. Such a section is required. 1508 Information in this section includes details of how to authenticate 1509 subscribers and authorization issues for the package. 1511 5.4.7. Notifier generation of NOTIFY requests 1513 This section of an event package describes the process by which the 1514 notifier generates and sends a NOTIFY request. This includes 1515 detailed information about what events cause a NOTIFY request to be 1516 sent, how to compute the state information in the NOTIFY, how to 1517 generate neutral or fake state information to hide authorization 1518 delays and decisions from users, and whether state information is 1519 complete or deltas for notifications; see Section 5.3. Such a 1520 section is required. 1522 This section may optionally describe the behavior used to process the 1523 subsequent response. 1525 5.4.8. Subscriber processing of NOTIFY requests 1527 This section of an event package describes the process followed by 1528 the subscriber upon receipt of a NOTIFY request, including any logic 1529 required to form a coherent resource state (if applicable). 1531 5.4.9. Handling of forked requests 1533 Each event package MUST specify whether forked SUBSCRIBE requests are 1534 allowed to install multiple subscriptions. 1536 If such behavior is not allowed, the first potential dialog- 1537 establishing message will create a dialog. All subsequent NOTIFY 1538 requests which correspond to the SUBSCRIBE request (i.e., match "To", 1539 "From", "From" header field "tag" parameter, "Call-ID", "Event", and 1540 "Event" header field "id" parameter) but which do not match the 1541 dialog would be rejected with a 481 response. Note that the 200- 1542 class response to the SUBSCRIBE request can arrive after a matching 1543 NOTIFY request has been received; such responses might not correlate 1544 to the same dialog established by the NOTIFY request. Except as 1545 required to complete the SUBSCRIBE transaction, such non-matching 1546 200-class responses are ignored. 1548 If installing of multiple subscriptions by way of a single forked 1549 SUBSCRIBE request is allowed, the subscriber establishes a new dialog 1550 towards each notifier by returning a 200-class response to each 1551 NOTIFY request. Each dialog is then handled as its own entity, and 1552 is refreshed independent of the other dialogs. 1554 In the case that multiple subscriptions are allowed, the event 1555 package MUST specify whether merging of the notifications to form a 1556 single state is required, and how such merging is to be performed. 1557 Note that it is possible that some event packages may be defined in 1558 such a way that each dialog is tied to a mutually exclusive state 1559 which is unaffected by the other dialogs; this MUST be clearly stated 1560 if it is the case. 1562 5.4.10. Rate of notifications 1564 Each event package is expected to define a requirement (SHOULD or 1565 MUST strength) which defines an absolute maximum on the rate at which 1566 notifications are allowed to be generated by a single notifier. 1568 Each package MAY further define a throttle mechanism which allows 1569 subscribers to further limit the rate of notification. 1571 5.4.11. State Aggregation 1573 Many event packages inherently work by collecting information about a 1574 resource from a number of other sources -- either through the use of 1575 PUBLISH [RFC3903], by subscribing to state information, or through 1576 other state gathering mechanisms. 1578 Event packages that involve retrieval of state information for a 1579 single resource from more than one source need to consider how 1580 notifiers aggregate information into a single, coherent state. Such 1581 packages MUST specify how notifiers aggregate information and how 1582 they provide authentication and authorization. 1584 5.4.12. Examples 1586 Event packages SHOULD include several demonstrative message flow 1587 diagrams paired with several typical, syntactically correct, and 1588 complete messages. 1590 It is RECOMMENDED that documents describing event packages clearly 1591 indicate that such examples are informative and not normative, with 1592 instructions that implementors refer to the main text of the document 1593 for exact protocol details. 1595 5.4.13. Use of URIs to Retrieve State 1597 Some types of event packages may define state information which is 1598 potentially too large to reasonably send in a SIP message. To 1599 alleviate this problem, event packages may include the ability to 1600 convey a URI instead of state information; this URI will then be used 1601 to retrieve the actual state information. 1603 [RFC4483] defines a mechanism that can be used by event packages to 1604 convey information in such a fashion. 1606 6. Security Considerations 1608 6.1. Access Control 1610 The ability to accept subscriptions should be under the direct 1611 control of the notifier's user, since many types of events may be 1612 considered sensitive for the purposes of privacy. Similarly, the 1613 notifier should have the ability to selectively reject subscriptions 1614 based on the subscriber identity (based on access control lists), 1615 using standard SIP authentication mechanisms. The methods for 1616 creation and distribution of such access control lists is outside the 1617 scope of this document. 1619 6.2. Notifier Privacy Mechanism 1621 The mere act of returning certain 4xx and 6xx responses to SUBSCRIBE 1622 requests may, under certain circumstances, create privacy concerns by 1623 revealing sensitive policy information. In these cases, the notifier 1624 SHOULD always return a 200 (OK) response. While the subsequent 1625 NOTIFY request may not convey true state, it MUST appear to contain a 1626 potentially correct piece of data from the point of view of the 1627 subscriber, indistinguishable from a valid response. Information 1628 about whether a user is authorized to subscribe to the requested 1629 state is never conveyed back to the original user under these 1630 circumstances. 1632 Individual packages and their related documents for which such a mode 1633 of operation makes sense can further describe how and why to generate 1634 such potentially correct data. For example, such a mode of operation 1635 is mandated by [RFC2779] for user presence information. 1637 6.3. Denial-of-Service attacks 1639 The current model (one SUBSCRIBE request triggers a SUBSCRIBE 1640 response and one or more NOTIFY requests) is a classic setup for an 1641 amplifier node to be used in a smurf attack. 1643 Also, the creation of state upon receipt of a SUBSCRIBE request can 1644 be used by attackers to consume resources on a victim's machine, 1645 rendering it unusable. 1647 To reduce the chances of such an attack, implementations of notifiers 1648 SHOULD require authentication. Authentication issues are discussed 1649 in [RFC3261]. 1651 6.4. Replay Attacks 1653 Replaying of either SUBSCRIBE or NOTIFY requests can have detrimental 1654 effects. 1656 In the case of SUBSCRIBE requests, attackers may be able to install 1657 any arbitrary subscription which it witnessed being installed at some 1658 point in the past. Replaying of NOTIFY requests may be used to spoof 1659 old state information (although a good versioning mechanism in the 1660 body of the NOTIFY requests may help mitigate such an attack). Note 1661 that the prohibition on sending NOTIFY requests to nodes which have 1662 not subscribed to an event also aids in mitigating the effects of 1663 such an attack. 1665 To prevent such attacks, implementations SHOULD require 1666 authentication with anti-replay protection. Authentication issues 1667 are discussed in [RFC3261]. 1669 6.5. Man-in-the middle attacks 1671 Even with authentication, man-in-the-middle attacks using SUBSCRIBE 1672 requests may be used to install arbitrary subscriptions, hijack 1673 existing subscriptions, terminate outstanding subscriptions, or 1674 modify the resource to which a subscription is being made. To 1675 prevent such attacks, implementations SHOULD provide integrity 1676 protection across "Contact", "Route", "Expires", "Event", and "To" 1677 header fields of SUBSCRIBE requests, at a minimum. If SUBSCRIBE 1678 request bodies are used to define further information about the state 1679 of the call, they SHOULD be included in the integrity protection 1680 scheme. 1682 Man-in-the-middle attacks may also attempt to use NOTIFY requests to 1683 spoof arbitrary state information and/or terminate outstanding 1684 subscriptions. To prevent such attacks, implementations SHOULD 1685 provide integrity protection across the "Call-ID", "CSeq", and 1686 "Subscription-State" header fields and the bodies of NOTIFY requests. 1688 Integrity protection of message header fields and bodies is discussed 1689 in [RFC3261]. 1691 6.6. Confidentiality 1693 The state information contained in a NOTIFY request has the potential 1694 to contain sensitive information. Implementations MAY encrypt such 1695 information to ensure confidentiality. 1697 While less likely, it is also possible that the information contained 1698 in a SUBSCRIBE request contains information that users might not want 1699 to have revealed. Implementations MAY encrypt such information to 1700 ensure confidentiality. 1702 To allow the remote party to hide information it considers sensitive, 1703 all implementations SHOULD be able to handle encrypted SUBSCRIBE and 1704 NOTIFY requests. 1706 The mechanisms for providing confidentiality are detailed in 1707 [RFC3261]. 1709 7. IANA Considerations 1711 (This section is not applicable until this document is published as 1712 an RFC.) 1714 7.1. Event Packages 1716 This document defines an event-type namespace which requires a 1717 central coordinating body. The body chosen for this coordination is 1718 the Internet Assigned Numbers Authority (IANA). 1720 There are two different types of event-types: normal event packages, 1721 and event template-packages; see Section 5.2. To avoid confusion, 1722 template-package names and package names share the same namespace; in 1723 other words, an event template-package MUST NOT share a name with a 1724 package. 1726 Policies for registration of SIP event packages and SIP event package 1727 templates are defined in section 4.1 of [RFC5727]. 1729 Registrations with the IANA MUST include the token being registered 1730 and whether the token is a package or a template-package. Further, 1731 packages MUST include contact information for the party responsible 1732 for the registration and/or a published document which describes the 1733 event package. Event template-package token registrations MUST 1734 include a pointer to the published RFC which defines the event 1735 template-package. 1737 Registered tokens to designate packages and template-packages MUST 1738 NOT contain the character ".", which is used to separate template- 1739 packages from packages. 1741 7.1.1. Registration Information 1743 As this document specifies no package or template-package names, the 1744 initial IANA registration for event types will be empty. The 1745 remainder of the text in this section gives an example of the type of 1746 information to be maintained by the IANA; it also demonstrates all 1747 five possible permutations of package type, contact, and reference. 1749 The table below lists the event packages and template-packages 1750 defined in "SIP-Specific Event Notification" [RFC xxxx]. Each name 1751 is designated as a package or a template-package under "Type". 1753 Package Name Type Contact Reference 1754 ------------ ---- ------- --------- 1755 example1 package [Roach] 1756 example2 package [Roach] [RFC xxxx] 1757 example3 package [RFC xxxx] 1758 example4 template [Roach] [RFC xxxx] 1759 example5 template [RFC xxxx] 1761 PEOPLE 1762 ------ 1763 [Roach] Adam Roach 1765 REFERENCES 1766 ---------- 1767 [RFC xxxx] A.B. Roach, "SIP-Specific Event Notification", RFC XXXX, 1768 Monthname 20XX 1770 7.1.2. Registration Template 1772 To: ietf-sip-events@iana.org 1773 Subject: Registration of new SIP event package 1775 Package Name: 1777 (Package names must conform to the syntax described in 1778 Section 8.2.1.) 1780 Is this registration for a Template Package: 1782 (indicate yes or no) 1784 Published Specification(s): 1786 (Template packages require a published RFC. Other packages may 1787 reference a specification when appropriate). 1789 Person & email address to contact for further information: 1791 7.2. Reason Codes 1793 This document further defines "reason" codes for use in the 1794 "Subscription-State" header field (see Section 4.1.3). 1796 Following the policies outlined in "Guidelines for Writing an IANA 1797 Considerations Section in RFCs" [RFC5226], new reason codes require a 1798 Standards Action. 1800 Registrations with the IANA include the reason code being registered 1801 and a reference to a published document which describes the event 1802 package. Insertion of such values takes place as part of the RFC 1803 publication process or as the result of inter-SDO liaison activity. 1804 New reason codes must conform to the syntax of the ABNF "token" 1805 element defined in [RFC3261]. 1807 [RFC4660] defined a new reason code prior to the establishment of an 1808 IANA registry. We include its reason code ("badfilter") in the 1809 initial list of reason codes to ensure a complete registry. 1811 The IANA registry for reason code will be initialized with the 1812 following values: 1814 Reason Code Reference 1815 ----------- --------- 1816 deactivated [RFC xxxx] 1817 probation [RFC xxxx] 1818 rejected [RFC xxxx] 1819 timeout [RFC xxxx] 1820 giveup [RFC xxxx] 1821 noresource [RFC xxxx] 1822 invariant [RFC xxxx] 1823 badfilter [RFC 4660] 1825 REFERENCES 1826 ---------- 1827 [RFC xxxx] A.B. Roach, "SIP-Specific Event Notification", RFC XXXX, 1828 Monthname 20XX 1830 [RFC 4660] Khartabil, H., Leppanen, E., Lonnfors, M., and 1831 J. Costa-Requena, "Functional Description of Event 1832 Notification Filtering", September 2006. 1834 7.3. Header Field Names 1836 This document registers three new header field names, described 1837 elsewhere in this document. These header fields are defined by the 1838 following information, which is to be added to the header field sub- 1839 registry under http://www.iana.org/assignments/sip-parameters. 1841 Header Name: Allow-Events 1842 Compact Form: u 1844 Header Name: Subscription-State 1845 Compact Form: (none) 1847 Header Name: Event 1848 Compact Form: o 1850 7.4. Response Codes 1852 This document registers two new response codes. These response codes 1853 are defined by the following information, which is to be added to the 1854 method and response-code sub-registry under 1855 http://www.iana.org/assignments/sip-parameters. 1857 Response Code Number: 202 1858 Default Reason Phrase: Accepted 1860 Response Code Number: 489 1861 Default Reason Phrase: Bad Event 1863 8. Syntax 1865 This section describes the syntax extensions required for event 1866 notification in SIP. Semantics are described in Section 4. Note 1867 that the formal syntax definitions described in this document are 1868 expressed in the ABNF format used in [RFC3261], and contain 1869 references to elements defined therein. 1871 8.1. New Methods 1873 This document describes two new SIP methods: SUBSCRIBE and NOTIFY. 1875 8.1.1. SUBSCRIBE method 1877 "SUBSCRIBE" is added to the definition of the element "Method" in the 1878 SIP message grammar. 1880 Like all SIP method names, the SUBSCRIBE method name is case 1881 sensitive. The SUBSCRIBE method is used to request asynchronous 1882 notification of an event or set of events at a later time. 1884 8.1.2. NOTIFY method 1886 "NOTIFY" is added to the definition of the element "Method" in the 1887 SIP message grammar. 1889 The NOTIFY method is used to notify a SIP node that an event which 1890 has been requested by an earlier SUBSCRIBE method has occurred. It 1891 may also provide further details about the event. 1893 8.2. New Header Fields 1895 8.2.1. "Event" Header Field 1897 Event is added to the definition of the element "message-header 1898 field" in the SIP message grammar. 1900 For the purposes of matching NOTIFY requests with SUBSCRIBE requests, 1901 the event-type portion of the "Event" header field is compared byte- 1902 by-byte, and the "id" parameter token (if present) is compared byte- 1903 by-byte. An "Event" header field containing an "id" parameter never 1904 matches an "Event" header field without an "id" parameter. No other 1905 parameters are considered when performing a comparison. SUBSCRIBE 1906 responses are matched per the transaction handling rules in 1907 [RFC3261]. 1909 Note that the forgoing text means that "Event: foo; id=1234" would 1910 match "Event: foo; param=abcd; id=1234", but not "Event: foo" (id 1911 does not match) or "Event: Foo; id=1234" (event portion does not 1912 match). 1914 This document does not define values for event-types. These values 1915 will be defined by individual event packages, and MUST be registered 1916 with the IANA. 1918 There MUST be exactly one event type listed per event header field. 1919 Multiple events per message are disallowed. 1921 The "Event" header field is defined only for use in SUBSCRIBE and 1922 NOTIFY requests, and other requests whose definition explicitly calls 1923 for its use. It MUST NOT appear in any other SIP requests, and MUST 1924 NOT appear in responses. 1926 8.2.2. "Allow-Events" Header Field 1928 Allow-Events is added to the definition of the element "general- 1929 header field" in the SIP message grammar. Its usage is described in 1930 Section 4.4.4. 1932 User Agents MAY include the "Allow-Events" header field in any 1933 request or response, as long as its contents comply with the behavior 1934 described in Section 4.4.4. 1936 8.2.3. "Subscription-State" Header Field 1938 Subscription-State is added to the definition of the element 1939 "request-header field" in the SIP message grammar. Its usage is 1940 described in Section 4.1.3. "Subscription-State" header fields are 1941 defined for use in NOTIFY requests only. They MUST NOT appear in 1942 other SIP requests or responses. 1944 8.3. New Response Codes 1946 8.3.1. "202 Accepted" Response Code 1948 For historical purposes, the 202 (Accepted) response code is added to 1949 the "Success" header field definition. 1951 This document does not specify the use of the 202 response code in 1952 conjunction with the SUBSCRIBE or NOTIFY methods. Previous versions 1953 of the SIP Events Framework assigned specific meaning to the 202 1954 response code. 1956 Due to response handling in forking cases, any 202 response to a 1957 SUBSCRIBE request may be absorbed by a proxy, and thus it can never 1958 be guaranteed to be received by the UAC. Furthermore, there is no 1959 actual processing difference for a 202 as compared to a 200; a NOTIFY 1960 request is sent after the subscription is processed, and it conveys 1961 the correct state. SIP interoperability tests found that 1962 implementations were handling 202 differently from 200, leading to 1963 incompatibilities. Therefore, the 202 response is being deprecated 1964 to make it clear there is no such difference and 202 should not be 1965 handled differently than 200. 1967 Implementations conformant with the current specification MUST treat 1968 an incoming 202 response as identical to a 200 response, and MUST NOT 1969 generate 202 response codes to SUBSCRIBE or NOTIFY requests. 1971 This document also updates [RFC4660], which reiterates the 202-based 1972 behavior in several places. Implementations compliant with the 1973 present document MUST NOT send a 202 response to a SUBSCRIBE request, 1974 and will send an alternate success response (such as 200) in its 1975 stead. 1977 8.3.2. "489 Bad Event" Response Code 1979 The 489 event response is added to the "Client-Error" header field 1980 field definition. "489 Bad Event" is used to indicate that the server 1981 did not understand the event package specified in a "Event" header 1982 field. 1984 8.4. Augmented BNF Definitions 1986 The Augmented BNF definitions for the various new and modified syntax 1987 elements follows. The notation is as used in [RFC3261], and any 1988 elements not defined in this section are as defined in SIP and the 1989 documents to which it refers. 1991 SUBSCRIBEm = %x53.55.42.53.43.52.49.42.45 ; SUBSCRIBE in caps 1992 NOTIFYm = %x4E.4F.54.49.46.59 ; NOTIFY in caps 1993 extension-method = SUBSCRIBEm / NOTIFYm / token 1995 Event = ( "Event" / "o" ) HCOLON event-type 1996 *( SEMI event-param ) 1997 event-type = event-package *( "." event-template ) 1998 event-package = token-nodot 1999 event-template = token-nodot 2000 token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" 2001 / "_" / "+" / "`" / "'" / "~" ) 2003 ; The use of the "id" parameter is deprecated; it is included 2004 ; for backwards compatibility purposes only. 2005 event-param = generic-param / ( "id" EQUAL token ) 2007 Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type 2008 *(COMMA event-type) 2010 Subscription-State = "Subscription-State" HCOLON substate-value 2011 *( SEMI subexp-params ) 2012 substate-value = "active" / "pending" / "terminated" 2013 / extension-substate 2014 extension-substate = token 2015 subexp-params = ("reason" EQUAL event-reason-value) 2016 / ("expires" EQUAL delta-seconds) 2017 / ("retry-after" EQUAL delta-seconds) 2018 / generic-param 2019 event-reason-value = "deactivated" 2020 / "probation" 2021 / "rejected" 2022 / "timeout" 2023 / "giveup" 2024 / "noresource" 2025 / "invariant" 2026 / event-reason-extension 2027 event-reason-extension = token 2029 9. References 2031 9.1. Normative References 2033 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2034 Requirement Levels", BCP 14, RFC 2119, March 1997. 2036 [RFC2848] Petrack, S. and L. Conroy, "The PINT Service Protocol: 2037 Extensions to SIP and SDP for IP Access to Telephone Call 2038 Services", RFC 2848, June 2000. 2040 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 2041 A., Peterson, J., Sparks, R., Handley, M., and E. 2042 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 2043 June 2002. 2045 [RFC3265] Roach, A., "Session Initiation Protocol (SIP)-Specific 2046 Event Notification", RFC 3265, June 2002. 2048 [RFC3968] Camarillo, G., "The Internet Assigned Number Authority 2049 (IANA) Header Field Parameter Registry for the Session 2050 Initiation Protocol (SIP)", BCP 98, RFC 3968, 2051 December 2004. 2053 [RFC4483] Burger, E., "A Mechanism for Content Indirection in 2054 Session Initiation Protocol (SIP) Messages", RFC 4483, 2055 May 2006. 2057 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2058 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 2059 May 2008. 2061 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 2062 Agent URIs (GRUUs) in the Session Initiation Protocol 2063 (SIP)", RFC 5627, October 2009. 2065 [RFC5727] Peterson, J., Jennings, C., and R. Sparks, "Change Process 2066 for the Session Initiation Protocol (SIP) and the Real- 2067 time Applications and Infrastructure Area", BCP 67, 2068 RFC 5727, March 2010. 2070 9.2. Informative References 2072 [RFC2779] Day, M., Aggarwal, S., Mohr, G., and J. Vincent, "Instant 2073 Messaging / Presence Protocol Requirements", RFC 2779, 2074 February 2000. 2076 [RFC3515] Sparks, R., "The Session Initiation Protocol (SIP) Refer 2077 Method", RFC 3515, April 2003. 2079 [RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, 2080 "Indicating User Agent Capabilities in the Session 2081 Initiation Protocol (SIP)", RFC 3840, August 2004. 2083 [RFC3891] Mahy, R., Biggs, B., and R. Dean, "The Session Initiation 2084 Protocol (SIP) "Replaces" Header", RFC 3891, 2085 September 2004. 2087 [RFC3903] Niemi, A., "Session Initiation Protocol (SIP) Extension 2088 for Event State Publication", RFC 3903, October 2004. 2090 [RFC3911] Mahy, R. and D. Petrie, "The Session Initiation Protocol 2091 (SIP) "Join" Header", RFC 3911, October 2004. 2093 [RFC4235] Rosenberg, J., Schulzrinne, H., and R. Mahy, "An INVITE- 2094 Initiated Dialog Event Package for the Session Initiation 2095 Protocol (SIP)", RFC 4235, November 2005. 2097 [RFC4485] Rosenberg, J. and H. Schulzrinne, "Guidelines for Authors 2098 of Extensions to the Session Initiation Protocol (SIP)", 2099 RFC 4485, May 2006. 2101 [RFC4538] Rosenberg, J., "Request Authorization through Dialog 2102 Identification in the Session Initiation Protocol (SIP)", 2103 RFC 4538, June 2006. 2105 [RFC4660] Khartabil, H., Leppanen, E., Lonnfors, M., and J. Costa- 2106 Requena, "Functional Description of Event Notification 2107 Filtering", RFC 4660, September 2006. 2109 [RFC5057] Sparks, R., "Multiple Dialog Usages in the Session 2110 Initiation Protocol", RFC 5057, November 2007. 2112 [RFC5839] Niemi, A. and D. Willis, "An Extension to Session 2113 Initiation Protocol (SIP) Events for Conditional Event 2114 Notification", RFC 5839, May 2010. 2116 Appendix A. Acknowledgements 2118 Thanks to the participants in the Events BOF at the 48th IETF meeting 2119 in Pittsburgh, as well as those who gave ideas and suggestions on the 2120 SIP Events mailing list. In particular, I wish to thank Henning 2121 Schulzrinne of Columbia University for coming up with the final 2122 three-tiered event identification scheme, Sean Olson for 2123 miscellaneous guidance, Jonathan Rosenberg for a thorough scrubbing 2124 of the -00 draft, and the authors of the "SIP Extensions for 2125 Presence" document for their input to SUBSCRIBE and NOTIFY request 2126 semantics. 2128 I also owe a debt of gratitude to all the implementors who have 2129 provided feedback on areas of confusion or difficulty in the original 2130 specification. In particular, Robert Sparks' Herculean efforts 2131 organizing, running, and collecting data from the SIPit events have 2132 proven invaluable in shaking out specification bugs. Robert Sparks 2133 is also responsible for untangling the dialog usage mess, in the form 2134 of RFC 5057 [RFC5057]. 2136 Appendix B. Changes from RFC 3265 2138 This document represents several changes from the mechanism 2139 originally described in RFC 3265. This section summarizes those 2140 changes. Bug numbers refer to the identifiers for the bug reports 2141 kept on file at http://bugs.sipit.net/. 2143 B.1. Bug 666: Clarify use of expires=xxx with terminated 2145 Strengthened language in Section 4.1.3 to clarify that expires should 2146 not be sent with terminated, and must be ignored if received. 2148 B.2. Bug 667: Reason code for unsub/poll not clearly spelled out 2150 Clarified description of "timeout" in Section 4.1.3. (n.b., the text 2151 in Section 4.4.3 is actually pretty clear about this). 2153 B.3. Bug 669: Clarify: SUBSCRIBE for a duration might be answered with 2154 a NOTIFY/expires=0 2156 Added clarifying text to Section 4.2.2 explaining that shortening a 2157 subscription to zero seconds is valid. Also added sentence to 2158 Section 3.1.1 explicitly allowing shortening to zero. 2160 B.4. Bug 670: Dialog State Machine needs clarification 2162 The issues associated with the bug deal exclusively with the handling 2163 of multiple usages with a dialog. This behavior has been deprecated 2164 and moved to Section 4.5.2. This section, in turn, cites [RFC5057], 2165 which addresses all of the issues in Bug 670. 2167 B.5. Bug 671: Clarify timeout-based removal of subscriptions 2169 Changed Section 4.2.2 to specifically cite Timer F (so as to avoid 2170 ambiguity between transaction timeouts and retransmission timeouts). 2172 B.6. Bug 672: Mandate expires= in NOTIFY 2174 Changed strength of including of "expires" in a NOTIFY from SHOULD to 2175 MUST in Section 4.2.2. 2177 B.7. Bug 673: INVITE 481 response effect clarification 2179 This bug was addressed in [RFC5057]. 2181 B.8. Bug 677: SUBSCRIBE response matching text in error 2183 Fixed Section 8.2.1 to remove incorrect "...responses and..." -- 2184 explicitly pointed to SIP for transaction response handling. 2186 B.9. Bug 695: Document is not explicit about response to NOTIFY at 2187 subscription termination 2189 Added text to Section 4.4.1 indicating that the typical response to a 2190 terminal NOTIFY is a "200 OK". 2192 B.10. Bug 696: Subscription state machine needs clarification 2194 Added state machine diagram to Section 4.1.2 with explicit handling 2195 of what to do when a SUBSCRIBE never shows up. Added definition of 2196 and handling for new Timer N to Section 4.1.2.4. Added state machine 2197 to Section 4.2.2 to reinforce text. 2199 B.11. Bug 697: Unsubscription behavior could be clarified 2201 Added text to Section 4.2.1.4 encouraging (but not requiring) full 2202 state in final NOTIFY request. Also added text to Section 4.1.2.3 2203 warning subscribers that full state may or may not be present in the 2204 final NOTIFY. 2206 B.12. Bug 699: NOTIFY and SUBSCRIBE are target refresh requests 2208 Added text to both Section 3.1 and Section 3.2 explicitly indicating 2209 that SUBSCRIBE and NOTIFY are target refresh methods. 2211 B.13. Bug 722: Inconsistent 423 reason phrase text 2213 Changed reason code to "Interval Too Brief" in Section 4.2.1.1 and 2214 Section 4.2.1.4, to match 423 reason code in SIP [RFC3261]. 2216 B.14. Bug 741: guidance needed on when to not include Allow-Events 2218 Added non-normative clarification to Section 4.4.4 regarding 2219 inclusion of Allow-Events in a NOTIFY for the one-and-only package 2220 supported by the notifier. 2222 B.15. Bug 744: 5xx to NOTIFY terminates a subscription, but should not 2224 Issue of subscription (usage) termination versus dialog termination 2225 is handled in [RFC5057]. The text in Section 4.2.2 has been updated 2226 to summarize the behavior described by 5057, and cites it for 2227 additional detail and rationale. 2229 B.16. Bug 752: Detection of forked requests is incorrect 2231 Removed erroneous "CSeq" from list of matching criteria in 2232 Section 5.4.9. 2234 B.17. Bug 773: Reason code needs IANA registry 2236 Added Section 7.2 to create and populate IANA registry. 2238 B.18. Bug 774: Need new reason for terminating subscriptions to 2239 resources that never change 2241 Added new "invariant" reason code to Section 4.1.3, ABNF syntax. 2243 B.19. Clarify handling of Route/Record-Route in NOTIFY 2245 Changed text in Section 4.3 mandating Record-Route in initial 2246 SUBSCRIBE and all NOTIFY requests, and adding "MAY" level statements 2247 for subsequent SUBSCRIBE requests. 2249 B.20. Eliminate implicit subscriptions 2251 Added text to Section 4.2.1 explaining some of the problems 2252 associated with implicit subscriptions, normative language 2253 prohibiting them. Removed language from Section 3.2 describing "non- 2254 SUBSCRIBE" mechanisms for creating subscriptions. Simplified 2255 language in Section 4.2.2, now that the soft-state/non-soft-state 2256 distinction is unnecessary. 2258 B.21. Deprecate dialog re-use 2260 Moved handling of dialog re-use and "id" handling to Section 4.5.2. 2261 It is documented only for backwards-compatibility purposes. 2263 B.22. Rationalize dialog creation 2265 Section 4.4.1 has been updated to specify that dialogs should be 2266 created when the NOTIFY arrives. Previously, the dialog was 2267 established by the SUBSCRIBE 200, or by the NOTIFY transaction. This 2268 was unnecessarily complicated; the newer rules are easier to 2269 implement (and result in effectively the same behavior on the wire). 2271 B.23. Refactor behavior sections 2273 Reorganized Section 4 to consolidate behavior along role lines 2274 (subscriber/notifier/proxy) instead of method lines. 2276 B.24. Clarify sections that need to be present in event packages 2278 Added sentence to Section 5 clarifying that event packages are 2279 expected to include explicit sections covering the issues discussed 2280 in this section. 2282 B.25. Make CANCEL handling more explicit 2284 Text in Section 4.6 now clearly calls out behavior upon receipt of a 2285 CANCEL. We also echo the "...SHOULD NOT send..." requirement from 2286 [RFC3261]. 2288 B.26. Remove State Agent Terminology 2290 As originally planned, we anticipated a fairly large number of event 2291 packages that would move back and forth between end-user devices and 2292 servers in the network. In practice, this has ended up not being the 2293 case. Certain events, like dialog state, are inherently hosted at 2294 end-user devices; others, like presence, are almost always hosted in 2295 the network (due to issues like composition, and the ability to 2296 deliver information when user devices are offline). Further, the 2297 concept of State Agents is the most misunderstood by event package 2298 authors. In my expert review of event packages, I have yet to find 2299 one that got the concept of State Agents completely correct -- and 2300 most of them start out with the concept being 100% backwards from the 2301 way RFC 3265 described it. 2303 Rather than remove the ability to perform the actions previously 2304 attributed to the widely misunderstood term "State Agent," we have 2305 simply eliminated this term. Instead, we talk about the behaviors 2306 required to create state agents (state aggregation, subscription 2307 notification) without defining a formal term to describe the servers 2308 that exhibit these behaviors. In effect, this is an editorial change 2309 to make life easier for event package authors; the actual protocol 2310 does not change as a result. 2312 The definition of "State Agent" has been removed from Section 2. 2313 Section 4.4.2 has been retooled to discuss migration of subscription 2314 in general, without calling out the specific example of state agents. 2315 Section 5.4.11 has been focused on state aggregation in particular, 2316 instead of state aggregation as an aspect of state agents. 2318 B.27. Miscellanous Changes 2320 The following changes are relatively minor revisions to the document 2321 that resulted primarily from review of this document in the working 2322 group rather than implementation reports. 2324 o Clarified scope of Event header field parameters. In RFC3265, the 2325 scope is ambiguous, which causes problems with the RFC3968 2326 registry. The new text ensures that Event header field parameters 2327 are unique across all event packages. 2329 o Removed obsoleted language around IANA registration policies for 2330 event packages. Instead, we now cite RFC5727, which supersedes 2331 RFC3265, and is authoritative on event package registration 2332 policy. 2334 o Several editorial updates after input from working group, 2335 including proper designation of "dialog usage" rather than 2336 "dialog" where appropriate. 2338 o Clarified two normative statements about subscription termination 2339 by changing from plain English prose to RFC2119 language. 2341 o Removed "Table 2" expansions, per WG consensus on how SIP table 2 2342 is to be handled. 2344 o Removed 202 response code. 2346 o Clarified that "Allow-Events" does not list event template 2347 packages. 2349 o Added clarification about proper response when the SUBSCRIBE 2350 indicates an unknown MIME type in its Accept header field. 2352 o Minor clarifications to Route and Record-Route behavior. 2354 o Added non-normative warning about the limitations of state 2355 polling. 2357 o Added information about targeting subscriptions at specific 2358 dialogs. 2360 Author's Address 2362 Adam Roach 2363 Tekelec 2364 17210 Campbell Rd. 2365 Suite 250 2366 Dallas, TX 75252 2367 US 2369 Email: adam@nostrum.com