Network Working Group R. Mahy Request for Comments: 3842 Cisco Systems, Inc. Category: Standards Track August 2004
A Message Summary and Message Waiting Indication Event Package for the Session Initiation Protocol (SIP)
Status of this Memo
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
Copyright (C) The Internet Society (2004).
This document describes a Session Initiation Protocol (SIP) event package to carry message waiting status and message summaries from a messaging system to an interested User Agent.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 .
Message Waiting Indication is a common feature of telephone networks. It typically involves an audible or visible indication that messages are waiting, such as playing a special dial tone (which in telephone networks is called message-waiting dial tone), lighting a light or indicator on the phone, displaying icons or text, or some combination.
Message-waiting dial tone is similar to but distinct from stutter dial tone. Both are defined in GR-506 .
The methods in the SIP  base specification were only designed to solve the problem of session initiation for multimedia sessions, and rendezvous. Since Message Waiting Indication is really status information orthogonal to a session, it was not clear how an IP telephone acting as a SIP User Agent would implement comparable functionality. Members of the telephony community viewed this as a shortcoming of SIP.
Users want the useful parts of the functionality they have using traditional analog, mobile, and PBX telephones. It is also desirable to provide comparable functionality in a flexible way that allows for more customization and new features. SIP Specific Event Notification (RFC 3265 -- SIP Events)  is an appropriate mechanism to use in this environment, as it preserves the user mobility and rendezvous features which SIP provides.
Using SIP-Specific Event Notification, a Subscriber User Agent (typically an IP phone or SIP software User Agent) subscribes to the status of their messages. A SIP User Agent acting on behalf of the user's messaging system then notifies the Subscriber each time the messaging account's messages have changed. (This Notifier could be composed with a User Agent that provides a real-time media interface to send or receive messages, or it could be a stand-alone entity.) The Notifier sends a message summary in the body of a NOTIFY, encoded in a new MIME type defined later in this document. A User Agent can also explicitly fetch the current status.
A SIP User Agent MAY subscribe to multiple accounts (distinguished by the Request URI). Multiple SIP User Agents MAY subscribe to the same account.
Before any subscriptions or notifications are sent, each interested User Agent must be made aware of its messaging notifier(s). This MAY be manually configured on interested User Agents, manually configured on an appropriate SIP Proxy, or dynamically discovered based on
Mahy Standards Track [Page 3]
RFC 3842 SIP Message Waiting August 2004
requested caller preferences  and registered callee capabilities . (For more information on usage with callee capabilities, see Section 4.2)
Subscriptions to this event package MAY range from minutes to weeks. Subscriptions in hours or days are more typical and are RECOMMENDED. The default subscription duration for this event package is one hour.
A simple text-based format is proposed to prevent an undue burden on low-end user agents, for example, inexpensive IP phones with no display. Although this format is text-based, it is intended for machine consumption only.
A future extension MAY define other NOTIFY bodies. If no "Accept" header is present in the SUBSCRIBE, the body type defined in this document MUST be assumed.
The format specified in this proposal attempts to separate orthogonal attributes of messages as much as possible. Messages are separated by message-context-class (for example: voice-message, fax-message, pager-message, multimedia-message, text-message, and none), by message status (new and old), and urgent and non-urgent type.
The text format begins with a simple status line, and optionally a summary line per message-context-class. Message-context-classes are defined in . For each message-context-class, the total number of new and old messages is reported in the new and old fields.
Mahy Standards Track [Page 4]
RFC 3842 SIP Message Waiting August 2004
In some cases, detailed message summaries are not available. The status line allows messaging systems or messaging gateways to provide the traditional boolean message waiting notification.
If the Request-URI or To header in a message-summary subscription corresponds to a group or collection of individual messaging accounts, the notifier MUST specify to which account the message- summary body corresponds. Note that the account URI MUST NOT be delimited with angle brackets ("<" and ">").
In the example that follows, more than boolean message summary information is available to the User Agent. There are two new and four old fax messages.
After the summary, the format can optionally list a summary count of urgent messages. In the next example there are one new and three old voice messages, none of the new messages are urgent, but one of the old messages is. All counters have a maximum value of 4,294,967,295 ((2^32) - 1). Notifiers MUST NOT generate a request with a larger value. Subscribers MUST treat a larger value as 2^32-1.
Voice-Message: 1/3 (0/1)
Optionally, after the summary counts, the messaging systems MAY append RFC 2822 style message headers , which further describe newly added messages. Message headers MUST NOT be included in an initial NOTIFY, as new messages could be essentially unbounded in size. Message headers included in subsequent notifications MUST only correspond to messages added since the previous notification for that subscription. A messaging system which includes message headers in a NOTIFY MUST provide an administrator configurable mechanism to select which headers are sent. Headers likely for inclusion are To, From, Date, Subject, and Message-ID. Note that the formatting of these headers in this body is identical to that of SIP extension-headers, not the (similar) format defined in RFC 2822.
Implementations which generate large notifications are reminded to follow the message size restrictions for unreliable transports articulated in Section 18.1.1 of SIP .
Mapping local message state to new/old message status and urgency is an implementation issue of the messaging system. However, the
Mahy Standards Track [Page 5]
RFC 3842 SIP Message Waiting August 2004
messaging notifier MUST NOT consider a message "old" merely because it generated a notification, as this could prevent another subscription from accurately receiving message-summary notifications. Likewise, the messaging system MAY use any suitable algorithm to determine that a message is "urgent".
Messaging systems MAY use any algorithm for determining the appropriate message-context-class for a specific message. Systems which use Internet Mail SHOULD use the contents of the Message- Context header  (defined in RFC 3458) if present as a hint to make a context determination. Note that a composed messaging system does not need to support a given context in order to generate notifications identified with that context.
Subscriber User Agents will typically SUBSCRIBE to message summary information for a period of hours or days, and automatically attempt to re-SUBSCRIBE well before the subscription is completely expired. If re-subscription fails, the Subscriber SHOULD periodically retry again until a subscription is successful, taking care to backoff to avoid network congestion. If a subscription has expired, new re- subscriptions MUST use a new Call-ID.
The Subscriber SHOULD SUBSCRIBE to that user's message summaries whenever a new user becomes associated with the device (a new login). The Subscriber MAY also explicitly fetch the current status at any time. The subscriber SHOULD renew its subscription immediately after a reboot, or when the subscriber's network connectivity has just been re-established.
The Subscriber MUST be prepared to receive and process a NOTIFY with new state immediately after sending a new SUBSCRIBE, a SUBSCRIBE renewal, an unsubscribe, a fetch, or at any other time during the subscription.
When a user de-registers from a device (logoff, power down of a mobile device, etc.), subscribers SHOULD unsubscribe by sending a SUBSCRIBE message with an Expires header of zero.
When a SIP Messaging System receives SUBSCRIBE messages with the message-summary event-type, it SHOULD authenticate the subscription request. If authentication is successful, the Notifier MAY limit the duration of the subscription to an administrator defined amount of time as described in SIP Events .
Immediately after a subscription is accepted, the Notifier MUST send a NOTIFY with the current message summary information. This allows the Subscriber to resynchronize its state. This initial synchronization NOTIFY MUST NOT include the optional RFC 2822 style message headers .
When the status of the messages changes sufficiently for a messaging account to change the number of new or old messages, the Notifier SHOULD send a NOTIFY message to all active subscribers of that account. NOTIFY messages sent to subscribers of a group or alias, MUST contain the message account name in the notification body.
A Messaging System MAY send a NOTIFY with an "Expires" header of "0" and a "Subscription-State" header of "terminated" before a graceful shutdown.
Forked requests are allowed for this event type and may install multiple subscriptions. The Subscriber MAY render multiple summaries corresponding to the same account directly to the user, or MAY merge them as described below.
If any of the "Messages-Waiting" status lines report "yes", then the merged state is "yes"; otherwise the merged state is "no".
The Subscriber MAY merge summary lines in an implementation-specific way if all notifications contain at least one msg-summary line.
A Notifier MAY choose to hold NOTIFY requests in "quarantine" for a short administrator-defined period (seconds or minutes) when the message status is changing rapidly. Requests in the quarantine which become invalid are replaced by newer notifications, thus reducing the total volume of notifications. This behavior is encouraged for
Mahy Standards Track [Page 7]
RFC 3842 SIP Message Waiting August 2004
implementations with heavy interactive use. Note that timely notification resulting in a change of overall state (messages waiting or not) and notification of newly added messages is probably more significant to the end user than a notification of newly deleted messages which do not affect the overall message waiting state (e.g., there are still new messages).
Notifiers SHOULD NOT generate NOTIFY requests more frequently than once per second.
A Subscriber MAY use an "alias" or "group" in the Request-URI of a subscription if that name is significant to the messaging system. Implementers MAY create a service which consolidates and summarizes NOTIFYs from many Contacts. This document does not preclude implementations from building state agents which support this event package. One way to implement such a service is with the event list extension .
There are no additional requirements on a SIP Proxy, other than to transparently forward the SUBSCRIBE and NOTIFY methods as required in SIP. However, Proxies SHOULD allow non-SIP URLs. Proxies and Redirect servers SHOULD be able to direct the SUBSCRIBE request to an appropriate messaging notifier User Agent.
To: <email@example.com> From: <firstname.lastname@example.org> Subject: carpool tomorrow? Date: Sun, 09 Jul 2000 21:23:01 -0700 Priority: normal Message-ID: email@example.com
To: <firstname.lastname@example.org> From: <email@example.com> Subject: HELP! at home ill, present for me please Date: Sun, 09 Jul 2000 21:25:12 -0700 Priority: urgent Message-ID: firstname.lastname@example.org
4.2. Example Usage with Callee Capabilities and Caller Preferences
The use of callee capabilities is optional but encouraged. If callee capabilities are used, a messaging notifier MAY REGISTER a Contact with an appropriate methods and events tag as shown in the example below. To further distinguish itself, the messaging notifier MAY also REGISTER as a Contact with the actor="msg-taker" tag. An example of this kind of registration follows below.
The formal syntax for the application/simple-message-summary MIME type is described below. The message-context-class production is defined in Section 6.2 of RFC 3458 . Note that all productions described here are case insensitive.
Message summaries and optional message bodies contain information which is typically very privacy sensitive. At a minimum, subscriptions to this event package SHOULD be authenticated and properly authorized. Furthermore, notifications SHOULD be encrypted and integrity protected using either end-to-end mechanisms, or the hop-by-hop protection afforded messages sent to SIPS URIs.
Additional and privacy security considerations are discussed in detail in SIP  and SIP Events .
7.1. SIP Event Package Registration for message-summary
Package name: message-summary
Published Specification: This document.
7.2. MIME Registration for application/simple-message-summary
MIME media type name: application
MIME subtype name: simple-message-summary
Required parameters: none.
Optional parameters: none.
Encoding considerations: This MIME type was designed for use with protocols which can carry binary-encoded data. Although the format of this MIME type is similar to RFC 2822, it is not identical. (Specifically, line folding rules are SIP-specific and included URIs can contain non-ASCII characters.) Protocols which do not carry binary data (which have line length or character-set restrictions for example) MUST use a reversible transfer encoding (such as base64) to carry this MIME type.
Security considerations: See the "Security Considerations" section in this document.
Interoperability considerations: none
Published specification: This document.
Applications which use this media: The simple-message-summary application subtype supports the exchange of message waiting and message summary information in SIP networks.
Thanks to Dan Wing, Dave Oran, Bill Foster, Steve Levy, Denise Caballero-McCann, Jeff Michel, Priti Patil, Satyender Khatter, Bich Nguyen, Manoj Bhatia, David Williams, and Bryan Byerly of Cisco, Jonathan Rosenberg and Adam Roach of Dynamicsoft, Eric Burger of Snowshore, Nir Chen of Comverse, and Eric Tremblay of Mediatrix.
Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf- email@example.com.
Funding for the RFC Editor function is currently provided by the Internet Society.