JEP-0111: TINS

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.


JEP Information

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

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

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

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
9. XML Schemas
9.1. tins
9.2. sdp
Notes
Revision History


1. Introduction

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.

2. Requirements

This JEP addresses the following requirements:

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

3. Protocol

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:

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

4. Discovering Support

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

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

7. IANA Considerations

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

8. Jabber Registrar Considerations

The Jabber Registrar [12] 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: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>
    

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


Revision History

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