rfc-7701

Multi-party Chat Using the Message Session Relay Protocol (MSRP)

A. Niemi, M. Garcia-Martin, G. Sandbakken
date2015-12 streamIETF arearai wgsimple statusPROPOSED STANDARD pages42 canonicalhttps://www.rfc-editor.org/rfc/rfc7701 doi10.17487/RFC7701
The Message Session Relay Protocol (MSRP) defines a mechanism for sending instant messages (IMs) within a peer-to-peer session, negotiated using the Session Initiation Protocol (SIP) and the Session Description Protocol (SDP). This document defines the necessary tools for establishing multi-party chat sessions, or chat rooms, using MSRP.

Extracted elements (30)

design-rationale §5.2

Message/CPIM is mandated as the top-level wrapper for all IMs because it carries the sender (From) and recipient (To) information that would otherwise be unavailable to the recipient. This enables private message routing and sender identification without requiring MSRP-level extensions for each case.

sip, realtime

design-rationale §6.2

Private messages are restricted to a single recipient (single To header in Message/CPIM) due to added complexity of multi-recipient delivery failure reporting. Senders wishing to address multiple recipients privately must send individual messages per recipient.

sip, realtime

design-rationale §8

The 'chatroom' SDP attribute is a capability declaration, not an offer/answer negotiation parameter. An SDP answer may contain a 'chatroom' attribute even if the offer did not, and the answer need not be a subset of the offer's tokens, because it reflects local policy rather than a negotiated intersection.

sip, realtime

interoperability-note §5.2

Conference-unaware participants will not detect the 'isfocus' feature tag and cannot apply the additional mechanisms defined in this document. The MSRP switch must track which participants do not support private messaging or nicknames (via the chatroom SDP attribute) to avoid misdelivery.

sip, realtime

normative-requirement §7.1 MUST

A NICKNAME request MUST include a Use-Nickname header containing a nickname string that is 1–1023 octets in length. NICKNAME requests MUST NOT include Success-Report or Failure-Report header fields.

sip, realtime

normative-requirement §6.1 MUST

An MSRP switch using fast-forward (distributing chunks before full message receipt) MUST temporarily store the Message-ID and recipient list of the initial chunk, and MUST forward subsequent chunks only to those same recipients.

sip, realtime

normative-requirement §7.1 MUST

Any new nickname requested MUST be prepared and compared with nicknames already in use following the rules defined in RFC 7700 (Nicknames profile of PRECIS). The switch MUST respond 424 for malformed nicknames and 425 for reserved or already-in-use nicknames.

sip, realtime

normative-requirement §6.2 MUST

For private messages, the MSRP endpoint MUST populate a single To header in the Message/CPIM wrapper with the intended recipient's URI. The switch MUST reject with 404 if the To URI does not match a chat room participant, and MUST reject with 428 if the recipient does not support private messages.

sip, realtime

normative-requirement §5.2 MUST

If a participant has requested privacy, the conference focus MUST expose the participant's anonymous URI through the conference event package (RFC 4575). The anonymous URI MUST NOT reveal the participant's SIP AOR.

privacy, sip

normative-requirement §6.3 MUST

If the MSRP switch receives a SEND request without a Message/CPIM wrapper, it MUST reject the request with a 415 response. If the From header URI is not valid for the sender, it MUST reject with 403.

sip, realtime

normative-requirement §6.1 MUST

On sending a regular message, the sender MUST populate the Message/CPIM To header with the chat room URI and the From header with a valid participant identifier (SIP URI, tel URI, IM URI, or anonymous URI).

sip, realtime

normative-requirement §6.3 MUST NOT

Receiver REPORT requests from recipients MUST NOT be forwarded to the originator of the original SEND request, to avoid the sender receiving multiple reports for a single MSRP request.

sip, realtime

normative-requirement §5.2 MUST

The conference focus MUST only use Message/CPIM as the top-level wrapper for MSRP message payloads, and MUST declare it in the SDP offer/answer. If an SDP offer does not include 'Message/CPIM' in accept-types, the focus SHOULD reject the MSRP stream or the entire SDP offer.

sip, realtime

normative-requirement §7.1 MUST NOT

The MSRP switch MUST NOT automatically assign the same nickname to more than one MSRP session established from the same URI, since this could confuse the user as to whether the nickname is bound to the second session.

