JEP-0111: A Transport for Initiating and Negotiating Sessions (TINS)

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.


JEP Information

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

Author Information

Joe Hildebrand

Email: jhildebrand@jabber.com
JID: hildjj@jabber.org

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Legal Notice

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

Discussion Venue

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

Relation to XMPP

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.

Conformance Terms

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.


Table of Contents

1. Introduction
2. Requirements
3. Protocol
4. Discovering Support
5. Examples
5.1. Negotiating a Voice Call
6. Security Considerations
7. IANA Considerations
8. Jabber Registrar Considerations
8.1. Protocol Namespaces
9. XML Schemas
9.1. tins
9.2. sdp
Notes
Revision History


1. Introduction

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.

2. Requirements

This JEP addresses the following requirements:

  1. Enable an XMPP entity to negotiate an out-of-band multimedia session with another XMPP entity.
  2. Enable an XMPP entity to negotiate an out-of-band multimedia session with a non-XMPP entity through a gateway.
  3. Maximize interoperability with existing gateways and devices by using standard Internet protocols.

3. Protocol

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:

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 &apos;). 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.

4. Discovering Support

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

5. Examples

5.1 Negotiating a Voice Call

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.

Example 1. Step 1: A sends an invite to B

<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&apos;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>
    

Example 2. Step 2: B tells A that it is trying

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

Example 3. Step 3: B tells A that it is ringing

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

Example 4. Step 4: B sends an updated description to A

<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&apos;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>
    

Example 5. Step 5: A sends an acknowledgement to B

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

Example 6. Step 6: B hangs up

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

Example 7. Step 7: A acknowledges the hang up

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

6. Security Considerations

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.

7. IANA Considerations

This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [15].

8. Jabber Registrar Considerations

8.1 Protocol Namespaces

The Jabber Registrar [16] shall include 'http://jabber.org/protocol/tins' in its registry of protocol namespaces.

9. XML Schemas

9.1 tins

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

9.2 sdp

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


Notes

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


Revision History

Version 0.7 (2005-05-12)

Corrected several errors in the text and schemas. (psa)

Version 0.6 (2004-10-26)

Added extended addresses and SHIM headers to examples in order to illustrate the use of JEP-0033 and JEP-0121. (psa/jjh)

Version 0.5 (2004-04-05)

Changed <iq/> to <message/> given probability of multiple SIP responses. (psa/jjh)

Version 0.4 (2004-03-16)

Specified that the <sdp/> element is in a separate namespace and that the same mechanism could be used for other content schemes in the future. (psa/jjh)

Version 0.3 (2004-03-15)

Replaced SDPng with SDP; added sections for Requirements, Protocol, and Discovering Support; added XML schema. (psa/jjh)

Version 0.2 (2003-07-29)

Converted to JEP format. (psa)

Version 0.1 (2003-02-21)

Internet-Draft version published as draft-hildebrand-xmpp-sdpng-00. (jjh)


END