This JEP defines a SIP-compatible transport for initiating and negotiating sessions using SDP over XMPP.
WARNING: This Standards-Track JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Status: Experimental
Type: Standards Track
Number: 0111
Version: 0.7
Last Updated: 2005-05-12
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, RFC 2327, RFC 3261
Supersedes: None
Superseded By: None
Short Name: tins
Wiki Page: <http://wiki.jabber.org/index.php/A Transport for Initiating and Negotiating Sessions (TINS) (JEP-0111)>
Email: jhildebrand@jabber.com
JID: hildjj@jabber.org
Email: stpeter@jabber.org
JID: stpeter@jabber.org
This Jabber Enhancement Proposal is copyright 1999 - 2005 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).
The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.
Given that this JEP normatively references IETF technologies, discussion on the JSF-IETF list may also be appropriate (see <http://mail.jabber.org/mailman/listinfo/jsf-ietf> for details).
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software 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 JEP 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 keywords "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 RFC 2119.
The Session Description Protocol (SDP; see RFC 2327 [1]) provides a mechanism for describing multimedia sessions that are advertised and negotiated over the Internet. The "Transport for Initiating and Negotiating Sessions" (TINS) specified herein describes how to use SDP to build a framework for media stream/session initiation and negotiation between entities that natively support XMPP (see RFC 3920 [2]). [3] In particular, TINS provides an XMPP representation of standard session management semantics such as those provided by the Session Initiation Protocol (SIP; see RFC 3261 [5]). As a result, native XMPP clients that support TINS can negotiate out-of-band multimedia sessions (e.g., use of the Real-Time Transport Protocol or RTP; see RFC 3550 [6]) and XMPP services that support TINS can easily interoperate with SIP services through gateways.
This JEP addresses the following requirements:
TINS exchanges are completed by sending <message/> stanzas containing a child <tins/> element qualified by the 'http://jabber.org/protocol/tins' namespace. [7] In order to track the structure of the TINS "conversation", the <thread/> child of <message/> MAY also be included. The <tins/> element MUST possess a 'method' attribute, whose value SHOULD be either an IANA-registered value for a SIP method or "result", as described below. The following SIP methods will probably be used most frequently in TINS interactions:
INVITE -- Used to invite the target user to an out-of-band session. The content inside the <tins/> element MAY be SDP descriptions of the connection types offered. If a session is already established for this transaction, the new INVITE serves as a renegotiation of session parameters.
ACK -- Used by the initiator to tell the invitee that an out-of-band session has been established.
BYE -- Used by either side of the conversation to terminate the transaction. This message SHOULD cause all resources associated with this transaction to be freed, and any associated network connections to be terminated.
The SDP data itself is included as the XML character data of an <sdp/> child of the <tins/> element, qualifed by the 'urn:ietf:rfc:2327' namespace (this is consistent with RFC 2648 [8]). [9] Any restricted XML characters in the SDP data (i.e., & ' < > ") MUST be properly escaped when contained in the XML character data of the <sdp/> element (for example, the ' character MUST be escaped to '). It is the responsibility of the XMPP recipient or translating gateway to unescape these restricted characters for processing.
The request stanza MAY also include either or both of the following:
In reply to a request, the receiver MUST send zero or more replies, with the value of the 'method' attribute set to a value of "result" and the value of the 'code' attribute set to one of the valid SIP response codes as specified in Section 21 of RFC 3261.
Before initiating a TINS negotiation, an XMPP entity SHOULD determine that the target entity supports the 'http://jabber.org/protocol/tins' namespace. Such discovery SHOULD occur by means of Service Discovery [12], either directly by querying the target entity or indirectly by means of Entity Capabilities [13]. If the target entity is a non-XMPP entity that is contacted through a gateway, the gateway itself SHOULD reply to service discovery queries on behalf of the non-XMPP entity and SHOULD insert a client capabilities extension into the presence stanzas it generates on behalf of the non-XMPP entity.
If an XMPP entity receives, or a gateway handles, a <message/> stanza containing a <tins/> element qualified by the 'http://jabber.org/protocol/tins' namespace but it does not understand the TINS protocol, it SHOULD either silently ignore it or return a <service-unavailable/> error (see Error Condition Mappings [14] for error syntax).
The following XMPP stanzas could be used to initiate a voice call. The 'from' addresses will usually be added by the XMPP server or relevant gateway, but are shown here for the sake of clarity. Note the inclusion of SHIM headers and extended addresses.
<message from='A@example.com/work' to='B@example.com/laptop' id='tins01'> <thread>1234@hostA.example.com</thread> <tins method='INVITE' xmlns='http://jabber.org/protocol/tins'> <sdp xmlns='urn:ietf:rfc:2327'> v=0 o=A@example.com 98765432 IN IP4 192.168.1.1 s=TINS questions i=Let's talk about TINS e=A@example.com p=+1-303-555-1212 c=IN IP4 192.168.1.1/127 t=3288361865 0 a=recvonly m=audio 7800 RTP/AVP 0 </sdp> </tins> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
<message from='B@example.com/laptop' to='A@example.com/work' id='tins01'> <thread>1234@hostA.example.com</thread> <tins method='result' code='100' xmlns='http://jabber.org/protocol/tins'/> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
<message from='B@example.com/laptop' to='A@example.com/work' id='tins01'> <tins method='result' code='180' xmlns='http://jabber.org/protocol/tins'/> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
<message from='B@example.com/laptop' to='A@example.com/work' id='tins02'> <thread>1234@hostA.example.com</thread> <tins method='result' code='200' xmlns='http://jabber.org/protocol/tins'> <sdp xmlns='urn:ietf:rfc:2327'> v=0 o=A@example.com 98765432 IN IP4 192.168.1.2 s=TINS questions i=Let's talk about TINS e=A@example.com p=+1-303-555-1212 c=IN IP4 192.168.1.2/127 t=3288361865 0 a=recvonly m=audio 7800 RTP/AVP 0 a=recvonly m=audio 9410 RTP/AVP 0 </sdp> </tins> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
<message from='A@example.com/work' to='B@example.com/laptop' id='tins02'> <thread>1234@hostA.example.com</thread> <tins method='ACK' xmlns='http://jabber.org/protocol/tins'/> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
<message from='B@example.com/laptop' to='A@example.com/work' id='tins03'> <thread>1234@hostA.example.com</thread> <tins method='BYE' xmlns='http://jabber.org/protocol/tins'/> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
<message from='A@example.com/work' to='B@example.com/laptop' id='tins03'> <thread>1234@hostA.example.com</thread> <tins method='result' code='200' xmlns='http://jabber.org/protocol/tins'/> <headers xmlns='http://jabber.org/protocol/shim'> <header name='Via'>SIP/2.0/UDP tins.example.com;branch=z9hG4bK776asdhds</header> <header name='Call-ID'>a84b4c76e66710@tins.example.com</header> <header name='CSeq'>314159 INVITE</header> </headers> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='compliance.example.com'/> </addresses> </message>
More examples to follow.
TINS is subject to the same security considerations as XMPP, particularly with regard to authentication and channel encryption; for details, refer to RFC 3920.
This document does not describe how the media protocols (e.g. RTP) traverse firewalls and NATs.
There is no general-purpose way to ensure that media protocol connections are associated with the in-band TINS conversation.
This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [15].
The Jabber Registrar [16] shall include 'http://jabber.org/protocol/tins' in its registry of protocol namespaces.
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://jabber.org/protocol/tins' xmlns='http://jabber.org/protocol/tins' elementFormDefault='qualified'> <xs:import namespace='urn:ietf:rfc:2327'/> <xs:element name='tins'> <xs:complexType> <xs:choice xmlns:sdp='urn:ietf:rfc:2327'> <xs:element ref='sdp:sdp'/> <xs:any namespace='##other'/> </xs:choice> <xs:attribute name='code' type='xs:string' use='optional'/> <xs:attribute name='method' type='xs:string' use='required'/> </xs:complexType> </xs:element> </xs:schema>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:ietf:rfc:2327' xmlns='urn:ietf:rfc:2327' elementFormDefault='qualified'> <xs:element name='sdp' type='xs:string'/> </xs:schema>
1. RFC 2327: SDP: Session Description Protocol <http://www.ietf.org/rfc/rfc2327.txt>.
2. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://www.ietf.org/rfc/rfc3920.txt>.
3. The approach taken herein is to send pure SDP. While earlier versions of this document used Session Description and Capability Negotiation (SDPng) [4] (an XML representation of SDP), SDPng is a more experimental technology; by contrast, SDP is a stable protocol and there is broad support for it by existing gateways and devices. The use of SDP rather than SDPng thus enables the Jabber/XMPP community to implement solutions that are deployable on the Internet today.
4. Session Description and Capability Negotiation (SDPng) <http://www.ietf.org/internet-drafts/draft-ietf-mmusic-sdpng-09.txt>. Work in progress.
5. RFC 3261: Session Initiation Protocol (SIP) <http://www.ietf.org/rfc/rfc3261.txt>.
6. RFC 3550: RTP: A Transport Protocol for Real-Time Applications <http://www.ietf.org/rfc/rfc3550.txt>.
7. While it may seem that the semantics of <iq/> stanzas are more appropriate, RFC 3261 allows entities to send multiple results in response to a SIP request, which does not map to the syntax of the <iq/> stanza as defined in RFC 3920.
8. RFC 2648: A URN Namespace for IETF Documents <http://www.ietf.org/rfc/rfc2648.txt>.
9. The <sdp/> element is qualified by a separate namespace because it may be desirable for TINS to support other formats (such as SDPng) in the future; these can then be added without changing the XML schema for TINS.
10. JEP-0131: Stanza Headers and Internet Metadata (SHIM) <http://www.jabber.org/jeps/jep-0131.html>.
11. JEP-0033: Extended Stanza Addressing <http://www.jabber.org/jeps/jep-0033.html>.
12. JEP-0030: Service Discovery <http://www.jabber.org/jeps/jep-0030.html>.
13. JEP-0115: Entity Capabilities <http://www.jabber.org/jeps/jep-0115.html>.
14. JEP-0086: Error Condition Mappings <http://www.jabber.org/jeps/jep-0086.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 Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.
END