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