A Transport for Initiating and Negotiating Sessions (TINS) 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.6
Last Updated: 2004-10-26
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, RFC 2327, RFC 3261
Supersedes: None
Superseded By: None
Short Name: tins
Email: jhildebrand@jabber.com
JID: hildjj@jabber.org
Email: stpeter@jabber.org
JID: stpeter@jabber.org
This Jabber Enhancement Proposal is copyright 1999 - 2004 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.php>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at <http://www.opencontent.org/openpub/>).
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 and XMPP IM 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 protocols defined in this JEP have been developed outside the Internet Standards Process and are to be understood as extensions 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) provides a mechanism for describing multimedia sessions that are advertised and negotiated over the Internet. This document describes how to use SDP to build a framework for media stream/session initiation and negotiation between Jabber entities. In particular, SDP (as specified in RFC 2327 [1]) over XMPP (as specified in XMPP Core [2]) is used to provide a semantics for signalling call setup that is similar to the semantics provided by the Session Initiation Protocol as defined in RFC 3261 [3]. The resulting mechanism is called the "Transport for Initiating and Negotiating Sessions" or TINS.
This JEP addresses the following requirements:
The approach taken herein is to send pure Session Description Protocol (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 RFC and there is broad support for it by existing gateways and devices. The use of SDP rather than SDPng thus enables the Jabber community to implement solutions that are deployable on the Internet today.
The container element used in this protocol is the <tins/> element qualified by the 'http://jabber.org/protocol/tins' namespace. The <tins/> element SHOULD be included as the child of a <message/> stanza only (<iq/> stanzas SHOULD NOT be used because 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 XMPP Core). In order to track the structure of the TINS "conversation", the <thread/> child of <message/> MAY be used.
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 -- Either side of the conversation decides 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 [5]). 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 Jabber recipient or translating gateway to unescape these restricted characters. (Note: 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.)
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, a Jabber entity SHOULD determine that the target entity supports the 'http://jabber.org/protocol/tins' namespace. Such discovery SHOULD occur by means of Service Discovery [8], either directly by querying the target entity or indirectly by means of Entity Capabilities [9]. If the target entity is a non-Jabber entity that is contacted through a gateway, the gateway itself SHOULD reply to service discovery queries on behalf of the non-Jabber entity and SHOULD insert a client capabilities extension into the presence stanzas it generates on behalf of the non-Jabber entity.
If a Jabber entity receives, or a gateway handles, an IQ stanza containing a <tins/> element qualified by the 'http://jabber.org/protocol/tins' namespace but does not understand the TINS protocol, it MUST return a "Service Unavailable" error (see Error Condition Mappings [10] 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 XMPP Core.
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) [11].
The Jabber Registrar [12] 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:element name='tins'> <xs:complexType> <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. RFC 3261: Session Initiation Protocol (SIP) <http://www.ietf.org/rfc/rfc3261.txt>.
4. Session Description and Capability Negotiation (SDPng) <http://www.ietf.org/internet-drafts/draft-ietf-mmusic-sdpng-07.txt>. Work in progress.
5. RFC 2648: A URN Namespace for IETF Documents <http://www.ietf.org/rfc/rfc2648.txt>.
6. JEP-0131: Stanza Headers and Internet Metadata (SHIM) <http://www.jabber.org/jeps/jep-0131.html>.
7. JEP-0033: Extended Stanza Addressing <http://www.jabber.org/jeps/jep-0033.html>.
8. JEP-0030: Service Discovery <http://www.jabber.org/jeps/jep-0030.html>.
9. JEP-0115: Entity Capabilities <http://www.jabber.org/jeps/jep-0115.html>.
10. JEP-0086: Error Condition Mappings <http://www.jabber.org/jeps/jep-0086.html>.
11. 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/>.
12. 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