The IETFs RTCWEB working group has decided to use RFC 4566 [1] as the API surface for WebRTC. For XMPP this opened up a number of questions about the future of Jingle, XMPPs native signalling protocol, since Jingle does not use SDP. Various proposals have been made, including mappingSDP to Jingle and vice versa over to a dumb transport of SDP (called SoX) inside <message/> stanzas. This document proposes a way to transport SDP over Jingle which respects the established session model of Jingle.
Take the following SDP offer
v=0 o=- 8065558698633182641 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-ufrag:6dCka9VISByPAFOH a=ice-pwd:k9ct1Zmco8RPW9C147atRl2X a=ice-options:google-ice a=fingerprint:sha-256 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=sendrecv a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:111 opus/48000/2 a=fmtp:111 minptime=10 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:107 CN/48000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:126 telephone-event/8000 a=maxptime:60 a=ssrc:3176601530 cname:GD84ngCycPaY3cQx a=ssrc:3176601530 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCla0 a=ssrc:3176601530 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:3176601530 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCla0 m=video 1 RTP/SAVPF 100 116 117 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-ufrag:6dCka9VISByPAFOH a=ice-pwd:k9ct1Zmco8RPW9C147atRl2X a=ice-options:google-ice a=fingerprint:sha-256 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=sendrecv a=mid:video a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:100 VP8/90000 a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 goog-remb a=rtpmap:116 red/90000 a=rtpmap:117 ulpfec/90000 a=ssrc:2358488720 cname:GD84ngCycPaY3cQx a=ssrc:2358488720 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0 a=ssrc:2358488720 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:2358488720 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0
This SDP consists of a session level section and has two media description. It can easily be transformed to the following session-initiate by splitting it at "\r\nm=":
<iq from='romeo@montague.lit/orchard' id='ih28sx61' to='juliet@capulet.lit/balcony' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> <session xmlns='urn:xmpp:jingle:apps:sdp'> v=0 o=- 8065558698633182641 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl </session> <content creator='initiator' name='audio'> <description xmlns='urn:xmpp:jingle:apps:sdp'> m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-options:google-ice a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=sendrecv a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:111 opus/48000/2 a=fmtp:111 minptime=10 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:107 CN/48000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:126 telephone-event/8000 a=maxptime:60 a=ssrc:3176601530 cname:GD84ngCycPaY3cQx a=ssrc:3176601530 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCla0 a=ssrc:3176601530 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:3176601530 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCla0 </description> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' ufrag='6dCka9VISByPAFOH' pwd='k9ct1Zmco8RPW9C147atRl2X'> <fingerprint xmlns='urn:xmpp:tmp:jingle:apps:dtls:0' hash='sha-256'> 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E </fingerprint> </transport> </content> <content creator='initiator' name='video'> <description xmlns='urn:xmpp:jingle:apps:sdp'> m=video 1 RTP/SAVPF 100 116 117 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-options:google-ice a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=sendrecv a=mid:video a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:100 VP8/90000 a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 goog-remb a=rtpmap:116 red/90000 a=rtpmap:117 ulpfec/90000 a=ssrc:2358488720 cname:GD84ngCycPaY3cQx a=ssrc:2358488720 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0 a=ssrc:2358488720 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:2358488720 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0 </description> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' ufrag='6dCka9VISByPAFOH' pwd='k9ct1Zmco8RPW9C147atRl2X'> <fingerprint xmlns='urn:xmpp:tmp:jingle:apps:dtls:0' hash='sha-256'> 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E </fingerprint> </transport> </content> </jingle> </iq>
Note that the a=ice-ufrag, a=ice-pwd and a=fingerprint lines are removed from the SDP (either in session level or all of the mediadescriptions) and put into the transport element. The same rule applies to any a=candidate lines. [2]
The receiver can reconstruct the SDP by first extracting the session section and then appending the media descriptions. When reconstructing the mediasections, the transport information can simply be appended to the raw SDP.
Sending individual ice candidates is done as described in Jingle ICE-UDP Transport Method (XEP-0176) [3]:
<iq from='romeo@montague.lit/orchard' id='uh3g1f48' to='juliet@capulet.lit/balcony' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='transport-info' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> <content creator='initiator' name='this-is-the-audio-content'> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' pwd='6dCka9VISByPAFOH' ufrag='k9ct1Zmco8RPW9C147atRl2X'> <candidate component='1' foundation='1' generation='0' id='m3110wc4nd' ip='2001:db8::9:1' network='0' port='9001' priority='21149780477' protocol='udp' type='host'/> </transport> </content> </jingle> </iq>
The mapping of a=candidate lines to Jingle and vice versa is relatively simple and described in XEP-0176.
This section is actually where things get interesting. It should talk about adding or removing content which is a concept that has been known in Jingle for ages and is now coming to SDP with the "partial offer/partial answer" concept from Unified Plan. This is the reason why the individual m-lines are transported in separate <content/> elements.
The initiator starts with the offer SDP as described in the first section, but with audio only. Video is added later. Thus it sends the following session-initiate:
<iq from='romeo@montague.lit/orchard' id='ih28sx61' to='juliet@capulet.lit/balcony' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> <session xmlns='urn:xmpp:jingle:apps:sdp'> v=0 o=- 8065558698633182641 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio a=msid-semantic: WMS QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl </session> <content creator='initiator' name='audio'> <description xmlns='urn:xmpp:jingle:apps:sdp'> m=audio 1 RTP/SAVPF 111 103 104 0 8 107 106 105 13 126 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-options:google-ice a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=sendrecv a=mid:audio a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:111 opus/48000/2 a=fmtp:111 minptime=10 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:107 CN/48000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:126 telephone-event/8000 a=maxptime:60 a=ssrc:3176601530 cname:GD84ngCycPaY3cQx a=ssrc:3176601530 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCla0 a=ssrc:3176601530 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:3176601530 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCla0 </description> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' ufrag='6dCka9VISByPAFOH' pwd='k9ct1Zmco8RPW9C147atRl2X'> <fingerprint xmlns='urn:xmpp:tmp:jingle:apps:dtls:0' hash='sha-256'> 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E </fingerprint> </transport> </content> </jingle> </iq>
After the session is established, the initiator wants to add video from his webcam. It creates a new (full) SDP offer which will look like the one in example 1, but with candidates already added. It then calculates the difference between the new offer and the initial offer [4] which may consist of more than one mediaparts.
m=video 1 RTP/SAVPF 100 116 117 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-ufrag:6dCka9VISByPAFOH a=ice-pwd:k9ct1Zmco8RPW9C147atRl2X a=ice-options:google-ice a=fingerprint:sha-256 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=sendrecv a=mid:video a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:100 VP8/90000 a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 goog-remb a=rtpmap:116 red/90000 a=rtpmap:117 ulpfec/90000 a=ssrc:2358488720 cname:GD84ngCycPaY3cQx a=ssrc:2358488720 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0 a=ssrc:2358488720 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:2358488720 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0
When BUNDLE is used this will typically also contain a=candidate lines which are omitted for simplicity. This is transformed to a content-add. Note that the session-part must be resent if BUNDLE is used in the session since the BUNDLE group has changed:
<iq from='romeo@montague.lit/orchard' id='ih28sx61' to='juliet@capulet.lit/balcony' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> <session xmlns='urn:xmpp:jingle:apps:sdp'> v=0 o=- 8065558698633182643 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl </session> <content creator='initiator' name='audio'> <description xmlns='urn:xmpp:jingle:apps:sdp'> m=video 1 RTP/SAVPF 100 116 117 c=IN IP4 0.0.0.0 a=rtcp:1 IN IP4 0.0.0.0 a=ice-options:google-ice a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=sendrecv a=mid:video a=rtcp-mux a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:+dMXm95m1recm8SlC3Ux66LH+z7Ve1LKoPKjbxWL a=rtpmap:100 VP8/90000 a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 goog-remb a=rtpmap:116 red/90000 a=rtpmap:117 ulpfec/90000 a=ssrc:2358488720 cname:GD84ngCycPaY3cQx a=ssrc:2358488720 msid:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0 a=ssrc:2358488720 mslabel:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcCl a=ssrc:2358488720 label:QoHel4kmL4ZFaJuTwmz3VpyxzMRCcNDEmcClv0 </description> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' ufrag='6dCka9VISByPAFOH' pwd='k9ct1Zmco8RPW9C147atRl2X'> <fingerprint xmlns='urn:xmpp:tmp:jingle:apps:dtls:0' hash='sha-256'> 7C:BA:4D:D8:25:61:57:22:BA:0C:5C:F3:7E:55:61:70:AF:9A:E9:F0:E6:51:8F:3E:7A:45:57:67:E7:B1:AB:4E </fingerprint> </transport> </content> </jingle> </iq>
The receiver extracts the new session part and the additional media description(s) and constructs the new SDP based on the previous one [5].
probably appropriate for showing webrtc stuff.
TBD. Nothing beyond considerations from 0166/0167.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [6].
TBD.
TBD.
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.
Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the <xsf-ietf@xmpp.org> list might also be appropriate.
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. FIXME: what about ice-options and rtcp-mux?
3. XEP-0176: Jingle ICE-UDP Transport Method <https://xmpp.org/extensions/xep-0176.html>.
4. At some point, the browser may do this.
5. at some point, the browser may be able to do this, too
6. 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/>.
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
First draft.
@report{hancke2013jingle-sdp, title = {Jingle SDP Content}, author = {Hancke, Philipp}, type = {XEP}, number = {xxxx}, version = {0.0.1}, institution = {XMPP Standards Foundation}, url = {https://xmpp.org/extensions/xep-xxxx.html}, date = {2013-09-05/2013-09-05}, }
END