The Session Description Protocol (SDP) RFC 4566 [1] is widely used to communicate information about media sessions, typically using the offer/answer model RFC 3264 [2]. For example, when the Session Initiation Protocol (SIP) RFC 3261 [3] is used for establishing media sessions, the payloads of the SIP messages contain SDP payloads. The use of SDP continues to gain force, since SDP has been adopted for use in the WebRTC technologies being defined at the Internet Engineering Task Force (IETF) [4] and World Wide Web Consortium (W3C) [5] for real-time communication among web browsers.
Some user agents that might want to participate in WebRTC interactions use XMPP as their primary or only communication channel. For example, a browser-based XMPP application might use a JavaScript library that connects to an XMPP server using XMPP Over WebSocket [6] or using BOSH (XEP-0124) [7] and XMPP Over BOSH (XEP-0206) [8]. Although such an application could use Jingle (XEP-0166) [9] and Jingle RTP Sessions (XEP-0167) [10] between the client and the server, converting the Jingle XML format into SDP (and associated SIP headers) might require use of a server-side gateway, and such a gateway might introduce unnecessary complexity into the system (e.g., keeping session state in the gateway). Enabling the user agent to natively send SDP (and a minimal set of SIP headers) can make it easier for XMPP client developers to build real-time communication applications using existing SDP and SIP libraries, especially in the context of WebRTC. Even outside of WebRTC, the ability to send SDP/SIP over XMPP can be useful in deployments where XMPP-capable endpoints need to communicate with SIP endpoints such as IP phones.
By specifying a way to send SDP/SIP over XMPP (a.k.a. "SoX"), this document effectively defines a reliable transport method for SIP/SDP messages. However, it is envisioned that this method will be used only by XMPP-only endpoints, not by native SIP or dual-stack SIP/XMPP RFC 7081 [11] endpoints. It is also important to note that SoX is not intended to replace Jingle as a general-purpose method for negotiating media sessions among XMPP entities; instead, it provides a convenient way to reliably transport SIP/SDP traffic for communication from XMPP-only endpoints to native SIP and dual-stack SIP/XMPP endpoints. Finally, because SoX payloads contain only minimal SIP headers (needed for message delivery in certain scenarios) and SDP content, the method is not designed for sending arbitrary SIP message bodies, only SDP.
The syntax is extremely simple: an XMPP <message/> element contains a <sox/> child element qualified by the 'urn:xmpp:sox:0' namespace, and the <sox/> element contains the SIP/SDP data. An example follows.
Including minimal SIP headers makes it possible for XMPP-only endpoints to pass a complete SIP/SDP payload directly to an existing SIP/SDP stack. This is deemed more convenient for implementers than including only the SDP itself, since standalone SDP parsers are less common than complete SIP/SDP stacks.
In addition, the SIP headers are helpful for server-side encapsulation/decapsulation scenarios as described in the next section.
Note that certain SIP headers are required in SIP, or in particular kinds of SIP messages (e.g., the Contact header is required in SIP INVITE messages).
Part of the reason for including minimal SIP headers in the SoX format is to enable stateless server-side components that can forward SoX messages to native SIP entities. For example, based on vCard data or a directory lookup, a server-side component might determine that the JID within the XMPP 'to' address of a SoX message is associated with a registered SIP user, and forward the SIP/SDP payload to the registered SIP address.
For example, in the basic SoX example shown above Romeo sends a SoX message to Juliet's JID (juliet@im.example.com), but his server might know that Juliet actually has a SIP address (say, juliet@voice.example.com). If so, a server-side component (say, sox.example.net) could strip off the enclosing XML elements (<message><sox> and </sox></message>) and forward the SIP/SDP on to the correct SIP address. An example of the forwarded payload follows.
Address mapping between SIP and XMPP can be a challenge. See draft-ietf-stox-core [12] for details.
The 'to' attribute and 'from' attribute of the XMPP <message/> stanza need not match the "To" header and "From" header of the SoX payload. For example, the sender might know (based on vCard data or a directory lookup) that the SIP address of the intended recipient is different from the XMPP address of the intended recipient. This is possible in so-called CUSAX scenarios; although the CUSAX specification recommends that all SDP signalling be sent over SIP rather than XMPP, the sender might be an XMPP-only endpoint and the intended recipient might be a CUSAX endpoint.
However, in general it is easier for a user agent to simply set the SIP "To" and "From" headers to the same identifiers (JIDs) used for the XMPP 'to' and 'from' attributes.
For errors related to the SoX payload (e.g., invalid SIP headers), the proper response by a SoX-aware entity is another SoX message containing the appropriate SIP error (e.g., "406 Not Acceptable").
For errors related to the XMPP "wrapper" (including the fact that the recipient does not understand the SoX payload), the proper response is the appropriate XMPP error.
If an entity supports SoX, it MUST advertise that fact in its responses to Service Discovery (XEP-0030) [13] information ("disco#info") requests by returning a feature of "urn:xmpp:sox:0":
In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in Entity Capabilities (XEP-0115) [14]. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.
Crossing protocol boundaries can lead to security mismatches.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [15].
This specification defines the following XML namespace:
Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar [16] shall add the foregoing namespace to the registry located at <https://xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function (XEP-0053) [17].
If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.
Thanks to Vikram Khurana, Lance Stout, Field Tian, Duanpei Wu, and Weixin Xia for their feedback.
In 2006, Dirk Griffoen (on behalf of Voipster) proposed a similar approach, called Zoep <http://xmpp.org/extensions/inbox/zoep.html>.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. RFC 4566: SDP: Session Description Protocol <http://tools.ietf.org/html/rfc4566>.
2. RFC 3264: An Offer/Answer Model with the Session Description Protocol (SDP) <http://tools.ietf.org/html/rfc3264>.
3. RFC 3261: Session Initiation Protocol (SIP) <http://tools.ietf.org/html/rfc3261>.
4. The Internet Engineering Task Force is the principal body engaged in the development of new Internet standard specifications, best known for its work on standards such as HTTP and SMTP. For further information, see <http://www.ietf.org/>.
5. The World Wide Web Consortium defines data formats and markup languages (such as HTML and XML) for use over the Internet. For further information, see <http://www.w3.org/>.
6. An XMPP Sub-protocol for WebSocket <https://datatracker.ietf.org/doc/draft-ietf-xmpp-websocket/>. Work in progress.
7. XEP-0124: Bidirectional-streams Over Synchronous HTTP <https://xmpp.org/extensions/xep-0124.html>.
8. XEP-0206: XMPP Over BOSH <https://xmpp.org/extensions/xep-0206.html>.
9. XEP-0166: Jingle <https://xmpp.org/extensions/xep-0166.html>.
10. XEP-0167: Jingle RTP Sessions <https://xmpp.org/extensions/xep-0167.html>.
11. RFC 7081: CUSAX: Combined Use of the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP) <http://tools.ietf.org/html/rfc7081>.
12. Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Addresses and Error Conditions <http://tools.ietf.org/html/draft-ietf-stox-core>.
13. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.
14. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.
15. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
16. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.
17. XEP-0053: XMPP Registrar Function <https://xmpp.org/extensions/xep-0053.html>.
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
Clarified scope and intent of the protocol.
First draft.
@report{saint-andre2013xepXXXX, title = {SIP/SDP Over XMPP (SoX)}, author = {Saint-Andre, Peter and Hildebrand, Joe and Jennings, Cullen}, type = {XEP}, number = {XXXX}, version = {0.0.2}, institution = {XMPP Standards Foundation}, url = {https://xmpp.org/extensions/xep-XXXX.html}, date = {2013-06-12/2013-12-02}, }
END