%ents; ]>
SIP/SDP Over XMPP (SoX) This specification defines an XMPP protocol extension for communicating Session Description Protocol (SDP) data, along with relevant Session Initiation Protocol (SIP) headers. The SoX protocol is designed for use by XMPP-only endpoints that need to communicate raw SDP information (e.g., in WebRTC scenarios), not as a general-purpose replacement for the XMPP Jingle extensions. &LEGALNOTICE; XXXX ProtoXEP Standards Track Standards Council XMPP Core NOT_YET_ASSIGNED &stpeter; &hildjj; Cullen Jennings fluffy@cisco.com fluffy@cisco.com 0.0.2 2013-12-02 psa

Clarified scope and intent of the protocol.

0.0.1 2013-06-12 psa

First draft.

The Session Description Protocol (SDP) &rfc4566; is widely used to communicate information about media sessions, typically using the offer/answer model &rfc3264;. For example, when the Session Initiation Protocol (SIP) &rfc3261; 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 &IETF; and &W3C; 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 &xmppoverwebsocket; or using &xep0124; and &xep0206;. Although such an application could use &xep0166; and &xep0167; 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 &rfc7081; 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.

INVITE sip:juliet@im.example.com sip/2.0 Via: SIP/2.0/tcp example.net;branch=z9hG4bK1602341dcb7 From: ;tag=0019 To: Contact: ;gr=orchard Call-Info: ;purpose=impp Call-ID: 0019aa04-50550007-660c7034-529a811b Date: Mon, 6 May 2013 21:27:24 GMT User-Agent: foo CSeq: 101 INVITE Max-Forwards: 70 Expires: 180 Allow: ACK,BYE,CANCEL,INVITE Content-Type: application/sdp Content-Length: nnnn v=0 o= IN IP4 s=SoX Media Setup c=IN IP4 t=0 0 m=audio 9000 RTP/AVP 105 106 121 a=rtpmap:105 opus/48000/2 a=fmtp:105 maxplaybackrate=16000; sprop-maxcapturerate=16000; maxaveragebitrate=24000; stereo=1; useinbandfec=1; usedtx=0 a=rtpmap:106 iLBC/8000 a=ptime:40 a=maxptime:40 a=recv-source 1,2,3 a=rtpmap:121 mix/90000/1 a=fmtp: 121 105/106 a=sendrecv ]]>

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.

;tag=0019 To: Contact: ;gr=orchard Call-Info: ;purpose=impp Call-ID: 0019aa04-50550007-660c7034-529a811b Date: Mon, 6 May 2013 21:27:24 GMT User-Agent: foo CSeq: 101 INVITE Max-Forwards: 70 Expires: 180 Allow: ACK,BYE,CANCEL,INVITE Content-Type: application/sdp Content-Length: nnnn v=0 o= IN IP4 s=SoX Media Setup c=IN IP4 t=0 0 m=audio 9000 RTP/AVP 105 106 121 a=rtpmap:105 opus/48000/2 a=fmtp:105 maxplaybackrate=16000; sprop-maxcapturerate=16000; maxaveragebitrate=24000; stereo=1; useinbandfec=1; usedtx=0 a=rtpmap:106 iLBC/8000 a=ptime:40 a=maxptime:40 a=recv-source 1,2,3 a=rtpmap:121 mix/90000/1 a=fmtp: 121 105/106 a=sendrecv ]]>

Address mapping between SIP and XMPP can be a challenge. See &stoxcore; 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 &xep0030; 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 &xep0115;. 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 &IANA;.

This specification defines the following XML namespace:

  • urn:xmpp:sox:0

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.

&NSVER;
]]>

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>.