Abstract: | This specification provides a way for the initiator of a Jingle session to propose sending an invitation in an XMPP message stanza, thus taking advantage of message delivery semantics instead of sending IQ stanzas to all of the responder's online resources or choosing a particular online resource. |
Authors: | Philipp Hancke, Peter Saint-Andre |
Copyright: | © 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.2.0 |
Last Updated: | 2014-10-02 |
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.
1. Introduction
2. Requirements
3. Use Cases
3.1. Indicating Intent to Start a Session
3.2. Disavowing Intent to Start a Session
3.3. Accepting Intent to Start a Session
3.4. Rejecting Intent to Start a Session
3.5. Initiating the Jingle Session
4. Open Issues
5. Acknowledgements
6. Security Considerations
7. IANA Considerations
8. XMPP Registrar Considerations
8.1. Protocol Namespaces
8.2. Protocol Versioning
9. XML Schema
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Because Jingle (XEP-0166) [1] uses <iq/> stanzas for all interactions between the parties to a session, when sending an invitation the initiator needs to either pick one of the responder's resources (e.g., based on Entity Capabilities (XEP-0115) [2] information) or send the invitation to all of the responder's resources that support Jingle. The first method is prone to error (e.g., in cases where more than one resource supports Jingle) and the second method requires sending a separate invitation to each resource. Neither of these is ideal. Although Presence Decloaking (XEP-0276) [3] proposed a way to overcome the problem, it too has issues (e.g., dependency on a presence service and the need to reveal all supported XMPP features) and in any case has not been widely implemented.
This document proposes an alternative solution: exchanging a <message/> stanza before sending the Jingle invitation in an <iq/> stanza. (Indeed, in the early discussions leading up to the Jingle protocol the authors considered using <message/> stanzas instead of <iq/> stanzas, but chose the latter for their deterministic handling semantics.) This method effectively results in a kind of decloaking for Jingle purposes.
This protocol was designed with the following requirements in mind:
In order to prepare for sending a Jingle invitation, the initiator (e.g., Romeo) sends a <message/> stanza containing a <propose/> element qualified by the 'urn:xmpp:jingle-message:0' namespace. The <propose/> element MUST possess an 'id' attribute that will be used for the session invitation and MUST contain one <description/> element for each media type associated with the intended session.
<message from='romeo@montague.example/orchard' to='juliet@capulet.example'> <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'> <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/> </propose> </message>
The server of the responder (e.g., Juliet) distributes this message stanza to all of Juliet's available resources (and to push resources as appropriate). Those devices might start ringing as a result.
<!-- delivered to juliet@capulet.example/desktop --> <message from='romeo@montague.example/orchard' to='juliet@capulet.example'> <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'> <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/> </propose> </message> <!-- delivered to juliet@capulet.example/tablet --> <message from='romeo@montague.example/orchard' to='juliet@capulet.example'> <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'> <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/> </propose> </message> <!-- delivered to juliet@capulet.example/phone --> <message from='romeo@montague.example/orchard' to='juliet@capulet.example'> <propose xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'> <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'/> </propose> </message>
Consistent with the recommendation for one-to-one chat sessions in Section 5.1 of RFC 6121 [4], the initiator SHOULD also send directed presence to the responder if the two entities do not already share presence information; including Entity Capabilities (XEP-0115) information in this directed presence stanza enables the responder to know the availability of the initiator (e.g., in case the message is actually delivered quite a bit later because it is saved to offline storage) and also to know the XMPP feautures supported by the initiator.
<presence to='romeo@montague.example/orchard' from='juliet@capulet.example'> <c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://psi-im.org' ver='q07IKJEyjvHSyhy//CH0CxmKi8w='/> </presence>
It can happen that the initiator might want to disavow intent to send a session invitation (e.g., because the initiator has accepted another session). The initiator can do so by sending a message stanza containing a <retract/> element specifying the same session ID.
<message from='romeo@montague.example/orchard' to='juliet@capulet.example'> <retract xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message>
Upon receiving the intent message, the responder's various devices will "ring" and the responder will answer the call on a particular device. Here we assume that since this is an audio-only call, Juliet chooses to take the call on the device associated with her "phone" resource.
As a first step, her "phone" resource informs all of her resources about accepting the call by sending a message to her own bare JID containing an <accept/> element specifying the session ID of the original <propose/> message.
<message from='juliet@capulet.example/phone' to='juliet@capulet.example'> <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message>
Juliet's server broadcasts this accept message to all of her available resources (as described in RFC 6121), which stop ringing:
<!-- delivered to juliet@capulet.example/desktop --> <message from='juliet@capulet.example/phone' to='juliet@capulet.example'> <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message> <!-- delivered to juliet@capulet.example/tablet --> <message from='juliet@capulet.example/phone' to='juliet@capulet.example'> <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message> <!-- delivered to juliet@capulet.example/phone --> <message from='juliet@capulet.example/phone' to='juliet@capulet.example'> <accept xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message>
Next, the device from which Juliet accepted the call tells Romeo to proceed with the session (via a message stanza containing a <proceed/> element), and also sends directed presence for the reasons described above.
<message from='juliet@capulet.example/phone' to='romeo@montague.example/orchard'> <proceed xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message> <presence from='juliet@capulet.example/phone' to='romeo@montague.example/orchard'> <c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://code.google.com/p/exodus' ver='QgayPKawpkPSDYmwT/WM94uAlu0='/> </presence>
Instead of accepting the call, the responder might want to ignore the call and tell all of her devices to stop ringing (e.g., perhaps because Romeo is getting to be a bit of a nuisance). She does this by rejecting the call on one of her devices and having that device tell all of the other devices to stop ringing, in the form of a message to her own bare JID containing an <reject/> element specifying the session ID of the original <propose/> message.
<message from='juliet@capulet.example/tablet' to='juliet@capulet.example'> <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message>
Juliet's server broadcasts this reject message to all of her available resources (as described in RFC 6121), which stop ringing:
<!-- delivered to juliet@capulet.example/desktop --> <message from='juliet@capulet.example/tablet' to='juliet@capulet.example'> <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message> <!-- delivered to juliet@capulet.example/tablet --> <message from='juliet@capulet.example/tablet' to='juliet@capulet.example'> <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message> <!-- delivered to juliet@capulet.example/phone --> <message from='juliet@capulet.example/tablet' to='juliet@capulet.example'> <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message>
Next, the responder MAY want to decline the call explicitly, in the form of a message to the sender’s full JID containing a <reject/> element specifying the session ID of the original <propose/> message.
<message from='juliet@capulet.example/tablet' to='romeo@montague.example/orchard'> <reject xmlns='urn:xmpp:jingle-message:0' id='a73sjjvkla37jfea'/> </message>
Now Romeo actually initiates the session (segue to Jingle itself).
<iq from='romeo@montague.example/orchard' id='ih28sx61' to='juliet@capulet.example/phone' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='romeo@montague.example/orchard' sid='a73sjjvkla37jfea'> <content creator='initiator' name='voice'> <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'> <payload-type id='96' name='speex' clockrate='16000'/> <payload-type id='97' name='speex' clockrate='8000'/> <payload-type id='18' name='G729'/> <payload-type id='0' name='PCMU'/> <payload-type id='103' name='L16' clockrate='16000' channels='2'/> <payload-type id='98' name='x-ISAC' clockrate='8000'/> </description> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1' pwd='asd88fgpdd777uzjYhagZg' ufrag='8hhy'> <candidate component='1' foundation='1' generation='0' id='el0747fg11' ip='10.0.1.1' network='1' port='8998' priority='2130706431' protocol='udp' type='host'/> <candidate component='1' foundation='2' generation='0' id='y3s2b30v3r' ip='192.0.2.3' network='1' port='45664' priority='1694498815' protocol='udp' rel-addr='10.0.1.1' rel-port='8998' type='srflx'/> </transport> </content> </jingle> </iq>
The following issues remain to be closed:
Thanks to Lance Stout for his feedback.
Because exchanging messages with other entities is effectively is a presence leak, an XMPP client that implements the receiving side of this specification MUST disable sending of proceed messages by default and MUST enable the feature only as a result of explicit user confirmation. Such confirmation can be provided per request, by whitelisting requests received from Jingle initiators in the responder's contact list, or through some other suitable means as long as sending proceed messages does not occur by default.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [5].
This specification defines the following XML namespace:
The XMPP Registrar [6] includes 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) [7].
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.
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xml='http://www.w3.org/XML/1998/namespace' targetNamespace='urn:xmpp:jingle-message:0' xmlns='urn:xmpp:jingle-message:0' elementFormDefault='qualified'> <xs:element name='accept'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='id' type='xs:string' use='required'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name='proceed'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='id' type='xs:string' use='required'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name='propose'> <xs:complexType> <xs:sequence> <xs:any namespace='##other' minOccurs='1' maxOccurs='unbounded'/> </xs:sequence> <xs:attribute name='id' type='xs:string' use='required'/> </xs:complexType> </xs:element> <xs:element name='reject'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='id' type='xs:string' use='required'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name='retract'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='id' type='xs:string' use='required'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:schema>
Series: XEP
Number: 0353
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.2.0
Last Updated: 2014-10-02
Approving Body: XMPP Council
Dependencies: XEP-0166
Supersedes: None
Superseded By: None
Short Name: jingle-message
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
fippo@andyet.com
JabberID:
fippo@goodadvice.pages.de
Email:
peter@andyet.net
JabberID:
stpeter@stpeter.im
URI:
https://stpeter.im/
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 <http://xmpp.org/about/discuss.shtml> 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. XEP-0166: Jingle <https://xmpp.org/extensions/xep-0166.html>.
2. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.
3. XEP-0276: Presence Decloaking <https://xmpp.org/extensions/xep-0276.html>.
4. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.
5. 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/>.
6. 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/>.
7. XEP-0053: XMPP Registrar Function <https://xmpp.org/extensions/xep-0053.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Add explicit reject by responding to sender with reject message.
(xd, XEP Editor: ssw)Initial published version approved by the XMPP Council.
(XEP Editor (mam))Added explanatory text; defined more granular actions (propose, retract, accept, reject, proceed); mandated inclusion of description elements within the propose element, as in jingle-pub; defined schema.
(psa/ph)First draft.
(ph)END