idnits 2.17.1 draft-ietf-sipcore-rfc3265bis-08.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 (April 11, 2012) is 4398 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 1765, but not defined ** Obsolete normative reference: RFC 3265 (Obsoleted by RFC 6665) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) -- Obsolete informational reference (is this intentional?): RFC 4288 (Obsoleted by RFC 6838) -- Duplicate reference: RFC4660, mentioned in 'RFC4660', was also mentioned in 'RFC 4660'. Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 4 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) April 11, 2012 5 Updates: 4660 (if approved) 6 Intended status: Standards Track 7 Expires: October 13, 2012 9 SIP-Specific Event Notification 10 draft-ietf-sipcore-rfc3265bis-08 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 October 13, 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 . . . . . . . . . . . . . . . . 35 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 . . . . . . . . . . . . . . . . . . . . . . 36 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 . . . . . . . . . . 43 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 . . . . . . . . . . . . . . . . 44 143 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 45 144 9.1. Normative References . . . . . . . . . . . . . . . . . . . 45 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 . 48 155 B.6. Bug 672: Mandate expires= in NOTIFY . . . . . . . . . . . 48 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 . . . . . . . . . . . . . . . . . . . . . . . 49 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 . . . . . . . . . . . . . . . 50 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 . . . . . . . . . . . . . . . . . . . . . . . . . 52 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 (or the default type according to the 425 event package description, if no Accept header field was specified). 426 This body will contain either the state of the subscribed resource or 427 a pointer to such state in the form of a URI (see Section 5.4.13). 429 4. Node Behavior 431 4.1. Subscriber Behavior 433 4.1.1. Detecting Support for SIP Events 435 The extension described in this document does not make use of the 436 "Require" or "Proxy-Require" header fields; similarly, there is no 437 token defined for "Supported" header fields. Potential subscribers 438 may probe for the support of SIP Events using the OPTIONS request 439 defined in [RFC3261]. 441 The presence of "SUBSCRIBE" in the "Allow" header field of any 442 request or response indicates support for SIP Events; further, in the 443 absence of an "Allow" header field, the simple presence of an "Allow- 444 Events" header field is sufficient to indicate that the node that 445 sent the message is capable of acting as a notifier (see 446 Section 4.4.4). 448 The "methods" parameter for Contact may also be used to 449 specifically announce support for SUBSCRIBE and NOTIFY requests 450 when registering. (See [RFC3840] for details on the "methods" 451 parameter). 453 4.1.2. Creating and Maintaining Subscriptions 455 From the subscriber's perspective, a subscription proceeds according 456 to the following state diagram: 458 +-------------+ 459 | init |<-----------------------+ 460 +-------------+ | 461 | Retry-after 462 Send SUBSCRIBE expires 463 | | 464 V Timer N Fires; | 465 +-------------+ SUBSCRIBE failure | 466 +------------| notify_wait |-- response; --------+ | 467 | +-------------+ or NOTIFY, | | 468 | | state=terminated | | 469 | | | | 470 ++========|===================|============================|==|====++ 471 || | | V | || 472 || Receive NOTIFY, Receive NOTIFY, +-------------+ || 473 || state=active state=pending | terminated | || 474 || | | +-------------+ || 475 || | | Re-subscription A A || 476 || | V times out; | | || 477 || | +-------------+ Receive NOTIFY, | | || 478 || | | pending |-- state=terminated; --+ | || 479 || | +-------------+ or 481 response | || 480 || | | to SUBSCRIBE | || 481 || | Receive NOTIFY, refresh | || 482 || | state=active | || 483 || | | Re-subscription | || 484 || | V times out; | || 485 || | +-------------+ Receive NOTIFY, | || 486 || +----------->| active |-- state=terminated; -----+ || 487 || +-------------+ or 481 response || 488 || to SUBSCRIBE || 489 || Subscription refresh || 490 ++=================================================================++ 492 In the state diagram, "Re-subscription times out" means that an 493 attempt to refresh or update the subscription using a new SUBSCRIBE 494 request does not result in a NOTIFY request before the corresponding 495 Timer N expires. 497 Any transition from "notify_wait" into a "pending" or "active" state 498 results in a new subscription. Note that multiple subscriptions can 499 be generated as the result of a single SUBSCRIBE request (see 500 Section 4.4.1). Each of these new subscriptions exists in its own 501 independent state machine, and runs its own set of timers. 503 4.1.2.1. Requesting a Subscription 505 SUBSCRIBE is a dialog-creating method, as described in [RFC3261]. 507 When a subscriber wishes to subscribe to a particular state for a 508 resource, it forms a SUBSCRIBE request. If the initial SUBSCRIBE 509 request represents a request outside of a dialog (as it typically 510 will), its construction follows the procedures outlined in [RFC3261] 511 for UAC request generation outside of a dialog. 513 This SUBSCRIBE request will be confirmed with a final response. 200- 514 class responses indicate that the subscription has been accepted, and 515 that a NOTIFY request will be sent immediately. 517 The "Expires" header field in a 200-class response to SUBSCRIBE 518 request indicates the actual duration for which the subscription will 519 remain active (unless refreshed). 521 Non-200 class final responses indicate that no subscription or new 522 dialog usage has been created, and no subsequent NOTIFY request will 523 be sent. All non-200 class responses (with the exception of "489", 524 described herein) have the same meanings and handling as described in 525 [RFC3261]. For the sake of clarity: if a SUBSCRIBE request contains 526 an "Accept" header field, but that field does not indicate a media 527 type that the notifier is capable of generating in its NOTIFY 528 requests, then the proper error response is 406 (Not Acceptable). 530 4.1.2.2. Refreshing of Subscriptions 532 At any time before a subscription expires, the subscriber may refresh 533 the timer on such a subscription by sending another SUBSCRIBE request 534 on the same dialog as the existing subscription. The handling for 535 such a request is the same as for the initial creation of a 536 subscription except as described below. 538 If a SUBSCRIBE request to refresh a subscription receives a 404, 405, 539 410, 416, 480-485, 489, 501, or 604 response, the subscriber MUST 540 consider the subscription terminated. (See [RFC5057] for further 541 details and notes about the effect of error codes on dialogs and 542 usages within dialog, such as subscriptions). If the subscriber 543 wishes to re-subscribe to the state, he does so by composing an 544 unrelated initial SUBSCRIBE request with a freshly-generated Call-ID 545 and a new, unique "From" tag (see Section 4.1.2.1.) 547 If a SUBSCRIBE request to refresh a subscription fails with any error 548 code other than those listed above, the original subscription is 549 still considered valid for the duration of the most recently known 550 "Expires" value as negotiated by the most recent successful SUBSCRIBE 551 transaction, or as communicated by a NOTIFY request in its 552 "Subscription-State" header field "expires" parameter. 554 Note that many such errors indicate that there may be a problem 555 with the network or the notifier such that no further NOTIFY 556 requests will be received. 558 When refreshing a subscription, a subscriber starts Timer N, set to 559 64*T1, when it sends the SUBSCRIBE request. If this Timer N expires 560 prior to the receipt of a NOTIFY request, the subscriber considers 561 the subscription terminated. If the subscriber receives a success 562 response to the SUBSCRIBE request that indicates that no NOTIFY 563 request will be generated -- such as the 204 response defined for use 564 with the optional extension described in [RFC5839] -- then it MUST 565 cancel Timer N. 567 4.1.2.3. Unsubscribing 569 Unsubscribing is handled in the same way as refreshing of a 570 subscription, with the "Expires" header field set to "0". Note that 571 a successful unsubscription will also trigger a final NOTIFY request. 573 The final NOTIFY request may or may not contain information about the 574 state of the resource; subscribers need to be prepared to receive 575 final NOTIFY requests both with and without state. 577 4.1.2.4. Confirmation of Subscription Creation 579 The subscriber can expect to receive a NOTIFY request from each node 580 which has processed a successful subscription or subscription 581 refresh. To ensure that subscribers do not wait indefinitely for a 582 subscription to be established, a subscriber starts a Timer N, set to 583 64*T1, when it sends a SUBSCRIBE request. If this Timer N expires 584 prior to the receipt of a NOTIFY request, the subscriber considers 585 the subscription failed, and cleans up any state associated with the 586 subscription attempt. 588 Until Timer N expires, several NOTIFY requests may arrive from 589 different destinations (see Section 4.4.1). Each of these requests 590 establish a new dialog usage and a new subscription. After the 591 expiration of Timer N, the subscriber SHOULD reject any such NOTIFY 592 requests that would otherwise establish a new dialog usage with a 593 "481" response code. 595 Until the first NOTIFY request arrives, the subscriber should 596 consider the state of the subscribed resource to be in a neutral 597 state. Event package specifications MUST define this "neutral state" 598 in such a way that makes sense for their application (see 599 Section 5.4.7). 601 Due to the potential for both out-of-order messages and forking, the 602 subscriber MUST be prepared to receive NOTIFY requests before the 603 SUBSCRIBE transaction has completed. 605 Except as noted above, processing of this NOTIFY request is the same 606 as in Section 4.1.3. 608 4.1.3. Receiving and Processing State Information 610 Subscribers receive information about the state of a resource to 611 which they have subscribed in the form of NOTIFY requests. 613 Upon receiving a NOTIFY request, the subscriber should check that it 614 matches at least one of its outstanding subscriptions; if not, it 615 MUST return a "481 Subscription does not exist" response unless 616 another 400- or 500-class response is more appropriate. The rules 617 for matching NOTIFY requests with subscriptions that create a new 618 dialog usage are described in Section 4.4.1. Notifications for 619 subscriptions which were created inside an existing dialog match if 620 they are in the same dialog and the "Event" header fields match (as 621 described in Section 8.2.1). 623 If, for some reason, the event package designated in the "Event" 624 header field of the NOTIFY request is not supported, the subscriber 625 will respond with a "489 Bad Event" response. 627 To prevent spoofing of events, NOTIFY requests SHOULD be 628 authenticated, using any defined SIP authentication mechanism, such 629 as those described in sections 22.2 and 23 of [RFC3261]. 631 NOTIFY requests MUST contain "Subscription-State" header fields which 632 indicate the status of the subscription. 634 If the "Subscription-State" header field value is "active", it means 635 that the subscription has been accepted and (in general) has been 636 authorized. If the header field also contains an "expires" 637 parameter, the subscriber SHOULD take it as the authoritative 638 subscription duration and adjust accordingly. The "retry-after" and 639 "reason" parameters have no semantics for "active". 641 If the "Subscription-State" value is "pending", the subscription has 642 been received by the notifier, but there is insufficient policy 643 information to grant or deny the subscription yet. If the header 644 field also contains an "expires" parameter, the subscriber SHOULD 645 take it as the authoritative subscription duration and adjust 646 accordingly. No further action is necessary on the part of the 647 subscriber. The "retry-after" and "reason" parameters have no 648 semantics for "pending". 650 If the "Subscription-State" value is "terminated", the subscriber 651 MUST consider the subscription terminated. The "expires" parameter 652 has no semantics for "terminated" -- notifiers SHOULD NOT include an 653 "expires" parameter on a "Subscription-State" header field with a 654 value of "terminated," and subscribers MUST ignore any such 655 parameter, if present. If a reason code is present, the client 656 should behave as described below. If no reason code or an unknown 657 reason code is present, the client MAY attempt to re-subscribe at any 658 time (unless a "retry-after" parameter is present, in which case the 659 client SHOULD NOT attempt re-subscription until after the number of 660 seconds specified by the "retry-after" parameter). The reason codes 661 defined by this document are: 663 deactivated: The subscription has been terminated, but the 664 subscriber SHOULD retry immediately with a new subscription. One 665 primary use of such a status code is to allow migration of 666 subscriptions between nodes. The "retry-after" parameter has no 667 semantics for "deactivated". 669 probation: The subscription has been terminated, but the client 670 SHOULD retry at some later time. If a "retry-after" parameter is 671 also present, the client SHOULD wait at least the number of 672 seconds specified by that parameter before attempting to re- 673 subscribe. 675 rejected: The subscription has been terminated due to change in 676 authorization policy. Clients SHOULD NOT attempt to re-subscribe. 677 The "retry-after" parameter has no semantics for "rejected". 679 timeout: The subscription has been terminated because it was not 680 refreshed before it expired. Clients MAY re-subscribe 681 immediately. The "retry-after" parameter has no semantics for 682 "timeout". This reason code is also associated with polling of 683 resource state, as detailed in Section 4.4.3 685 giveup: The subscription has been terminated because the notifier 686 could not obtain authorization in a timely fashion. If a "retry- 687 after" parameter is also present, the client SHOULD wait at least 688 the number of seconds specified by that parameter before 689 attempting to re-subscribe; otherwise, the client MAY retry 690 immediately, but will likely get put back into pending state. 692 noresource: The subscription has been terminated because the 693 resource state which was being monitored no longer exists. 694 Clients SHOULD NOT attempt to re-subscribe. The "retry-after" 695 parameter has no semantics for "noresource". 697 invariant: The subscription has been terminated because the resource 698 state is guaranteed not to change for the foreseeable future. 699 This may be the case, for example, when subscribing to the 700 location information of a fixed-location land-line telephone. 701 When using this reason code, notifiers are advised to include a 702 "retry-after" parameter with a large value (for example, 31536000 703 -- or one year) to prevent older, RFC 3265-compliant clients from 704 periodically resubscribing. Clients SHOULD NOT attempt to 705 resubscribe after receiving a reason code of "invariant," 706 regardless of the presence of or value of a "retry-after" 707 parameter. 709 Other specifications may define new reason codes for use with the 710 "Subscription-State" header field. 712 Once the notification is deemed acceptable to the subscriber, the 713 subscriber SHOULD return a 200 response. In general, it is not 714 expected that NOTIFY responses will contain bodies; however, they 715 MAY, if the NOTIFY request contained an "Accept" header field. 717 Other responses defined in [RFC3261] may also be returned, as 718 appropriate. In no case should a NOTIFY transaction extend for any 719 longer than the time necessary for automated processing. In 720 particular, subscribers MUST NOT wait for a user response before 721 returning a final response to a NOTIFY request. 723 4.1.4. Forking of SUBSCRIBE Requests 725 In accordance with the rules for proxying non-INVITE requests as 726 defined in [RFC3261], successful SUBSCRIBE requests will receive only 727 one 200-class response; however, due to forking, the subscription may 728 have been accepted by multiple nodes. The subscriber MUST therefore 729 be prepared to receive NOTIFY requests with "From:" tags which differ 730 from the "To:" tag received in the SUBSCRIBE 200-class response. 732 If multiple NOTIFY requests are received in different dialogs in 733 response to a single SUBSCRIBE request, each dialog represents a 734 different destination to which the SUBSCRIBE request was forked. 735 Subscriber handling in such situations varies by event package; see 736 Section 5.4.9 for details. 738 4.2. Notifier Behavior 740 4.2.1. Subscription Establishment and Maintenance 742 Notifiers learn about subscription requests by receiving SUBSCRIBE 743 requests from interested parties. Notifiers MUST NOT create 744 subscriptions except upon receipt of a SUBSCRIBE request. However, 745 for historical reasons, the implicit creation of subscriptions as 746 defined in [RFC3515] is still permitted. 748 [RFC3265] allowed the creation of subscriptions using means other 749 than the SUBSCRIBE method. The only standardized use of this 750 mechanism is the REFER method [RFC3515]. Implementation 751 experience with REFER has shown that the implicit creation of a 752 subscription has a number of undesirable effects, such as the 753 inability to signal the success of a REFER request while signaling 754 a problem with the subscription; and difficulty performing one 755 action without the other. Additionally, the proper exchange of 756 dialog identifiers is difficult without dialog re-use (which has 757 its own set of problems; see Section 4.5). 759 4.2.1.1. Initial SUBSCRIBE Transaction Processing 761 In no case should a SUBSCRIBE transaction extend for any longer than 762 the time necessary for automated processing. In particular, 763 notifiers MUST NOT wait for a user response before returning a final 764 response to a SUBSCRIBE request. 766 This requirement is imposed primarily to prevent the non-INVITE 767 transaction timeout timer F (see [RFC3261]) from firing during the 768 SUBSCRIBE transaction, since interaction with a user would often 769 exceed 64*T1 seconds. 771 The notifier SHOULD check that the event package specified in the 772 "Event" header field is understood. If not, the notifier SHOULD 773 return a "489 Bad Event" response to indicate that the specified 774 event/event class is not understood. 776 The notifier SHOULD also perform any necessary authentication and 777 authorization per its local policy. See Section 4.2.1.3. 779 The notifier MAY also check that the duration in the "Expires" header 780 field is not too small. If and only if the expiration interval is 781 greater than zero AND smaller than one hour AND less than a notifier- 782 configured minimum, the notifier MAY return a "423 Interval Too 783 Brief" error which contains a "Min-Expires" header field field. The 784 "Min-Expires" header field is described in [RFC3261]. 786 Once the notifier determines that it has enough information to create 787 the subscription (i.e., it understands the event package, the 788 subscription pertains to a known resource, and there are no other 789 barriers to creating the subscription), it creates the subscription 790 and a dialog usage, and returns a 200 (OK) response. 792 When a subscription is created in the notifier, it stores the event 793 package name as part of the subscription information. 795 The "Expires" values present in SUBSCRIBE 200-class responses behave 796 in the same way as they do in REGISTER responses: the server MAY 797 shorten the interval, but MUST NOT lengthen it. 799 If the duration specified in a SUBSCRIBE request is unacceptably 800 short, the notifier may be able to send a 423 response, as 801 described earlier in this section. 803 200-class responses to SUBSCRIBE requests will not generally contain 804 any useful information beyond subscription duration; their primary 805 purpose is to serve as a reliability mechanism. State information 806 will be communicated via a subsequent NOTIFY request from the 807 notifier. 809 The other response codes defined in [RFC3261] may be used in response 810 to SUBSCRIBE requests, as appropriate. 812 4.2.1.2. Confirmation of Subscription Creation/Refreshing 814 Upon successfully accepting or refreshing a subscription, notifiers 815 MUST send a NOTIFY request immediately to communicate the current 816 resource state to the subscriber. This NOTIFY request is sent on the 817 same dialog as created by the SUBSCRIBE response. If the resource 818 has no meaningful state at the time that the SUBSCRIBE request is 819 processed, this NOTIFY request MAY contain an empty or neutral body. 820 See Section 4.2.2 for further details on NOTIFY request generation. 822 Note that a NOTIFY request is always sent immediately after any 200- 823 class response to a SUBSCRIBE request, regardless of whether the 824 subscription has already been authorized. 826 4.2.1.3. Authentication/Authorization of SUBSCRIBE Requests 828 Privacy concerns may require that notifiers apply policy to determine 829 whether a particular subscriber is authorized to subscribe to a 830 certain set of events. Such policy may be defined by mechanisms such 831 as access control lists or real-time interaction with a user. In 832 general, authorization of subscribers prior to authentication is not 833 particularly useful. 835 SIP authentication mechanisms are discussed in [RFC3261]. Note that, 836 even if the notifier node typically acts as a proxy, authentication 837 for SUBSCRIBE requests will always be performed via a "401" response, 838 not a "407". Notifiers always act as a user agents when accepting 839 subscriptions and sending notifications. 841 Of course, when acting as a proxy, a node will perform normal 842 proxy authentication (using 407). The foregoing explanation is a 843 reminder that notifiers are always UAs, and as such perform UA 844 authentication. 846 If authorization fails based on an access list or some other 847 automated mechanism (i.e., it can be automatically authoritatively 848 determined that the subscriber is not authorized to subscribe), the 849 notifier SHOULD reply to the request with a "403 Forbidden" or "603 850 Decline" response, unless doing so might reveal information that 851 should stay private; see Section 6.2. 853 If the notifier owner is interactively queried to determine whether a 854 subscription is allowed, a 200 (OK) response is returned immediately. 855 Note that a NOTIFY request is still formed and sent under these 856 circumstances, as described in the previous section. 858 If subscription authorization was delayed and the notifier wishes to 859 convey that such authorization has been declined, it may do so by 860 sending a NOTIFY request containing a "Subscription-State" header 861 field with a value of "terminated" and a reason parameter of 862 "rejected". 864 4.2.1.4. Refreshing of Subscriptions 866 When a notifier receives a subscription refresh, assuming that the 867 subscriber is still authorized, the notifier updates the expiration 868 time for subscription. As with the initial subscription, the server 869 MAY shorten the amount of time until expiration, but MUST NOT 870 increase it. The final expiration time is placed in the "Expires" 871 header field in the response. If the duration specified in a 872 SUBSCRIBE request is unacceptably short, the notifier SHOULD respond 873 with a "423 Interval Too Brief" response. 875 If no refresh for a notification address is received before its 876 expiration time, the subscription is removed. When removing a 877 subscription, the notifier SHOULD send a NOTIFY request with a 878 "Subscription-State" value of "terminated" to inform it that the 879 subscription is being removed. If such a request is sent, the 880 "Subscription-State" header field SHOULD contain a "reason=timeout" 881 parameter. 883 Clients can cause a subscription to be terminated immediately by 884 sending a SUBSCRIBE request with an "Expires" header field set to 885 '0'. Notifiers largely treat this the same way as any other 886 subscription expiration: they send a NOTIFY request containing a 887 "Subscription-State" of "terminated", with a reason code of 888 "timeout." For consistency with state polling (see Section 4.4.3) 889 and subscription refreshes, the notifier may choose to include 890 resource state in this final NOTIFY request. However, in some cases, 891 including such state makes no sense. Under such circumstances, the 892 notifier may choose to omit state information from the terminal 893 NOTIFY request. 895 The sending of a NOTIFY request when a subscription expires allows 896 the corresponding dialog usage to be terminated, if appropriate. 898 4.2.2. Sending State Information to Subscribers 900 Notifiers use the NOTIFY method to send information about the state 901 of a resource to subscribers. The notifier's view of a subscription 902 is shown in the following state diagram: 904 +-------------+ 905 | init | 906 +-------------+ 907 | 908 Receive SUBSCRIBE, 909 Send NOTIFY 910 | 911 V NOTIFY failure, 912 +-------------+ subscription expires, 913 +------------| resp_wait |-- or terminated ----+ 914 | +-------------+ per local policy | 915 | | | 916 | | | 917 | | V 918 Policy grants Policy needed +-------------+ 919 permission | | terminated | 920 | | +-------------+ 921 | | A A 922 | V NOTIFY failure, | | 923 | +-------------+ subscription expires,| | 924 | | pending |-- or terminated -------+ | 925 | +-------------+ per local policy | 926 | | | 927 | Policy changed to | 928 | grant permission | 929 | | | 930 | V NOTIFY failure, | 931 | +-------------+ subscription expires, | 932 +----------->| active |-- or terminated ---------+ 933 +-------------+ per local policy 935 When a SUBSCRIBE request is answered with a 200-class response, the 936 notifier MUST immediately construct and send a NOTIFY request to the 937 subscriber. When a change in the subscribed state occurs, the 938 notifier SHOULD immediately construct and send a NOTIFY request, 939 subject to authorization, local policy, and throttling 940 considerations. 942 If the NOTIFY request fails due to expiration of SIP Timer F 943 (transaction timeout), the notifier SHOULD remove the subscription. 945 This behavior prevents unnecessary transmission of state 946 information for subscribers who have crashed or disappeared from 947 the network. Because such transmissions will be sent multiple 948 times, per the retransmission algorithm defined in [RFC3261] 949 (instead of the typical single transmission for functioning 950 clients), continuing to service them when no client is available 951 to acknowledge them could place undue strain on a network. Upon 952 client restart or reestablishment of a network connection, it is 953 expected that clients will send SUBSCRIBE requests to refresh 954 potentially stale state information; such requests will re-install 955 subscriptions in all relevant nodes. 957 If the NOTIFY transaction fails due to the receipt of a 404, 405, 958 410, 416, 480-485, 489, 501, or 604 response to the NOTIFY request, 959 the notifier MUST remove the corresponding subscription. See 960 [RFC5057] for further details and notes about the effect of error 961 codes on dialogs and usages within dialog (such as subscriptions). 963 A notify error response would generally indicate that something 964 has gone wrong with the subscriber or with some proxy on the way 965 to the subscriber. If the subscriber is in error, it makes the 966 most sense to allow the subscriber to rectify the situation (by 967 re-subscribing) once the error condition has been handled. If a 968 proxy is in error, the periodic sending of SUBSCRIBE requests to 969 refresh the expiration timer will re-install subscription state 970 once the network problem has been resolved. 972 NOTIFY requests MUST contain a "Subscription-State" header field with 973 a value of "active", "pending", or "terminated". The "active" value 974 indicates that the subscription has been accepted and has been 975 authorized (in most cases; see Section 6.2). The "pending" value 976 indicates that the subscription has been received, but that policy 977 information is insufficient to accept or deny the subscription at 978 this time. The "terminated" value indicates that the subscription is 979 not active. 981 If the value of the "Subscription-State" header field is "active" or 982 "pending", the notifier MUST also include in the "Subscription-State" 983 header field an "expires" parameter which indicates the time 984 remaining on the subscription. The notifier MAY use this mechanism 985 to shorten a subscription; however, this mechanism MUST NOT be used 986 to lengthen a subscription. 988 Including expiration information for active and pending 989 subscriptions is necessary in case the SUBSCRIBE request forks, 990 since the response to a forked SUBSCRIBE request may not be 991 received by the subscriber. [RFC3265] allowed the notifier some 992 discretion in the inclusion of this parameter, so subscriber 993 implementations are warned to handle the lack of an "expires" 994 parameter gracefully. Note well that this "expires" value is a 995 parameter on the "Subscription-State" header field, NOT an 996 "Expires" header field. 998 The period of time for a subscription can be shortened to zero by 999 the notifier. In other words, it is perfectly valid for a 1000 SUBSCRIBE request with a non-zero expires to be answered with a 1001 NOTIFY request that contains "Subscription-Status: 1002 terminated;reason=expired". This merely means that the notifier 1003 has shortened the subscription timeout to zero, and the 1004 subscription has expired instantaneously. The body may contain 1005 valid state, or it may contain a neutral state (see 1006 Section 5.4.7). 1008 If the value of the "Subscription-State" header field is 1009 "terminated", the notifier SHOULD also include a "reason" parameter. 1010 The notifier MAY also include a "retry-after" parameter, where 1011 appropriate. For details on the value and semantics of the "reason" 1012 and "retry-after" parameters, see Section 4.1.3. 1014 4.2.3. PINT Compatibility 1016 The "Event" header field is considered mandatory for the purposes of 1017 this document. However, to maintain compatibility with PINT (see 1018 [RFC2848]), notifiers MAY interpret a SUBSCRIBE request with no 1019 "Event" header field as requesting a subscription to PINT events. If 1020 a notifier does not support PINT, it SHOULD return "489 Bad Event" to 1021 any SUBSCRIBE requests without an "Event" header field. 1023 4.3. Proxy Behavior 1025 Proxies need no additional behavior beyond that described in 1026 [RFC3261] to support SUBSCRIBE and NOTIFY transactions. If a proxy 1027 wishes to see all of the SUBSCRIBE and NOTIFY requests for a given 1028 dialog, it MUST add a Record-Route header field to the initial 1029 SUBSCRIBE request and all NOTIFY requests. It MAY choose to include 1030 Record-Route in subsequent SUBSCRIBE requests; however, these 1031 requests cannot cause the dialog's route set to be modified. 1033 Proxies that did not add a Record-Route header field to the initial 1034 SUBSCRIBE request MUST NOT add a Record-Route header field to any of 1035 the associated NOTIFY requests. 1037 Note that subscribers and notifiers may elect to use S/MIME 1038 encryption of SUBSCRIBE and NOTIFY requests; consequently, proxies 1039 cannot rely on being able to access any information that is not 1040 explicitly required to be proxy-readable by [RFC3261]. 1042 4.4. Common Behavior 1043 4.4.1. Dialog Creation and Termination 1045 Dialogs usages are created upon completion of a NOTIFY transaction 1046 for a new subscription, unless the NOTIFY request contains a 1047 "Subscription-State" of "terminated." 1049 Because the dialog usage is established by the NOTIFY request, the 1050 route set at the subscriber is taken from the NOTIFY request itself, 1051 as opposed to the route set present in the 200-class response to the 1052 SUBSCRIBE request. 1054 NOTIFY requests are matched to such SUBSCRIBE requests if they 1055 contain the same "Call-ID", a "To" header field "tag" parameter which 1056 matches the "From" header field "tag" parameter of the SUBSCRIBE 1057 request, and the same "Event" header field. Rules for comparisons of 1058 the "Event" header fields are described in Section 8.2.1. 1060 A subscription is destroyed after a notifier sends a NOTIFY request 1061 with a "Subscription-State" of "terminated," or in certain error 1062 situations described elsewhere in this document. The subscriber will 1063 generally answer such final requests with a "200 OK" response (unless 1064 a condition warranting an alternate response has arisen). Except 1065 when the mechanism described in Section 4.5.2 is used, the 1066 destruction of a subscription results in the termination of its 1067 associated dialog. 1069 A subscriber may send a SUBSCRIBE request with an "Expires" header 1070 field of 0 in order to trigger the sending of such a NOTIFY 1071 request; however, for the purposes of subscription and dialog 1072 lifetime, the subscription is not considered terminated until the 1073 NOTIFY transaction with a "Subscription-State" of "terminated" 1074 completes. 1076 4.4.2. Notifier Migration 1078 It is often useful to allow migration of subscriptions between 1079 notifiers. Such migration may be effected by sending a NOTIFY 1080 request with a "Subscription-State" header field of "terminated", and 1081 a reason parameter of "deactivated". This NOTIFY request is 1082 otherwise normal, and is formed as described in Section 4.2.2. 1084 Upon receipt of this NOTIFY request, the subscriber SHOULD attempt to 1085 re-subscribe (as described in the preceding sections). Note that 1086 this subscription is established on a new dialog, and does not re-use 1087 the route set from the previous subscription dialog. 1089 The actual migration is effected by making a change to the policy 1090 (such as routing decisions) of one or more servers to which the 1091 SUBSCRIBE request will be sent in such a way that a different node 1092 ends up responding to the SUBSCRIBE request. This may be as simple 1093 as a change in the local policy in the notifier from which the 1094 subscription is migrating so that it serves as a proxy or redirect 1095 server instead of a notifier. 1097 Whether, when, and why to perform notifier migrations may be 1098 described in individual event packages; otherwise, such decisions are 1099 a matter of local notifier policy, and are left up to individual 1100 implementations. 1102 4.4.3. Polling Resource State 1104 A natural consequence of the behavior described in the preceding 1105 sections is that an immediate fetch without a persistent subscription 1106 may be effected by sending a SUBSCRIBE with an "Expires" of 0. 1108 Of course, an immediate fetch while a subscription is active may be 1109 effected by sending a SUBSCRIBE request with an "Expires" equal to 1110 the number of seconds remaining in the subscription. 1112 Upon receipt of this SUBSCRIBE request, the notifier (or notifiers, 1113 if the SUBSCRIBE request was forked) will send a NOTIFY request 1114 containing resource state in the same dialog. 1116 Note that the NOTIFY requests triggered by SUBSCRIBE requests with 1117 "Expires" header fields of 0 will contain a "Subscription-State" 1118 value of "terminated", and a "reason" parameter of "timeout". 1120 Polling of event state can cause significant increases in load on the 1121 network and notifiers; as such, it should be used only sparingly. In 1122 particular, polling SHOULD NOT be used in circumstances in which it 1123 will typically result in more network messages than long-running 1124 subscriptions. 1126 When polling is used, subscribers SHOULD attempt to cache 1127 authentication credentials between polls so as to reduce the number 1128 of messages sent. 1130 Due to the requirement on notifiers to send a NOTIFY request 1131 immediately upon receipt of a SUBSCRIBE request, the state 1132 provided by polling is limited to the information that the 1133 notifier has immediate local access to when it receives the 1134 SUBSCRIBE request. If, for example, the notifier generally needs 1135 to retrieve state from another network server, then that state 1136 will be absent from the NOTIFY request that results from polling. 1138 4.4.4. Allow-Events header field usage 1140 The "Allow-Events" header field, if present, MUST include a 1141 comprehensive and inclusive list of tokens which indicates the event 1142 packages for which the User Agent can act as a notifier. In other 1143 words, a user agent sending an "Allow-Events" header field is 1144 advertising that it can process SUBSCRIBE requests and generate 1145 NOTIFY requests for all of the event packages listed in that header 1146 field. 1148 Any user agent that can act as a notifier for one or more event 1149 packages SHOULD include an appropriate "Allow-Events" header field 1150 indicating all supported events in all methods which initiate dialogs 1151 and their responses (such as INVITE) and OPTIONS responses. 1153 This information is very useful, for example, in allowing user 1154 agents to render particular interface elements appropriately 1155 according to whether the events required to implement the features 1156 they represent are supported by the appropriate nodes. 1157 On the other hand, it doesn't necessarily make much sense to 1158 indicate supported events inside a dialog established by a NOTIFY 1159 request if the only event package supported is the one associated 1160 with that subscription. 1162 Note that "Allow-Events" header fields MUST NOT be inserted by 1163 proxies. 1165 The "Allow-Events" header field does not include a list of the event 1166 template packages supported by an implementation. If a subscriber 1167 wishes to determine which event template packages are supported by a 1168 notifier, it can probe for such support by attempting to subscribe to 1169 the event template packages it wishes to use. 1171 4.5. Targeting Subscriptions at Devices 1173 [RFC3265] defined a mechanism by which subscriptions could share 1174 dialogs with invite usages and with other subscriptions. The purpose 1175 of this behavior was to allow subscribers to ensure that a 1176 subscription arrived at the same device as an established dialog. 1177 Unfortunately, the re-use of dialogs has proven to be exceedingly 1178 confusing. [RFC5057] attempted to clarify proper behavior in a 1179 variety of circumstances; however, the ensuing rules remain confusing 1180 and prone to implementation error. At the same time, the mechanism 1181 described in [RFC5627] now provides a far more elegant and 1182 unambiguous means to achieve the same goal. 1184 Consequently, the dialog re-use technique described in RFC 3265 is 1185 now deprecated. 1187 This dialog-sharing technique has also historically been used as a 1188 means for targeting an event package at a dialog. This usage can be 1189 seen, for example, in certain applications of the REFER method 1190 [RFC3515]. With the removal of dialog re-use, an alternate (and more 1191 explicit) means of targeting dialogs needs to be used for this type 1192 of correlation. The appropriate means of such targeting is left up 1193 to the actual event packages. Candidates include the "Target-Dialog" 1194 header field [RFC4538], the "Join" header field [RFC3911], and the 1195 "Replaces" header field [RFC3891], depending on the semantics 1196 desired. Alternately, if the semantics of those header fields do not 1197 match the event package's purpose for correlation, event packages can 1198 devise their own means of identifying dialogs. For an example of 1199 this approach, see the Dialog Event Package [RFC4235]. 1201 4.5.1. Using GRUUs to Route to Devices 1203 Notifiers MUST implement the Globally Routable User-Agent URI (GRUU) 1204 extension defined in [RFC5627], and MUST use a GRUU as their local 1205 target. This allows subscribers to explicitly target desired 1206 devices. 1208 If a subscriber wishes to subscribe to a resource on the same device 1209 as an established dialog, it should check whether the remote contact 1210 in that dialog is a GRUU (i.e., whether it contains a "gr" URI 1211 parameter). If so, the subscriber creates a new dialog, using the 1212 GRUU as the request URI for the new SUBSCRIBE request. 1214 Because GRUUs are guaranteed to route to a a specific device, this 1215 ensures that the subscription will be routed to the same place as 1216 the established dialog. 1218 4.5.2. Sharing Dialogs 1220 For compatibility with older clients, subscriber and notifier 1221 implementations may choose to allow dialog sharing. The behavior of 1222 multiple usages within a dialog are described in [RFC5057]. 1224 Subscribers MUST NOT attempt to re-use dialogs whose remote target is 1225 a GRUU. 1227 Note that the techniques described in this section are included 1228 for backwards compatibility purposes only. Because subscribers 1229 cannot re-use dialogs with a GRUU for their remote target, and 1230 because notifiers must use GRUUs as their local target, any two 1231 implementations that conform to this specification will 1232 automatically use the mechanism described in Section 4.5.1. 1234 Further note that the prohibition on re-using dialogs does not 1235 exempt implicit subscriptions created by the REFER method. This 1236 means that implementations complying with this specification are 1237 required to use the "Target-Dialog" mechanism described in 1238 [RFC4538] when the remote target is a GRUU. 1240 If a subscriber wishes to subscribe to a resource on the same device 1241 as an established dialog and the remote contact is not a GRUU, it MAY 1242 revert to dialog sharing behavior. Alternately, it MAY choose to 1243 treat the remote party as incapable of servicing the subscription 1244 (i.e., the same way it would behave if the remote party did not 1245 support SIP events at all). 1247 If a notifier receives a SUBSCRIBE request for a new subscription on 1248 an existing dialog, it MAY choose to implement dialog sharing 1249 behavior. Alternately, it may choose to fail the SUBSCRIBE request 1250 with a 403 response. The error text of such 403 responses SHOULD 1251 indicate that dialog sharing is not supported. 1253 To implement dialog sharing, subscribers and notifiers perform the 1254 following additional processing: 1256 o When subscriptions exist in dialogs associated with INVITE-created 1257 application state and/or other subscriptions, these sets of 1258 application state do not interact beyond the behavior described 1259 for a dialog (e.g., route set handling). In particular, multiple 1260 subscriptions within a dialog are expire independently, and 1261 require independent subscription refreshes. 1263 o If a subscription's destruction leaves no other application state 1264 associated with the dialog, the dialog terminates. The 1265 destruction of other application state (such as that created by an 1266 INVITE) will not terminate the dialog if a subscription is still 1267 associated with that dialog. This means that, when dialog are re- 1268 used, then a dialog created with an INVITE does not necessarily 1269 terminate upon receipt of a BYE. Similarly, in the case that 1270 several subscriptions are associated with a single dialog, the 1271 dialog does not terminate until all the subscriptions in it are 1272 destroyed. 1274 o Subscribers MAY include an "id" parameter in SUBSCRIBE request 1275 "Event" header field to allow differentiation between multiple 1276 subscriptions in the same dialog. This "id" parameter, if 1277 present, contains an opaque token which identifies the specific 1278 subscription within a dialog. An "id" parameter is only valid 1279 within the scope of a single dialog. 1281 o If an "id" parameter is present in the SUBSCRIBE request used to 1282 establish a subscription, that "id" parameter MUST also be present 1283 in all corresponding NOTIFY requests. 1285 o When a subscriber refreshes a the subscription timer, the 1286 SUBSCRIBE request MUST contain the same "Event" header field "id" 1287 parameter as was present in the SUBSCRIBE request that created the 1288 subscription. (Otherwise, the notifier will interpret the 1289 SUBSCRIBE request as a request for a new subscription in the same 1290 dialog). 1292 o When a subscription is created in the notifier, it stores any 1293 "Event" header field "id" parameter as part of the subscription 1294 information (along with the event package name). 1296 o If an initial SUBSCRIBE request is sent on a pre-existing dialog, 1297 a matching NOTIFY request merely creates a new subscription 1298 associated with that dialog. 1300 4.6. CANCEL Requests for SUBSCRIBE and NOTIFY Transactions 1302 Neither SUBSCRIBE nor NOTIFY requests can be canceled. If a UAS 1303 receives a CANCEL request that matches a known SUBSCRIBE or NOTIFY 1304 transaction, it MUST respond to the CANCEL request, but otherwise 1305 ignore it. In particular, the CANCEL request MUST NOT affect 1306 processing of the SUBSCRIBE or NOTIFY request in any way. 1308 UACs SHOULD NOT send CANCEL requests for SUBSCRIBE or NOTIFY 1309 transactions. 1311 5. Event Packages 1313 This section covers several issues which should be taken into 1314 consideration when event packages based on the SUBSCRIBE and NOTIFY 1315 methods are proposed. Event package definitions contain sections 1316 addressing each of these issues, ideally in the same order and with 1317 the same titles as the following sections. 1319 5.1. Appropriateness of Usage 1321 When designing an event package using the methods described in this 1322 document for event notification, it is important to consider: is SIP 1323 an appropriate mechanism for the problem set? Is SIP being selected 1324 because of some unique feature provided by the protocol (e.g., user 1325 mobility), or merely because "it can be done?" If you find yourself 1326 defining event packages for notifications related to, for example, 1327 network management or the temperature inside your car's engine, you 1328 may want to reconsider your selection of protocols. 1330 Those interested in extending the mechanism defined in this 1331 document are urged to follow the development of "Guidelines for 1332 Authors of SIP Extensions" [RFC4485] for further guidance 1333 regarding appropriate uses of SIP. 1335 Further, it is expected that this mechanism is not to be used in 1336 applications where the frequency of reportable events is excessively 1337 rapid (e.g., more than about once per second). A SIP network is 1338 generally going to be provisioned for a reasonable signaling volume; 1339 sending a notification every time a user's GPS position changes by 1340 one hundredth of a second could easily overload such a network. 1342 5.2. Event Template-packages 1344 Normal event packages define a set of state applied to a specific 1345 type of resource, such as user presence, call state, and messaging 1346 mailbox state. 1348 Event template-packages are a special type of package which define a 1349 set of state applied to other packages, such as statistics, access 1350 policy, and subscriber lists. Event template-packages may even be 1351 applied to other event template-packages. 1353 To extend the object-oriented analogy made earlier, event template- 1354 packages can be thought of as templatized C++ packages which must be 1355 applied to other packages to be useful. 1357 The name of an event template-package as applied to a package is 1358 formed by appending a period followed by the event template-package 1359 name to the end of the package. For example, if a template-package 1360 called "winfo" were being applied to a package called "presence", the 1361 event token used in the "Event" header field would be 1362 "presence.winfo". 1364 Event template-packages must be defined so that they can be applied 1365 to any arbitrary package. In other words, event template-packages 1366 cannot be specifically tied to one or a few "parent" packages in such 1367 a way that they will not work with other packages. 1369 5.3. Amount of State to be Conveyed 1371 When designing event packages, it is important to consider the type 1372 of information which will be conveyed during a notification. 1374 A natural temptation is to convey merely the event (e.g., "a new 1375 voice message just arrived") without accompanying state (e.g., "7 1376 total voice messages"). This complicates implementation of 1377 subscribing entities (since they have to maintain complete state for 1378 the entity to which they have subscribed), and also is particularly 1379 susceptible to synchronization problems. 1381 There are two possible solutions to this problem that event packages 1382 may choose to implement. 1384 5.3.1. Complete State Information 1386 In general, event packages need to be able to convey a well-defined 1387 and complete state, rather than just a stream of events. If it is 1388 not possible to describe complete system state for transmission in 1389 NOTIFY requests, then the problem set is not a good candidate for an 1390 event package. 1392 For packages which typically convey state information that is 1393 reasonably small (on the order of 1 KB or so), it is suggested that 1394 event packages are designed so as to send complete state information 1395 whenever an event occurs. 1397 In some circumstances, conveying the current state alone may be 1398 insufficient for a particular class of events. In these cases, the 1399 event packages should include complete state information along with 1400 the event that occurred. For example, conveying "no customer service 1401 representatives available" may not be as useful as conveying "no 1402 customer service representatives available; representative 1403 sip:46@cs.xyz.int just logged off". 1405 5.3.2. State Deltas 1407 In the case that the state information to be conveyed is large, the 1408 event package may choose to detail a scheme by which NOTIFY requests 1409 contain state deltas instead of complete state. 1411 Such a scheme would work as follows: any NOTIFY request sent in 1412 immediate response to a SUBSCRIBE request contains full state 1413 information. NOTIFY requests sent because of a state change will 1414 contain only the state information that has changed; the subscriber 1415 will then merge this information into its current knowledge about the 1416 state of the resource. 1418 Any event package that supports delta changes to states MUST include 1419 a version number that increases by exactly one for each NOTIFY 1420 transaction in a subscription. Note that the state version number 1421 appears in the body of the message, not in a SIP header field. 1423 If a NOTIFY request arrives that has a version number that is 1424 incremented by more than one, the subscriber knows that a state delta 1425 has been missed; it ignores the NOTIFY request containing the state 1426 delta (except for the version number, which it retains to detect 1427 message loss), and re-sends a SUBSCRIBE request to force a NOTIFY 1428 request containing a complete state snapshot. 1430 5.4. Event Package Responsibilities 1432 Event packages are not required to reiterate any of the behavior 1433 described in this document, although they may choose to do so for 1434 clarity or emphasis. In general, though, such packages are expected 1435 to describe only the behavior that extends or modifies the behavior 1436 described in this document. 1438 Note that any behavior designated with "SHOULD" or "MUST" in this 1439 document is not allowed to be weakened by extension documents; 1440 however, such documents may elect to strengthen "SHOULD" requirements 1441 to "MUST" strength if required by their application. 1443 In addition to the normal sections expected in standards-track 1444 RFCs and SIP extension documents, authors of event packages need 1445 to address each of the issues detailed in the following 1446 subsections, whenever applicable. 1448 5.4.1. Event Package Name 1450 This section, which MUST be present, defines the token name to be 1451 used to designate the event package. It MUST include the information 1452 which appears in the IANA registration of the token. For information 1453 on registering such types, see Section 7. 1455 5.4.2. Event Package Parameters 1457 If parameters are to be used on the "Event" header field to modify 1458 the behavior of the event package, the syntax and semantics of such 1459 header fields MUST be clearly defined. 1461 Any "Event" header field parameters defined by an event package MUST 1462 be registered in the "Header Field Parameters and Parameter Values" 1463 registry defined by [RFC3968]. An "Event" header field parameter, 1464 once registered in conjunction with an event package, MUST NOT be re- 1465 used with any other event package. Non-event-package specifications 1466 MAY define "Event" header field parameters that apply across all 1467 event packages (with emphasis on "all", as opposed to "several"), 1468 such as the "id" parameter defined in this document. The restriction 1469 of a parameter to use with a single event package only applies to 1470 parameters that are defined in conjunction with an event package. 1472 5.4.3. SUBSCRIBE Request Bodies 1474 It is expected that most, but not all, event packages will define 1475 syntax and semantics for SUBSCRIBE request bodies; these bodies will 1476 typically modify, expand, filter, throttle, and/or set thresholds for 1477 the class of events being requested. Designers of event packages are 1478 strongly encouraged to re-use existing media types for message bodies 1479 where practical. See [RFC4288] for information on media type 1480 specification and registration. 1482 This mandatory section of an event package defines what type or types 1483 of event bodies are expected in SUBSCRIBE requests (or specify that 1484 no event bodies are expected). It should point to detailed 1485 definitions of syntax and semantics for all referenced body types. 1487 5.4.4. Subscription Duration 1489 It is RECOMMENDED that event packages give a suggested range of times 1490 considered reasonable for the duration of a subscription. Such 1491 packages MUST also define a default "Expires" value to be used if 1492 none is specified. 1494 5.4.5. NOTIFY Request Bodies 1496 The NOTIFY request body is used to report state on the resource being 1497 monitored. Each package MUST define what type or types of event 1498 bodies are expected in NOTIFY requests. Such packages MUST specify 1499 or cite detailed specifications for the syntax and semantics 1500 associated with such event body. 1502 Event packages also MUST define which media type is to be assumed if 1503 none are specified in the "Accept" header field of the SUBSCRIBE 1504 request. 1506 5.4.6. Notifier processing of SUBSCRIBE requests 1508 This section describes the processing to be performed by the notifier 1509 upon receipt of a SUBSCRIBE request. Such a section is required. 1511 Information in this section includes details of how to authenticate 1512 subscribers and authorization issues for the package. 1514 5.4.7. Notifier generation of NOTIFY requests 1516 This section of an event package describes the process by which the 1517 notifier generates and sends a NOTIFY request. This includes 1518 detailed information about what events cause a NOTIFY request to be 1519 sent, how to compute the state information in the NOTIFY, how to 1520 generate neutral or fake state information to hide authorization 1521 delays and decisions from users, and whether state information is 1522 complete or deltas for notifications; see Section 5.3. Such a 1523 section is required. 1525 This section may optionally describe the behavior used to process the 1526 subsequent response. 1528 5.4.8. Subscriber processing of NOTIFY requests 1530 This section of an event package describes the process followed by 1531 the subscriber upon receipt of a NOTIFY request, including any logic 1532 required to form a coherent resource state (if applicable). 1534 5.4.9. Handling of forked requests 1536 Each event package MUST specify whether forked SUBSCRIBE requests are 1537 allowed to install multiple subscriptions. 1539 If such behavior is not allowed, the first potential dialog- 1540 establishing message will create a dialog. All subsequent NOTIFY 1541 requests which correspond to the SUBSCRIBE request (i.e., match "To", 1542 "From", "From" header field "tag" parameter, "Call-ID", "Event", and 1543 "Event" header field "id" parameter) but which do not match the 1544 dialog would be rejected with a 481 response. Note that the 200- 1545 class response to the SUBSCRIBE request can arrive after a matching 1546 NOTIFY request has been received; such responses might not correlate 1547 to the same dialog established by the NOTIFY request. Except as 1548 required to complete the SUBSCRIBE transaction, such non-matching 1549 200-class responses are ignored. 1551 If installing of multiple subscriptions by way of a single forked 1552 SUBSCRIBE request is allowed, the subscriber establishes a new dialog 1553 towards each notifier by returning a 200-class response to each 1554 NOTIFY request. Each dialog is then handled as its own entity, and 1555 is refreshed independent of the other dialogs. 1557 In the case that multiple subscriptions are allowed, the event 1558 package MUST specify whether merging of the notifications to form a 1559 single state is required, and how such merging is to be performed. 1560 Note that it is possible that some event packages may be defined in 1561 such a way that each dialog is tied to a mutually exclusive state 1562 which is unaffected by the other dialogs; this MUST be clearly stated 1563 if it is the case. 1565 5.4.10. Rate of notifications 1567 Each event package is expected to define a requirement (SHOULD or 1568 MUST strength) which defines an absolute maximum on the rate at which 1569 notifications are allowed to be generated by a single notifier. 1571 Each package MAY further define a throttle mechanism which allows 1572 subscribers to further limit the rate of notification. 1574 5.4.11. State Aggregation 1576 Many event packages inherently work by collecting information about a 1577 resource from a number of other sources -- either through the use of 1578 PUBLISH [RFC3903], by subscribing to state information, or through 1579 other state gathering mechanisms. 1581 Event packages that involve retrieval of state information for a 1582 single resource from more than one source need to consider how 1583 notifiers aggregate information into a single, coherent state. Such 1584 packages MUST specify how notifiers aggregate information and how 1585 they provide authentication and authorization. 1587 5.4.12. Examples 1589 Event packages SHOULD include several demonstrative message flow 1590 diagrams paired with several typical, syntactically correct, and 1591 complete messages. 1593 It is RECOMMENDED that documents describing event packages clearly 1594 indicate that such examples are informative and not normative, with 1595 instructions that implementors refer to the main text of the document 1596 for exact protocol details. 1598 5.4.13. Use of URIs to Retrieve State 1600 Some types of event packages may define state information which is 1601 potentially too large to reasonably send in a SIP message. To 1602 alleviate this problem, event packages may include the ability to 1603 convey a URI instead of state information; this URI will then be used 1604 to retrieve the actual state information. 1606 [RFC4483] defines a mechanism that can be used by event packages to 1607 convey information in such a fashion. 1609 6. Security Considerations 1610 6.1. Access Control 1612 The ability to accept subscriptions should be under the direct 1613 control of the notifier's user, since many types of events may be 1614 considered sensitive for the purposes of privacy. Similarly, the 1615 notifier should have the ability to selectively reject subscriptions 1616 based on the subscriber identity (based on access control lists), 1617 using standard SIP authentication mechanisms. The methods for 1618 creation and distribution of such access control lists is outside the 1619 scope of this document. 1621 6.2. Notifier Privacy Mechanism 1623 The mere act of returning certain 4xx and 6xx responses to SUBSCRIBE 1624 requests may, under certain circumstances, create privacy concerns by 1625 revealing sensitive policy information. In these cases, the notifier 1626 SHOULD always return a 200 (OK) response. While the subsequent 1627 NOTIFY request may not convey true state, it MUST appear to contain a 1628 potentially correct piece of data from the point of view of the 1629 subscriber, indistinguishable from a valid response. Information 1630 about whether a user is authorized to subscribe to the requested 1631 state is never conveyed back to the original user under these 1632 circumstances. 1634 Individual packages and their related documents for which such a mode 1635 of operation makes sense can further describe how and why to generate 1636 such potentially correct data. For example, such a mode of operation 1637 is mandated by [RFC2779] for user presence information. 1639 6.3. Denial-of-Service attacks 1641 The current model (one SUBSCRIBE request triggers a SUBSCRIBE 1642 response and one or more NOTIFY requests) is a classic setup for an 1643 amplifier node to be used in a smurf attack. 1645 Also, the creation of state upon receipt of a SUBSCRIBE request can 1646 be used by attackers to consume resources on a victim's machine, 1647 rendering it unusable. 1649 To reduce the chances of such an attack, implementations of notifiers 1650 SHOULD require authentication. Authentication issues are discussed 1651 in [RFC3261]. 1653 6.4. Replay Attacks 1655 Replaying of either SUBSCRIBE or NOTIFY requests can have detrimental 1656 effects. 1658 In the case of SUBSCRIBE requests, attackers may be able to install 1659 any arbitrary subscription which it witnessed being installed at some 1660 point in the past. Replaying of NOTIFY requests may be used to spoof 1661 old state information (although a good versioning mechanism in the 1662 body of the NOTIFY requests may help mitigate such an attack). Note 1663 that the prohibition on sending NOTIFY requests to nodes which have 1664 not subscribed to an event also aids in mitigating the effects of 1665 such an attack. 1667 To prevent such attacks, implementations SHOULD require 1668 authentication with anti-replay protection. Authentication issues 1669 are discussed in [RFC3261]. 1671 6.5. Man-in-the middle attacks 1673 Even with authentication, man-in-the-middle attacks using SUBSCRIBE 1674 requests may be used to install arbitrary subscriptions, hijack 1675 existing subscriptions, terminate outstanding subscriptions, or 1676 modify the resource to which a subscription is being made. To 1677 prevent such attacks, implementations SHOULD provide integrity 1678 protection across "Contact", "Route", "Expires", "Event", and "To" 1679 header fields of SUBSCRIBE requests, at a minimum. If SUBSCRIBE 1680 request bodies are used to define further information about the state 1681 of the call, they SHOULD be included in the integrity protection 1682 scheme. 1684 Man-in-the-middle attacks may also attempt to use NOTIFY requests to 1685 spoof arbitrary state information and/or terminate outstanding 1686 subscriptions. To prevent such attacks, implementations SHOULD 1687 provide integrity protection across the "Call-ID", "CSeq", and 1688 "Subscription-State" header fields and the bodies of NOTIFY requests. 1690 Integrity protection of message header fields and bodies is discussed 1691 in [RFC3261]. 1693 6.6. Confidentiality 1695 The state information contained in a NOTIFY request has the potential 1696 to contain sensitive information. Implementations MAY encrypt such 1697 information to ensure confidentiality. 1699 While less likely, it is also possible that the information contained 1700 in a SUBSCRIBE request contains information that users might not want 1701 to have revealed. Implementations MAY encrypt such information to 1702 ensure confidentiality. 1704 To allow the remote party to hide information it considers sensitive, 1705 all implementations SHOULD be able to handle encrypted SUBSCRIBE and 1706 NOTIFY requests. 1708 The mechanisms for providing confidentiality are detailed in 1709 [RFC3261]. 1711 7. IANA Considerations 1713 (This section is not applicable until this document is published as 1714 an RFC.) 1716 7.1. Event Packages 1718 This document defines an event-type namespace which requires a 1719 central coordinating body. The body chosen for this coordination is 1720 the Internet Assigned Numbers Authority (IANA). 1722 There are two different types of event-types: normal event packages, 1723 and event template-packages; see Section 5.2. To avoid confusion, 1724 template-package names and package names share the same namespace; in 1725 other words, an event template-package MUST NOT share a name with a 1726 package. 1728 Policies for registration of SIP event packages and SIP event package 1729 templates are defined in section 4.1 of [RFC5727]. 1731 Registrations with the IANA MUST include the token being registered 1732 and whether the token is a package or a template-package. Further, 1733 packages MUST include contact information for the party responsible 1734 for the registration and/or a published document which describes the 1735 event package. Event template-package token registrations MUST 1736 include a pointer to the published RFC which defines the event 1737 template-package. 1739 Registered tokens to designate packages and template-packages MUST 1740 NOT contain the character ".", which is used to separate template- 1741 packages from packages. 1743 7.1.1. Registration Information 1745 As this document specifies no package or template-package names, the 1746 initial IANA registration for event types will be empty. The 1747 remainder of the text in this section gives an example of the type of 1748 information to be maintained by the IANA; it also demonstrates all 1749 five possible permutations of package type, contact, and reference. 1751 The table below lists the event packages and template-packages 1752 defined in "SIP-Specific Event Notification" [RFC xxxx]. Each name 1753 is designated as a package or a template-package under "Type". 1755 Package Name Type Contact Reference 1756 ------------ ---- ------- --------- 1757 example1 package [Roach] 1758 example2 package [Roach] [RFC xxxx] 1759 example3 package [RFC xxxx] 1760 example4 template [Roach] [RFC xxxx] 1761 example5 template [RFC xxxx] 1763 PEOPLE 1764 ------ 1765 [Roach] Adam Roach 1767 REFERENCES 1768 ---------- 1769 [RFC xxxx] A.B. Roach, "SIP-Specific Event Notification", RFC XXXX, 1770 Monthname 20XX 1772 7.1.2. Registration Template 1774 To: ietf-sip-events@iana.org 1775 Subject: Registration of new SIP event package 1777 Package Name: 1779 (Package names must conform to the syntax described in 1780 Section 8.2.1.) 1782 Is this registration for a Template Package: 1784 (indicate yes or no) 1786 Published Specification(s): 1788 (Template packages require a published RFC. Other packages may 1789 reference a specification when appropriate). 1791 Person & email address to contact for further information: 1793 7.2. Reason Codes 1795 This document further defines "reason" codes for use in the 1796 "Subscription-State" header field (see Section 4.1.3). 1798 Following the policies outlined in "Guidelines for Writing an IANA 1799 Considerations Section in RFCs" [RFC5226], new reason codes require a 1800 Standards Action. 1802 Registrations with the IANA include the reason code being registered 1803 and a reference to a published document which describes the event 1804 package. Insertion of such values takes place as part of the RFC 1805 publication process or as the result of inter-SDO liaison activity. 1806 New reason codes must conform to the syntax of the ABNF "token" 1807 element defined in [RFC3261]. 1809 [RFC4660] defined a new reason code prior to the establishment of an 1810 IANA registry. We include its reason code ("badfilter") in the 1811 initial list of reason codes to ensure a complete registry. 1813 The IANA registry for reason code will be initialized with the 1814 following values: 1816 Reason Code Reference 1817 ----------- --------- 1818 deactivated [RFC xxxx] 1819 probation [RFC xxxx] 1820 rejected [RFC xxxx] 1821 timeout [RFC xxxx] 1822 giveup [RFC xxxx] 1823 noresource [RFC xxxx] 1824 invariant [RFC xxxx] 1825 badfilter [RFC 4660] 1827 REFERENCES 1828 ---------- 1829 [RFC xxxx] A.B. Roach, "SIP-Specific Event Notification", RFC XXXX, 1830 Monthname 20XX 1832 [RFC 4660] Khartabil, H., Leppanen, E., Lonnfors, M., and 1833 J. Costa-Requena, "Functional Description of Event 1834 Notification Filtering", September 2006. 1836 7.3. Header Field Names 1838 This document registers three new header field names, described 1839 elsewhere in this document. These header fields are defined by the 1840 following information, which is to be added to the header field sub- 1841 registry under http://www.iana.org/assignments/sip-parameters. 1843 Header Name: Allow-Events 1844 Compact Form: u 1846 Header Name: Subscription-State 1847 Compact Form: (none) 1849 Header Name: Event 1850 Compact Form: o 1852 7.4. Response Codes 1854 This document registers two new response codes. These response codes 1855 are defined by the following information, which is to be added to the 1856 method and response-code sub-registry under 1857 http://www.iana.org/assignments/sip-parameters. 1859 Response Code Number: 202 1860 Default Reason Phrase: Accepted 1862 Response Code Number: 489 1863 Default Reason Phrase: Bad Event 1865 8. Syntax 1867 This section describes the syntax extensions required for event 1868 notification in SIP. Semantics are described in Section 4. Note 1869 that the formal syntax definitions described in this document are 1870 expressed in the ABNF format used in [RFC3261], and contain 1871 references to elements defined therein. 1873 8.1. New Methods 1875 This document describes two new SIP methods: SUBSCRIBE and NOTIFY. 1877 8.1.1. SUBSCRIBE method 1879 "SUBSCRIBE" is added to the definition of the element "Method" in the 1880 SIP message grammar. 1882 Like all SIP method names, the SUBSCRIBE method name is case 1883 sensitive. The SUBSCRIBE method is used to request asynchronous 1884 notification of an event or set of events at a later time. 1886 8.1.2. NOTIFY method 1888 "NOTIFY" is added to the definition of the element "Method" in the 1889 SIP message grammar. 1891 The NOTIFY method is used to notify a SIP node that an event which 1892 has been requested by an earlier SUBSCRIBE method has occurred. It 1893 may also provide further details about the event. 1895 8.2. New Header Fields 1897 8.2.1. "Event" Header Field 1899 Event is added to the definition of the element "message-header 1900 field" in the SIP message grammar. 1902 For the purposes of matching NOTIFY requests with SUBSCRIBE requests, 1903 the event-type portion of the "Event" header field is compared byte- 1904 by-byte, and the "id" parameter token (if present) is compared byte- 1905 by-byte. An "Event" header field containing an "id" parameter never 1906 matches an "Event" header field without an "id" parameter. No other 1907 parameters are considered when performing a comparison. SUBSCRIBE 1908 responses are matched per the transaction handling rules in 1909 [RFC3261]. 1911 Note that the forgoing text means that "Event: foo; id=1234" would 1912 match "Event: foo; param=abcd; id=1234", but not "Event: foo" (id 1913 does not match) or "Event: Foo; id=1234" (event portion does not 1914 match). 1916 This document does not define values for event-types. These values 1917 will be defined by individual event packages, and MUST be registered 1918 with the IANA. 1920 There MUST be exactly one event type listed per event header field. 1921 Multiple events per message are disallowed. 1923 The "Event" header field is defined only for use in SUBSCRIBE and 1924 NOTIFY requests, and other requests whose definition explicitly calls 1925 for its use. It MUST NOT appear in any other SIP requests, and MUST 1926 NOT appear in responses. 1928 8.2.2. "Allow-Events" Header Field 1930 Allow-Events is added to the definition of the element "general- 1931 header field" in the SIP message grammar. Its usage is described in 1932 Section 4.4.4. 1934 User Agents MAY include the "Allow-Events" header field in any 1935 request or response, as long as its contents comply with the behavior 1936 described in Section 4.4.4. 1938 8.2.3. "Subscription-State" Header Field 1940 Subscription-State is added to the definition of the element 1941 "request-header field" in the SIP message grammar. Its usage is 1942 described in Section 4.1.3. "Subscription-State" header fields are 1943 defined for use in NOTIFY requests only. They MUST NOT appear in 1944 other SIP requests or responses. 1946 8.3. New Response Codes 1948 8.3.1. "202 Accepted" Response Code 1950 For historical purposes, the 202 (Accepted) response code is added to 1951 the "Success" header field definition. 1953 This document does not specify the use of the 202 response code in 1954 conjunction with the SUBSCRIBE or NOTIFY methods. Previous versions 1955 of the SIP Events Framework assigned specific meaning to the 202 1956 response code. 1958 Due to response handling in forking cases, any 202 response to a 1959 SUBSCRIBE request may be absorbed by a proxy, and thus it can never 1960 be guaranteed to be received by the UAC. Furthermore, there is no 1961 actual processing difference for a 202 as compared to a 200; a NOTIFY 1962 request is sent after the subscription is processed, and it conveys 1963 the correct state. SIP interoperability tests found that 1964 implementations were handling 202 differently from 200, leading to 1965 incompatibilities. Therefore, the 202 response is being deprecated 1966 to make it clear there is no such difference and 202 should not be 1967 handled differently than 200. 1969 Implementations conformant with the current specification MUST treat 1970 an incoming 202 response as identical to a 200 response, and MUST NOT 1971 generate 202 response codes to SUBSCRIBE or NOTIFY requests. 1973 This document also updates [RFC4660], which reiterates the 202-based 1974 behavior in several places. Implementations compliant with the 1975 present document MUST NOT send a 202 response to a SUBSCRIBE request, 1976 and will send an alternate success response (such as 200) in its 1977 stead. 1979 8.3.2. "489 Bad Event" Response Code 1981 The 489 event response is added to the "Client-Error" header field 1982 field definition. "489 Bad Event" is used to indicate that the server 1983 did not understand the event package specified in a "Event" header 1984 field. 1986 8.4. Augmented BNF Definitions 1988 The Augmented BNF definitions for the various new and modified syntax 1989 elements follows. The notation is as used in [RFC3261], and any 1990 elements not defined in this section are as defined in SIP and the 1991 documents to which it refers. 1993 SUBSCRIBEm = %x53.55.42.53.43.52.49.42.45 ; SUBSCRIBE in caps 1994 NOTIFYm = %x4E.4F.54.49.46.59 ; NOTIFY in caps 1995 extension-method = SUBSCRIBEm / NOTIFYm / token 1997 Event = ( "Event" / "o" ) HCOLON event-type 1998 *( SEMI event-param ) 1999 event-type = event-package *( "." event-template ) 2000 event-package = token-nodot 2001 event-template = token-nodot 2002 token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" 2003 / "_" / "+" / "`" / "'" / "~" ) 2005 ; The use of the "id" parameter is deprecated; it is included 2006 ; for backwards compatibility purposes only. 2007 event-param = generic-param / ( "id" EQUAL token ) 2009 Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type 2010 *(COMMA event-type) 2012 Subscription-State = "Subscription-State" HCOLON substate-value 2013 *( SEMI subexp-params ) 2014 substate-value = "active" / "pending" / "terminated" 2015 / extension-substate 2016 extension-substate = token 2017 subexp-params = ("reason" EQUAL event-reason-value) 2018 / ("expires" EQUAL delta-seconds) 2019 / ("retry-after" EQUAL delta-seconds) 2020 / generic-param 2021 event-reason-value = "deactivated" 2022 / "probation" 2023 / "rejected" 2024 / "timeout" 2025 / "giveup" 2026 / "noresource" 2027 / "invariant" 2028 / event-reason-extension 2029 event-reason-extension = token 2031 9. References 2032 9.1. Normative References 2034 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2035 Requirement Levels", BCP 14, RFC 2119, March 1997. 2037 [RFC2848] Petrack, S. and L. Conroy, "The PINT Service Protocol: 2038 Extensions to SIP and SDP for IP Access to Telephone Call 2039 Services", RFC 2848, June 2000. 2041 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 2042 A., Peterson, J., Sparks, R., Handley, M., and E. 2043 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 2044 June 2002. 2046 [RFC3265] Roach, A., "Session Initiation Protocol (SIP)-Specific 2047 Event Notification", RFC 3265, June 2002. 2049 [RFC3968] Camarillo, G., "The Internet Assigned Number Authority 2050 (IANA) Header Field Parameter Registry for the Session 2051 Initiation Protocol (SIP)", BCP 98, RFC 3968, 2052 December 2004. 2054 [RFC4483] Burger, E., "A Mechanism for Content Indirection in 2055 Session Initiation Protocol (SIP) Messages", RFC 4483, 2056 May 2006. 2058 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2059 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 2060 May 2008. 2062 [RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User 2063 Agent URIs (GRUUs) in the Session Initiation Protocol 2064 (SIP)", RFC 5627, October 2009. 2066 [RFC5727] Peterson, J., Jennings, C., and R. Sparks, "Change Process 2067 for the Session Initiation Protocol (SIP) and the Real- 2068 time Applications and Infrastructure Area", BCP 67, 2069 RFC 5727, March 2010. 2071 9.2. Informative References 2073 [RFC2779] Day, M., Aggarwal, S., Mohr, G., and J. Vincent, "Instant 2074 Messaging / Presence Protocol Requirements", RFC 2779, 2075 February 2000. 2077 [RFC3515] Sparks, R., "The Session Initiation Protocol (SIP) Refer 2078 Method", RFC 3515, April 2003. 2080 [RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, 2081 "Indicating User Agent Capabilities in the Session 2082 Initiation Protocol (SIP)", RFC 3840, August 2004. 2084 [RFC3891] Mahy, R., Biggs, B., and R. Dean, "The Session Initiation 2085 Protocol (SIP) "Replaces" Header", RFC 3891, 2086 September 2004. 2088 [RFC3903] Niemi, A., "Session Initiation Protocol (SIP) Extension 2089 for Event State Publication", RFC 3903, October 2004. 2091 [RFC3911] Mahy, R. and D. Petrie, "The Session Initiation Protocol 2092 (SIP) "Join" Header", RFC 3911, October 2004. 2094 [RFC4235] Rosenberg, J., Schulzrinne, H., and R. Mahy, "An INVITE- 2095 Initiated Dialog Event Package for the Session Initiation 2096 Protocol (SIP)", RFC 4235, November 2005. 2098 [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and 2099 Registration Procedures", BCP 13, RFC 4288, December 2005. 2101 [RFC4485] Rosenberg, J. and H. Schulzrinne, "Guidelines for Authors 2102 of Extensions to the Session Initiation Protocol (SIP)", 2103 RFC 4485, May 2006. 2105 [RFC4538] Rosenberg, J., "Request Authorization through Dialog 2106 Identification in the Session Initiation Protocol (SIP)", 2107 RFC 4538, June 2006. 2109 [RFC4660] Khartabil, H., Leppanen, E., Lonnfors, M., and J. Costa- 2110 Requena, "Functional Description of Event Notification 2111 Filtering", RFC 4660, September 2006. 2113 [RFC5057] Sparks, R., "Multiple Dialog Usages in the Session 2114 Initiation Protocol", RFC 5057, November 2007. 2116 [RFC5839] Niemi, A. and D. Willis, "An Extension to Session 2117 Initiation Protocol (SIP) Events for Conditional Event 2118 Notification", RFC 5839, May 2010. 2120 Appendix A. Acknowledgements 2122 Thanks to the participants in the Events BOF at the 48th IETF meeting 2123 in Pittsburgh, as well as those who gave ideas and suggestions on the 2124 SIP Events mailing list. In particular, I wish to thank Henning 2125 Schulzrinne of Columbia University for coming up with the final 2126 three-tiered event identification scheme, Sean Olson for 2127 miscellaneous guidance, Jonathan Rosenberg for a thorough scrubbing 2128 of the -00 draft, and the authors of the "SIP Extensions for 2129 Presence" document for their input to SUBSCRIBE and NOTIFY request 2130 semantics. 2132 I also owe a debt of gratitude to all the implementors who have 2133 provided feedback on areas of confusion or difficulty in the original 2134 specification. In particular, Robert Sparks' Herculean efforts 2135 organizing, running, and collecting data from the SIPit events have 2136 proven invaluable in shaking out specification bugs. Robert Sparks 2137 is also responsible for untangling the dialog usage mess, in the form 2138 of RFC 5057 [RFC5057]. 2140 Appendix B. Changes from RFC 3265 2142 This document represents several changes from the mechanism 2143 originally described in RFC 3265. This section summarizes those 2144 changes. Bug numbers refer to the identifiers for the bug reports 2145 kept on file at http://bugs.sipit.net/. 2147 B.1. Bug 666: Clarify use of expires=xxx with terminated 2149 Strengthened language in Section 4.1.3 to clarify that expires should 2150 not be sent with terminated, and must be ignored if received. 2152 B.2. Bug 667: Reason code for unsub/poll not clearly spelled out 2154 Clarified description of "timeout" in Section 4.1.3. (n.b., the text 2155 in Section 4.4.3 is actually pretty clear about this). 2157 B.3. Bug 669: Clarify: SUBSCRIBE for a duration might be answered with 2158 a NOTIFY/expires=0 2160 Added clarifying text to Section 4.2.2 explaining that shortening a 2161 subscription to zero seconds is valid. Also added sentence to 2162 Section 3.1.1 explicitly allowing shortening to zero. 2164 B.4. Bug 670: Dialog State Machine needs clarification 2166 The issues associated with the bug deal exclusively with the handling 2167 of multiple usages with a dialog. This behavior has been deprecated 2168 and moved to Section 4.5.2. This section, in turn, cites [RFC5057], 2169 which addresses all of the issues in Bug 670. 2171 B.5. Bug 671: Clarify timeout-based removal of subscriptions 2173 Changed Section 4.2.2 to specifically cite Timer F (so as to avoid 2174 ambiguity between transaction timeouts and retransmission timeouts). 2176 B.6. Bug 672: Mandate expires= in NOTIFY 2178 Changed strength of including of "expires" in a NOTIFY from SHOULD to 2179 MUST in Section 4.2.2. 2181 B.7. Bug 673: INVITE 481 response effect clarification 2183 This bug was addressed in [RFC5057]. 2185 B.8. Bug 677: SUBSCRIBE response matching text in error 2187 Fixed Section 8.2.1 to remove incorrect "...responses and..." -- 2188 explicitly pointed to SIP for transaction response handling. 2190 B.9. Bug 695: Document is not explicit about response to NOTIFY at 2191 subscription termination 2193 Added text to Section 4.4.1 indicating that the typical response to a 2194 terminal NOTIFY is a "200 OK". 2196 B.10. Bug 696: Subscription state machine needs clarification 2198 Added state machine diagram to Section 4.1.2 with explicit handling 2199 of what to do when a SUBSCRIBE never shows up. Added definition of 2200 and handling for new Timer N to Section 4.1.2.4. Added state machine 2201 to Section 4.2.2 to reinforce text. 2203 B.11. Bug 697: Unsubscription behavior could be clarified 2205 Added text to Section 4.2.1.4 encouraging (but not requiring) full 2206 state in final NOTIFY request. Also added text to Section 4.1.2.3 2207 warning subscribers that full state may or may not be present in the 2208 final NOTIFY. 2210 B.12. Bug 699: NOTIFY and SUBSCRIBE are target refresh requests 2212 Added text to both Section 3.1 and Section 3.2 explicitly indicating 2213 that SUBSCRIBE and NOTIFY are target refresh methods. 2215 B.13. Bug 722: Inconsistent 423 reason phrase text 2217 Changed reason code to "Interval Too Brief" in Section 4.2.1.1 and 2218 Section 4.2.1.4, to match 423 reason code in SIP [RFC3261]. 2220 B.14. Bug 741: guidance needed on when to not include Allow-Events 2222 Added non-normative clarification to Section 4.4.4 regarding 2223 inclusion of Allow-Events in a NOTIFY for the one-and-only package 2224 supported by the notifier. 2226 B.15. Bug 744: 5xx to NOTIFY terminates a subscription, but should not 2228 Issue of subscription (usage) termination versus dialog termination 2229 is handled in [RFC5057]. The text in Section 4.2.2 has been updated 2230 to summarize the behavior described by 5057, and cites it for 2231 additional detail and rationale. 2233 B.16. Bug 752: Detection of forked requests is incorrect 2235 Removed erroneous "CSeq" from list of matching criteria in 2236 Section 5.4.9. 2238 B.17. Bug 773: Reason code needs IANA registry 2240 Added Section 7.2 to create and populate IANA registry. 2242 B.18. Bug 774: Need new reason for terminating subscriptions to 2243 resources that never change 2245 Added new "invariant" reason code to Section 4.1.3, ABNF syntax. 2247 B.19. Clarify handling of Route/Record-Route in NOTIFY 2249 Changed text in Section 4.3 mandating Record-Route in initial 2250 SUBSCRIBE and all NOTIFY requests, and adding "MAY" level statements 2251 for subsequent SUBSCRIBE requests. 2253 B.20. Eliminate implicit subscriptions 2255 Added text to Section 4.2.1 explaining some of the problems 2256 associated with implicit subscriptions, normative language 2257 prohibiting them. Removed language from Section 3.2 describing "non- 2258 SUBSCRIBE" mechanisms for creating subscriptions. Simplified 2259 language in Section 4.2.2, now that the soft-state/non-soft-state 2260 distinction is unnecessary. 2262 B.21. Deprecate dialog re-use 2264 Moved handling of dialog re-use and "id" handling to Section 4.5.2. 2265 It is documented only for backwards-compatibility purposes. 2267 B.22. Rationalize dialog creation 2269 Section 4.4.1 has been updated to specify that dialogs should be 2270 created when the NOTIFY arrives. Previously, the dialog was 2271 established by the SUBSCRIBE 200, or by the NOTIFY transaction. This 2272 was unnecessarily complicated; the newer rules are easier to 2273 implement (and result in effectively the same behavior on the wire). 2275 B.23. Refactor behavior sections 2277 Reorganized Section 4 to consolidate behavior along role lines 2278 (subscriber/notifier/proxy) instead of method lines. 2280 B.24. Clarify sections that need to be present in event packages 2282 Added sentence to Section 5 clarifying that event packages are 2283 expected to include explicit sections covering the issues discussed 2284 in this section. 2286 B.25. Make CANCEL handling more explicit 2288 Text in Section 4.6 now clearly calls out behavior upon receipt of a 2289 CANCEL. We also echo the "...SHOULD NOT send..." requirement from 2290 [RFC3261]. 2292 B.26. Remove State Agent Terminology 2294 As originally planned, we anticipated a fairly large number of event 2295 packages that would move back and forth between end-user devices and 2296 servers in the network. In practice, this has ended up not being the 2297 case. Certain events, like dialog state, are inherently hosted at 2298 end-user devices; others, like presence, are almost always hosted in 2299 the network (due to issues like composition, and the ability to 2300 deliver information when user devices are offline). Further, the 2301 concept of State Agents is the most misunderstood by event package 2302 authors. In my expert review of event packages, I have yet to find 2303 one that got the concept of State Agents completely correct -- and 2304 most of them start out with the concept being 100% backwards from the 2305 way RFC 3265 described it. 2307 Rather than remove the ability to perform the actions previously 2308 attributed to the widely misunderstood term "State Agent," we have 2309 simply eliminated this term. Instead, we talk about the behaviors 2310 required to create state agents (state aggregation, subscription 2311 notification) without defining a formal term to describe the servers 2312 that exhibit these behaviors. In effect, this is an editorial change 2313 to make life easier for event package authors; the actual protocol 2314 does not change as a result. 2316 The definition of "State Agent" has been removed from Section 2. 2317 Section 4.4.2 has been retooled to discuss migration of subscription 2318 in general, without calling out the specific example of state agents. 2319 Section 5.4.11 has been focused on state aggregation in particular, 2320 instead of state aggregation as an aspect of state agents. 2322 B.27. Miscellanous Changes 2324 The following changes are relatively minor revisions to the document 2325 that resulted primarily from review of this document in the working 2326 group rather than implementation reports. 2328 o Clarified scope of Event header field parameters. In RFC3265, the 2329 scope is ambiguous, which causes problems with the RFC3968 2330 registry. The new text ensures that Event header field parameters 2331 are unique across all event packages. 2333 o Removed obsoleted language around IANA registration policies for 2334 event packages. Instead, we now cite RFC5727, which supersedes 2335 RFC3265, and is authoritative on event package registration 2336 policy. 2338 o Several editorial updates after input from working group, 2339 including proper designation of "dialog usage" rather than 2340 "dialog" where appropriate. 2342 o Clarified two normative statements about subscription termination 2343 by changing from plain English prose to RFC2119 language. 2345 o Removed "Table 2" expansions, per WG consensus on how SIP table 2 2346 is to be handled. 2348 o Removed 202 response code. 2350 o Clarified that "Allow-Events" does not list event template 2351 packages. 2353 o Added clarification about proper response when the SUBSCRIBE 2354 indicates an unknown media type in its Accept header field. 2356 o Minor clarifications to Route and Record-Route behavior. 2358 o Added non-normative warning about the limitations of state 2359 polling. 2361 o Added information about targeting subscriptions at specific 2362 dialogs. 2364 Author's Address 2366 Adam Roach 2367 Tekelec 2368 17210 Campbell Rd. 2369 Suite 250 2370 Dallas, TX 75252 2371 US 2373 Email: adam@nostrum.com