rfc-3994

Indication of Message Composition for Instant Messaging

H. Schulzrinne
date2005-02 streamIETF arearai wgsimple statusPROPOSED STANDARD pages13 canonicalhttps://www.rfc-editor.org/rfc/rfc3994 doi10.17487/RFC3994
In instant messaging (IM) systems, it is useful to know during an IM conversation whether the other party is composing a message; e.g., typing or recording an audio message. This document defines a new status message content type and XML namespace that conveys information about a message being composed. The status message can indicate the composition of a message of any type, including text, voice, or video. The status messages are delivered to the instant messaging recipient in the same manner as the instant messages themselves. [STANDARDS-TRACK]

Extracted elements (23)

design-rationale §4

Delivering status messages within the session-mode messaging stream provides three benefits: proper ordering/synchronization with content messages, ability to apply end-to-end security, and use of session negotiation mechanisms to enable/disable per direction.

realtime, security

design-rationale §1

Presence events and extensions (e.g., PIDF) were considered but rejected because they require explicit periodic subscriptions (more overhead) and are harder to target for page-mode delivery. An in-band message-based mechanism is also easier to translate across heterogeneous IM systems.

realtime

interoperability-note §3.5

The isComposing status message MAY be carried in CPIM messages (RFC 3862), which is particularly useful when messages are relayed by a conference server to maintain the identity of the original composer.

realtime

interoperability-note §4

The status message can be used with both page mode and session mode IM. In session mode it is part of the messaging stream; in page mode it is carried as the body of a page mode message. Session mode ensures proper ordering and synchronization with content messages.

realtime, sip

normative-requirement §3.5 MUST

Additional extension elements MUST use their own namespaces and MUST be designed so that receivers can safely ignore them. Adding elements to the namespace defined in this document is not permitted.

realtime

normative-requirement §6 MUST

An isComposing XML document MUST be well formed and SHOULD be valid, MUST be based on XML 1.0, and MUST be encoded using UTF-8.

realtime, json

normative-requirement §4 MUST

In SIP-based page mode IM, the composer MUST cease transmitting status messages if the receiver returned a 415 (Unsupported Media Type) status code in response to a MESSAGE request containing the status indication.

realtime, sip

normative-requirement §7 RECOMMENDED

It is RECOMMENDED that isComposing indications in page mode are only sent when a message is being composed as a reply to an earlier message, to avoid privacy issues when no conversation has been established.

realtime, privacy

normative-requirement §3.3 MUST

Receivers MUST be able to handle multiple consecutive isComposing messages with 'active' state, regardless of the refresh interval.

realtime

normative-requirement §3.5 MUST

Recipients MUST treat state tokens other than 'idle' and 'active' as 'idle'. This ensures forward compatibility with future extensions to the state vocabulary.

realtime

normative-requirement §3.2 SHOULD

The active-state refresh interval SHOULD be no shorter than 60 seconds. The composer MAY omit the refresh interval entirely, which causes the receiver to assume idle after 120 seconds.

realtime

normative-requirement §3.2 SHOULD

Unless otherwise configured, the idle timeout SHOULD have a default value of 15 seconds. If the user stops composing for longer than this, the state transitions to 'idle' and an 'idle' status message is sent.

realtime

privacy-consideration §7

There are privacy issues in sending isComposing status before a conversation is established, since a status message may reveal that the user considered composing a message even if they later abandon it. Page-mode indications are RECOMMENDED only in reply to earlier messages.

privacy, realtime

protocol-element §3.5

The <contenttype> element indicates the MIME media type of the message being composed (e.g., 'text/plain', 'audio'). It is a hint to the recipient about the likely message format, not a guarantee of the actual content.

realtime

protocol-element §3.4

The isComposing status message consists of an <isComposing> root element with a mandatory <state> child ('idle' or 'active'), plus optional elements: <lastactive> (dateTime of last activity), <contenttype> (MIME type of message being composed), and <refresh> (positive integer seconds until next expected update).

realtime

protocol-element §3.2

The <refresh> element carries the active-state refresh interval in integer seconds, telling the receiver when to expect the next status update. If omitted, the receiver assumes the sender has gone idle after 120 seconds.

realtime

registry §8.3

Registers a new XML schema with URI 'urn:ietf:params:xml:schema:im-composing' per BCP 81 (RFC 3688). The schema content is defined in Section 6.1 of RFC 3994.

registry, realtime

registry §8.1

Registers the MIME media type 'application/im-iscomposing+xml' with IANA for carrying isComposing XML documents. Optional parameter: charset (default UTF-8). Intended usage: LIMITED USE.

registry, realtime

registry §8.2

Registers the URN sub-namespace 'urn:ietf:params:xml:ns:im-iscomposing' in the IETF XML registry for XML elements defined by RFC 3994 to describe composition activity.

registry, realtime

security-consideration §7

The isComposing indication provides a fine-grained view of user activity and requires careful confidentiality protection so that only the intended recipient receives it. All security considerations of the underlying IM protocol apply to isComposing status messages.

security, privacy, realtime

state-machine §3.2

The message composer operates in two states: 'idle' (default) and 'active'. Transitions occur on composing start (idle→active, sends 'active' status), idle timeout without activity (active→idle, sends 'idle' status), content message sent (active→idle, no 'idle' message needed), and refresh timeout (active→active, sends 'active' refresh).

realtime

state-machine §3.3

The status message receiver tracks sender state as 'idle' or 'active'. Transitions from active to idle occur when: (1) an 'idle' status message is received, (2) a content message is received, or (3) the refresh interval (or default 120 seconds) expires.

realtime

wire-format §6.1

The isComposing document uses the XML schema at namespace 'urn:ietf:params:xml:ns:im-iscomposing'. The <state> element is xs:string (required); <lastactive> is xs:dateTime (optional); <contenttype> is xs:string (optional); <refresh> is xs:positiveInteger in seconds (optional). Extension elements from other namespaces are allowed with lax processing.

realtime