Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Instant Messaging&yetP.O. Box 787ParkerCO80134USAietf@stpeter.imIBMRorberg Building, Pekris 3Rehovot76123Israelavshalom@il.ibm.comCisco Systems, Inc.1899 Wynkoop Street, Suite 600DenverCO80202USAjhildebr@cisco.com
RAI
XMPPJabberSIPSIMPLEIMInstant MessagingThis document defines a bidirectional protocol mapping for the exchange of single instant messages between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP).In order to help ensure interworking between instant messaging (IM) systems that conform to the instant messaging / presence requirements , it is important to clearly define protocol mappings between such systems. Within the IETF, work has proceeded on two instant messaging technologies:Various extensions to the Session Initiation Protocol () for instant messaging, in particular the MESSAGE method extension The Extensible Messaging and Presence Protocol (XMPP), which consists of a formalization of the core XML streaming protocols developed originally by the Jabber open-source community; the relevant specifications are for the XML streaming layer and for basic presence and instant messaging extensionsOne approach to helping ensure interworking between these protocols is to map each protocol to the abstract semantics described in ; that is the approach taken by and . By contrast, the approach taken in this document is to directly map semantics from one protocol to another (i.e., from SIP/SIMPLE to XMPP and vice-versa).Both XMPP and IM-capable SIP systems enable entities to exchange "instant messages". The term "instant message" usually refers to a message sent between two entities for delivery in close to real time (rather than a message that is stored and forwarded to the intended recipient upon request). This document covers single messages only (sometimes called "pager-mode" messaging), since they form the lowest common denominator for IM. Separate documents cover one-to-one chat sessions and multi-party groupchat .The architectural assumptions underlying such direct mappings are provided in , including mapping of addresses and error conditions. The mappings specified in this document cover basic instant messaging functionality, i.e., the exchange of a single instant message between a SIP user and an XMPP user in either direction. Mapping of more advanced functionality is out of scope for this document, but other documents in this "series" cover such topics.The documents in this series are intended for use by software developers who have an existing system based on one of these technologies (e.g., SIP), and would like to enable communication from that existing system to systems based on the other technology (e.g., XMPP). We assume that readers are familiar with the core specifications for both SIP and XMPP , with the base document for this series , and with the following IM-related specifications:Session Initiation Protocol (SIP) Extension for Instant Messaging Extensible Messaging and Presence Protocol: Instant Messaging and Presence A number of terms used here are explained in , , , and .The 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 .As described in , a single instant message is an XML <message/> stanza of type "normal" sent over an XML stream (since "normal" is the default for the 'type' attribute of the <message/> stanza, the attribute is often omitted). In this document we will assume that such a message is sent from an XMPP client to an XMPP server over an XML stream negotiated between the client and the server, and that the client is controlled by a human user (this is a simplifying assumption introduced for explanatory purposes only; the XMPP sender could be an automated client, a component such as a workflow application, a server, etc.).When Juliet wants to send an instant message to Romeo, she interacts with her XMPP client, which generates an XMPP <message/> stanza. The syntax of the <message/> stanza, including required and optional elements and attributes, is defined in (for single instant messages, the value of the 'to' address SHOULD be a "bare JID" of the form "localpart@domainpart"). The following is an example of such a stanza:Upon receiving such a message stanza, the XMPP server needs to determine the identity of the domainpart in the 'to' address, which it does by following the procedures explained in Section 5 of . If the domain is a SIP domain, the XMPP server will hand off the message stanza to an XMPP-to-SIP gateway or connection manager that natively communicates with IM-aware SIP servers.The XMPP-SIP gateway is then responsible for translating the XMPP message stanza into a SIP MESSAGE request from the XMPP user to the SIP user:The destination SIP server is responsible for delivering the message to the intended recipient, and the recipient is responsible for generating a response (e.g., 200 OK).As described in , a downstream proxy could fork a MESSAGE request, but it would return only one 200 OK to the gateway.Informational Note: This document does not specify handling of the 200 OK by the XMPP-SIP gateway (e.g., to enable message acknowledgements). See for a mapping of message acknowledgements in the context of one-to-one chat sessions.The mapping of XMPP syntax to SIP syntax SHOULD be as shown in the following table. (Mappings for several aspects not mentioned here are specified in .)As shown in the foregoing example and described in , the XMPP-SIP gateway SHOULD map the full JID (localpart@domainpart/resourcepart) of the XMPP sender to the SIP From header and include the resourcepart as the GRUU portion of the SIP URI.Because there is no SIP header field that matches the meaning of the XMPP message 'type' values ("normal", "chat", "groupchat", "headline", "error"), no general mapping is possible here.As described in , a single instant message is a SIP MESSAGE request sent from a SIP user agent to an intended recipient who is most generally referenced by an Instant Message URI of the form <im:user@domain> but who might be referenced by a SIP or SIPS URI of the form <sip:user@domain> or <sips:user@domain>. Here again we introduce the simplifying assumption that the user agent is controlled by a human user, whom we shall dub <romeo@example.net>.When Romeo wants to send an instant message to Juliet, he interacts with his SIP user agent, which generates a SIP MESSAGE request. The syntax of the MESSAGE request is defined in . The following is an example of such a request:Section 5 of stipulates that a SIP User Agent presented with an im: URI should resolve it to a sip: or sips: URI. Therefore we assume that the Request-URI of a request received by an IM-capable SIP-XMPP gateway will contain a sip: or sips: URI. Upon receiving the MESSAGE, the SIP (MSRP) server needs to determine the identity of the domain portion of the Request-URI or To header, which it does by following the procedures explained in Section 5 of . If the domain is an XMPP domain, the SIP server will hand off the MESSAGE to an associated SIP-XMPP gateway or connection manager that natively communicates with XMPP servers.The SIP-to-XMPP gateway is then responsible for translating the request into an XMPP message stanza from the SIP user to the XMPP user and returning a SIP "200 OK" message to the sender:Note that the stanza handling rules specified in allow the receiving XMPP server to deliver a message stanza whose 'to' address is a bare JID ("localpart@domainpart") to multiple connected devices. This is similar to the "forking" of messages in SIP.The mapping of SIP syntax to XMPP syntax SHOULD be as shown in the following table. (Mappings for several aspects not mentioned here are specified in .)As shown in the foregoing example and described in , if the IM-capable SIP-XMPP gateway has information about the GRUU of the particular endpoint that sent the SIP message then it SHOULD map the sender's address to a full JID (localpart@domainpart/resourcepart) in the 'from' attribute of the XMPP stanza and include the GRUU as the resourcepart.When transforming SIP pager-mode messages, an IM-capable SIP-XMPP gateway SHOULD specify no XMPP 'type' attribute or, equivalently, a 'type' attribute whose value is "normal" .See of this document about the handling of SIP message bodies that contain content types other than plain text.SIP requests of type MESSAGE are allowed to contain essentially any content type. The recommended procedures for SIP-to-XMPP gateways to use in handling these content types are as follows.An IM-aware SIP-to-XMPP gateway MUST process SIP messages that contain message bodies of type "text/plain" and MUST encapsulate such message bodies as the XML character data of the XMPP <body/> element.An IM-aware SIP-to-XMPP gateway SHOULD process SIP messages that contain message bodies of type "text/html"; if so, a gateway MUST transform the "text/html" content into XHTML content that conforms to the XHTML-IM Integration Set specified in .Although an IM-aware SIP-to-XMPP gateway MAY process SIP messages that contain message bodies of types other than "text/plain" and "text/html", the handling of such content types is a matter of implementation.Both XMPP and SIP support the UTF-8 encoding of Unicode characters within messages, and signalling of the language for a particular message (in XMPP via the 'xml:lang' attribute and in SIP via the Content-Language header). Several examples follow, using the "XML Notation" for Unicode characters outside the ASCII range described in .This document requests no actions of IANA.Detailed security considerations for instant messaging protocols are given in , for SIP-based instant messaging in (see also ), and for XMPP-based instant messaging in (see also ). The security considerations provided in also apply.This document specifies methods for exchanging instant messages through a gateway that translates between SIP and XMPP. Such a gateway MUST be compliant with the minimum security requirements of the instant messaging protocols for which it translates (i.e., SIP and XMPP). The addition of gateways to the security model of instant messaging specified in introduces some new risks. In particular, end-to-end security properties (especially confidentiality and integrity) between instant messaging user agents that interface through an IM-capable SIP-XMPP gateway can be provided only if common formats are supported. Specification of those common formats is out of scope for this document, although it is preferred to use for instant messages.Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): One-to-One Text Chat SessionsThis document defines a bidirectional 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). Specifically for SIP text chat, this document specifies a mapping to the Message Session Relay Protocol (MSRP).Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): CoreAs a foundation for the definition of application-specific, bi-directional protocol mappings between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP), this document specifies the architectural assumptions underlying such mappings as well as the mapping of addresses and error conditions.Key words for use in RFCs to Indicate Requirement LevelsHarvard University1350 Mass. Ave.CambridgeMA 02138- +1 617 495 3864-
General
keywordIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. Authors who follow these guidelines should incorporate this phrase near the beginning of their document:
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 RFC 2119.Note that the force of these words is modified by the requirement level of the document in which they are used.SIP: Session Initiation ProtocolSession Initiation Protocol (SIP) Extension for Instant MessagingObtaining and Using Globally Routable User Agent URIs (GRUUs) in the Session Initiation Protocol (SIP)Several applications of the Session Initiation Protocol (SIP) require a user agent (UA) to construct and distribute a URI that can be used by anyone on the Internet to route a call to that specific UA instance. A URI that routes to a specific UA instance is called a Globally Routable UA URI (GRUU). This document describes an extension to SIP for obtaining a GRUU from a registrar and for communicating a GRUU to a peer within a dialog. [STANDARDS-TRACK]Extensible Messaging and Presence Protocol (XMPP): CoreThe Extensible Messaging and Presence Protocol (XMPP) is an application profile of the Extensible Markup Language (XML) that enables the near-real-time exchange of structured yet extensible data between any two or more network entities. This document defines XMPP's core protocol methods: setup and teardown of XML streams, channel encryption, authentication, error handling, and communication primitives for messaging, network availability ("presence"), and request-response interactions. This document obsoletes RFC 3920. [STANDARDS-TRACK]Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and PresenceThis document defines extensions to core features of the Extensible Messaging and Presence Protocol (XMPP) that provide basic instant messaging (IM) and presence functionality in conformance with the requirements in RFC 2779. This document obsoletes RFC 3921. [STANDARDS-TRACK]XHTML-IMstpeter@jabber.orgCPIM Mapping of SIMPLE Presence and Instant MessagingInterworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): GroupchatThis document defines a bidirectional protocol mapping for the exchange of instant messages in the context of a multiparty chat session among users of the Session Initiation Protocol (SIP) and users of the Extensible Messaging and Presence Protocol (XMPP). Specifically, this document defines a mapping between the SIP-based Message Session Relay Protocol (MSRP) and the XMPP Multi-User Chat (MUC) extension.Instant Messaging / Presence Protocol RequirementsSightPath, Inc.135 Beaver StreetWalthamMA02452USmday@alum.mit.eduMicrosoft CorporationOne Microsoft WayRedmondWA98052USsonuag@microsoft.comInto Networks, Inc.150 Cambridgepark DriveCambridgeMA02140USjesse@intonet.comPresence and Instant Messaging have recently emerged as a new medium of communications over the Internet. Presence is a means for finding, retrieving, and subscribing to changes in the presence information (e.g. "online" or "offline") of other users. Instant messaging is a means for sending small, simple messages that are delivered immediately to online users.Applications of presence and instant messaging currently use independent, non-standard and non-interoperable protocols developed by various vendors. The goal of the Instant Messaging and Presence Protocol (IMPP) Working Group is to define a standard protocol so that independently developed applications of instant messaging and/or presence can interoperate across the Internet. This document defines a minimal set of requirements that IMPP must meet.UTF-8, a transformation format of ISO 10646ISO/IEC 10646-1 defines a large character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. The originally proposed encodings of the UCS, however, were not compatible with many current applications and protocols, and this has led to the development of UTF-8, the object of this memo. UTF-8 has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values. This memo obsoletes and replaces RFC 2279.Common Profile for Instant Messaging (CPIM)Common Presence and Instant Messaging (CPIM): Message FormatMapping the Extensible Messaging and Presence Protocol (XMPP) to Common Presence and Instant Messaging (CPIM)Jabber Software FoundationInternationalized Resource Identifiers (IRIs)This document defines a new protocol element, the Internationalized Resource Identifier (IRI), as a complement of the Uniform Resource Identifier (URI). An IRI is a sequence of characters from the Universal Character Set (Unicode/ISO 10646). A mapping from IRIs to URIs is defined, which means that IRIs can be used instead of URIs, where appropriate, to identify resources.</t><t> The approach of defining a new protocol element was chosen instead of extending or changing the definition of URIs. This was done in order to allow a clear distinction and to avoid incompatibilities with existing software. Guidelines are provided for the use and deployment of IRIs in various protocols, formats, and software components that currently deal with URIs.The Unicode Standard, Version 6.3The Unicode ConsortiumThe authors wish to thank the following individuals for their feedback: Mary Barnes, Dave Cridland, Dave Crocker, Adrian Georgescu, Christer Holmberg, Saul Ibarra Corretge, Olle Johansson, Paul Kyzivat, Salvatore Loreto, Daniel-Constantin Mierla, and Tory Patnoe.The authors gratefully acknowledge the assistance of Markus Isomaki and Yana Stamcheva as the working group chairs and Gonzalo Camarillo and Alissa Cooper as the sponsoring Area Directors.Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for employing him during his work on earlier versions of this document.