Network Working Group P. Saint-Andre
Internet-Draft XMPP Standards Foundation
Intended status: Informational E. Gavita
Expires: July 7, 2008 N. Hossain
S. Loreto
Ericsson
January 4, 2008
Interworking between the Session Initiation Protocol (SIP) and the
Extensible Messaging and Presence Protocol (XMPP): Text Chat
draft-saintandre-sip-xmpp-chat-00.txt
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on July 7, 2008.
Copyright Notice
Copyright (C) The IETF Trust (2008).
Abstract
This document defines a bi-directional protocol mapping for the
exchange of instant messages in the context of a one-to-one chat
session between a user of the Session Initiation Protocol (SIP) and a
user of the Extensible Messaging and Presence Protocol (XMPP).
Saint-Andre, et al. Expires July 7, 2008 [Page 1]
Internet-Draft SIP-XMPP Interworking: Text Chat January 2008
Specifically for SIP text chat, this document specifies a mapping to
the Message Session Relay Protocol (MSRP).
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3. Connection Maintenance . . . . . . . . . . . . . . . . . . 4
1.4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 5
2. Message Sessions . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2. XMPP Formal Chat Session to MSRP . . . . . . . . . . . . . 5
2.2.1. Initiating a Formal Session . . . . . . . . . . . . . 6
2.2.2. Accepting a Formal Session . . . . . . . . . . . . . . 9
2.2.3. Terminating a Formal Session . . . . . . . . . . . . . 12
2.2.4. Canceling the Negotiation . . . . . . . . . . . . . . 14
2.2.5. Rejecting a Formal Session . . . . . . . . . . . . . . 15
2.3. XMPP Informal Session to MSRP . . . . . . . . . . . . . . 16
2.4. MSRP to XMPP formal session . . . . . . . . . . . . . . . 16
2.4.1. Initiating a Session . . . . . . . . . . . . . . . . . 17
2.4.2. Accepting a Session . . . . . . . . . . . . . . . . . 20
2.4.3. Completing the Transaction . . . . . . . . . . . . . . 21
2.4.4. Send a Message . . . . . . . . . . . . . . . . . . . . 21
2.4.5. Terminating a Session . . . . . . . . . . . . . . . . 22
2.4.6. Cancel the transaction . . . . . . . . . . . . . . . . 24
2.4.7. Rejecting a transaction . . . . . . . . . . . . . . . 25
2.5. MSRP to an XMPP Informal Session . . . . . . . . . . . . . 26
3. Security Considerations . . . . . . . . . . . . . . . . . . . 26
4. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1. Normative References . . . . . . . . . . . . . . . . . . . 26
4.2. Informative References . . . . . . . . . . . . . . . . . . 27
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 28
Intellectual Property and Copyright Statements . . . . . . . . . . 29
Saint-Andre, et al. Expires July 7, 2008 [Page 2]
Internet-Draft SIP-XMPP Interworking: Text Chat January 2008
1. Introduction
1.1. Overview
Both the Session Initiation Protocol [SIP] and the Extensible
Messaging and Presence Protocol [XMPP] can be used for the purpose of
one-to-one text chat over the Inernet. To ensure interworking
between these technologies, it is important to define bi-directional
protocol mappings.
The architectural assumptions underlying such protocol mappings are
provided in [SIP-XMPP], including mapping of addresses and error
conditions. Mappings for single instant messages (sometimes called
"pager-mode" messaging) are provided in [SIP-XMPP-IM]. This document
specifies mappings for one-to-one text chat sessions (sometimes
called "session-mode" messaging); in particular, this document
specifies mappings between XMPP and the Message Session Relay
Protocol [MSRP]. Mapping of multi-user text chat (sometimes called
"groupchat") is out of scope for this document.
Note: The capitalized key words "MUST", "MUST NOT", "REQUIRED",
"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in RFC 2119 [TERMS].
1.2. Scope
Both XMPP and SIP/SIMPLE technologies enable end users to send
"instant messages" to other end users. The term "instant message"
usually refers to messages sent between two end-users for delivery in
close to real time (rather than messages that are stored and
forwarded to the intended recipient upon request). Generally, there
are three kinds of instant messages:
1. Single messages, which are sent from the sender to the recipient
outside the context of any one-to-one chat session or multi-user
text conference. The message is immediately delivered and not
stored in an inbox. In XMPP a single message is a
stanza of type "normal" as specified in [XMPP-IM]. In SIP/SIMPLE
a single message is sent via the MESSAGE method as specified in
[MSRP].
2. One-to-one chat messages, which are sent from the sender to the
recipient (i.e., one-to-one) in the context of a "chat session"
between the two entities. In XMPP a chat message is a
stanza of type "chat". In SIP/SIMPLE a chat message is sent
using an MSRP session.
Saint-Andre, et al. Expires July 7, 2008 [Page 3]
Internet-Draft SIP-XMPP Interworking: Text Chat January 2008
3. Groupchat messages, which are sent from a sender to multiple
recipients (i.e., 2 or more) in the context of a "multi-user chat
session" or "text conference". In XMPP a groupchat message is a
stanza of type "groupchat" that is reflected from the
sender to multiple recipients by a multi-user chat service as
defined in [XEP-0045]. In SIP/SIMPLE a groupchat message is
reflected from the sender to multiple recipients by a conference
server that uses MSRP to handle groupchat sessions.
This document only covers the scenario #2 above for converting XMPP
messages of type "chat" to their corresponding SIP INVITE - MSRP
message types on the SIP/SIMPLE side.
As in [SIP-XMPP-IM] and related documents, the approach taken here is
to directly map syntax and semantics from one protocol to another.
One-to-one chat sessions using XMPP message stanzas of type "chat"
are specified in [XMPP-IM], and a method for formally negotiating
such a session is specified in [XEP-0155]. One-to-one chat sessions
using the SIP MESSAGE method, the SIP INVITE method, and the Message
Session Relay Protocol (MSRP) are specified in [SIP-MSG] and [MSRP].
In particular, this document defines a mapping between XMPP chat
sessions (as specified in [XMPP-IM] and [XEP-0155]) and the Message
Session Relay Protocol (as specified in [MSRP]).
1.3. Connection Maintenance
XMPP makes use of long-lived TCP connections. If mobility affecting
Layer 3 causes a dropped connection, the connection must be re-
established. If mobility preserves the IP address, the TCP
connection will be dropped. Any TLS session and SASL associations
must be re-established if the TCP connection is dropped. XMPP binds
directly to TCP in the core specification, so the TCP session must
remain open for the entire duration of the chat/conversation. The
XMPP Standards Foundation does define protocol extensions enabling
transport of XMPP traffic over HTTP (refer to [XEP-0124] and
[XEP-0206]), so that individual messages are carried using HTTP and
are more robust in environments such as mobile networks, allowing for
better recovery if a TCP session is broken.
SIMPLE is similar when using MSRP. The Message Session Relay
Protocol [MSRP] is a protocol for transmitting instant messages (IM)
in the context of a session. The protocol specification describes
how the session can be negotiated and established with an offer or
answer [OFFER] using the Session Description Protocol [SDP]. In
SIMPLE, this exchange is carried using SIP as the signaling protocol.
After the TCP connection is established, if it fails for any reason,
then an MSRP endpoint MAY choose to re-create such session using a
new SDP exchange in a SIP re-INVITE. SIMPLE also uses MESSAGE
Saint-Andre, et al. Expires July 7, 2008 [Page 4]
Internet-Draft SIP-XMPP Interworking: Text Chat January 2008
request for transporting instant messaging outside the context of a
session. The MESSAGE request is sent inside the signaling path
without establishing any dedicate connection.
1.4. Acknowledgements
Some text in this document was borrowed from [SIP-XMPP] and from
[XEP-0155].
2. Message Sessions
2.1. Overview
The traditional model for one-to-one chat "session" in Jabber/XMPP is
for a user to simply send a message to a contact with a thread ID,
but without any formal negotiation of session parameter.
This informal approach to session initiation in XMPP can be mapped
both to SIP pager-mode messaging using the SIP MESSAGE method (as
documented in [SIP-XMPP]) and to a MSRP chat session. How the
Gateway chooses to map the XMPP chat session in the SIP side is a
matter of the implementation.
However, in XMPP it also possibile to formally request a chat session
and negotiate its parameters (e.g., security, privacy, message
logging) before beginning the session. The protocol for doing so is
defined in [XEP-0155]. In this case, the XMPP chat session should be
translated into a MSRP session.
This document covers the mapping of both informal and formally-
negotiated XMPP chat session into a MSRP session.
2.2. XMPP Formal Chat Session to MSRP
XMPP Protocol offers two ways an XMPP user can initiate a 1-1 chat:
the first approach doesn't establish a session (this method is
referred to the "informal session" approach); the second approach
instead involves explicit negotiation of a session (this method is
referred to the "formal session" approach).
This section describes how to map an XMPP "formal session" to an MSRP
session.
The XMPP formal session is based on the protocol described in
[XEP-0155], which enable the initiation, renegotiation, and
termination of a format chat session on the XMPP side. This approach
maps to the semantic of the SIP INVITE and BYE methods.
Saint-Andre, et al. Expires July 7, 2008 [Page 5]
Internet-Draft SIP-XMPP Interworking: Text Chat January 2008
XMPP User X2M GW SIP User
| | |
|(F1) (XMPP) Stanza session request |
|------------------------->| |
| |(F2) (SIP) INVITE |
| |------------------------->|
| |(F3) (SIP) 200 OK |
| |<-------------------------|
|(F4) (XMPP) Stanza session acceptance |
|<-------------------------| |
| |(F5) (SIP) ACK |
| |------------------------->|
|(F6) (XMPP) Stanza session completion |
|------------------------->| |
| |(F7) (MSRP) SEND |
| |------------------------->|
|(F8) (XMPP) Stanza session termination |
|------------------------->| |
| |(F9) (SIP) BYE |
| |------------------------->|
| |(F10) (SIP) 200 OK |
| |<-------------------------|
|(F11) (XMPP) Stanza acknoledgment |
| session termination |
|<-------------------------| |
2.2.1. Initiating a Formal Session
When the XMPP user ("Juliet") wants to initiate a negotiated session
with a SIP user ("Romeo"), she sends a stanza to Romeo
containing a child qualified by the
'http://jabber.org/protocol/feature-neg' namespace. The
stanza must not contain a