sip, realtime

normative-requirement §6.2 MUST NOT

The MSRP switch MUST NOT forward private messages to a recipient that does not support private messaging. Any REPORT sent to the sender for a rejected private message MUST include a Message/CPIM wrapper with the original From and To header fields.

sip, realtime

normative-requirement §6.1 MUST

The MSRP switch MUST reject any SEND request containing multiple To header fields in the Message/CPIM wrapper with a 403 response. The switch MUST NOT modify the content received in the SEND request, though it MAY re-chunk outbound copies.

sip, realtime

normative-requirement §5.2 MUST

When generating the SDP answer, the conference focus MUST set the accept-types attribute for the MSRP message media line to 'Message/CPIM' only. The actual IM payload type is negotiated separately in accept-wrapped-types.

sip, realtime

normative-requirement §6.1 MUST

When using fast-forward, the MSRP switch MUST set a chunk reception timer upon receiving the first chunk of a message. When this timer expires, the switch MUST treat the message as aborted and MAY discard all associated state and send an abort chunk to recipients.

sip, realtime, security

protocol-element §8

The 'chatroom' SDP media-level attribute declares support and local-policy allowance for chat room functions. Optional tokens 'nickname' and 'private-messages' signal availability of those features; absence of the attribute disables all chat room extensions.

sip, realtime

protocol-element §2

The MSRP Switch is a specialized MSRP endpoint that receives MSRP messages from chat room participants and forwards them to all other participants. Unlike a conference mixer, it relays messages without mixing streams.

sip, realtime

protocol-element §7.1

The NICKNAME MSRP method allows a participant to reserve a pseudonym (nickname) within a chat room. It carries the requested nickname in the mandatory Use-Nickname header field.

sip, realtime

protocol-element §7.1

The Use-Nickname header field carries a quoted nickname string of 1 to 1023 octets, encoded in UTF-8. It is defined for use in NICKNAME requests; use in other MSRP methods must be separately specified.

sip, realtime

registry §10.3

RFC 7701 registers four new MSRP status codes: 404 (failure to resolve recipient URI), 424 (malformed nickname), 425 (nickname reserved or already in use), and 428 (private messages not supported), in the 'Status Codes' subregistry of the MSRP Parameters registry.

registry, sip, realtime

registry §10.4

RFC 7701 registers the 'chatroom' media-level SDP attribute in the SDP Parameters registry. It is not subject to the charset attribute and is not subject to the SDP offer/answer negotiation model.

registry, sip

registry §10.1

RFC 7701 registers the NICKNAME method in the 'Methods' subregistry of the MSRP Parameters registry, and the Use-Nickname header field in the 'Header Fields' subregistry.

registry, sip, realtime

security-consideration §11

A chat room is a DoS amplifier: one message from a single sender is replicated to all participants. Implementers of both UAs and MSRP switches must deploy appropriate anti-DoS measures. The MSRP switch should perform sanity checks before fast-forwarding chunks.

security, realtime

security-consideration §11

If a participant's UA does not understand the 'isfocus' feature tag or the Message/CPIM procedures, it may unknowingly send messages that are forwarded to all chat room participants or as unintended private messages. The MSRP switch SHOULD send a notification message to non-chat-room-aware UAs informing them they are in a multi-party chat.

security, sip, realtime

security-consideration §11

The conference focus policy MAY enforce TLS-only MSRP transport (Force TLS transport policy) to guarantee confidentiality and privacy. Without TLS, eavesdropping on the path between participant and MSRP switch is possible.

security, privacy, tls

wire-format §8

chatroom SDP attribute ABNF: `chatroom-attr = "chatroom" [":" chat-token *(SP chat-token)]` where chat-token is 'nickname', 'private-messages', a standard-token, or a private-token of the form `toplabel "." *(domainlabel ".") token`.

sip, realtime

wire-format §7.1

Use-Nickname header ABNF: `Use-Nickname = "Use-Nickname:" SP nickname` where `nickname = DQUOTE 1*1023(qdtext / qd-esc) DQUOTE`. An empty quoted string removes the nickname. The NICKNAME method token is `%x4E.49.43.4B.4E.41.4D.45`.

sip, realtime