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

Abstract
This document defined a SIP-compatible transport for initiating and negotiating sessions using SDP over XMPP.
Authors
  • Joe Hildebrand
  • Peter Saint-Andre
Copyright
© 1999 – 2020 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Retracted

WARNING: This document has been retracted by the author(s). Implementation of the protocol described herein is not recommended. Developers desiring similar functionality are advised to implement the protocol that supersedes this one (XEP-0166).
Type
Standards Track
Version
0.8 (2005-12-21)
Document Lifecycle
  1. Experimental
  2. Retracted
  3. Proposed
  4. Draft
  5. Final

1. Introduction

Note Well: This proposal has been retracted by the authors in favor of Jingle (XEP-0166) [1].

The Session Description Protocol (SDP; see RFC 2327 [2]) 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 XMPP Core [3]). [4] 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 [6]). 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 [7]) and XMPP services that support TINS can easily interoperate with SIP services through gateways.

2. Requirements

This document 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. [8] 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 [9]). [10] 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 (XEP-0030) [13], either directly by querying the target entity or indirectly by means of Entity Capabilities (XEP-0115) [14]. 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 (XEP-0086) [15] 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 6120.

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 document requires no interaction with the Internet Assigned Numbers Authority (IANA) [16].

8. XMPP Registrar Considerations

8.1 Protocol Namespaces

The XMPP Registrar [17] 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>

Appendices

Appendix A: Document Information

Series
XEP
Number
0111
Publisher
XMPP Standards Foundation
Status
Retracted
Type
Standards Track
Version
0.8
Last Updated
2005-12-21
Approving Body
XMPP Council
Dependencies
XMPP Core, RFC 2327, RFC 3261
Supersedes
None
Superseded By
XEP-0166
Short Name
tins
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Joe Hildebrand
Email
jhildebr@cisco.com
JabberID
hildjj@jabber.org
Peter Saint-Andre
Email
xsf@stpeter.im
JabberID
peter@jabber.org
URI
http://stpeter.im/

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

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.

Appendix E: Discussion Venue

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.

Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the <xsf-ietf@xmpp.org> list might also be appropriate.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

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

Appendix G: Notes

1. XEP-0166: Jingle <https://xmpp.org/extensions/xep-0166.html>.

2. RFC 2327: SDP: Session Description Protocol <http://tools.ietf.org/html/rfc2327>.

3. RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.

4. The approach taken herein is to send pure SDP. While earlier versions of this document used Session Description and Capability Negotiation (SDPng) [5] (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.

5. Session Description and Capability Negotiation (SDPng) <http://tools.ietf.org/html/draft-ietf-mmusic-sdpng>. Work in progress.

6. RFC 3261: Session Initiation Protocol (SIP) <http://tools.ietf.org/html/rfc3261>.

7. RFC 3550: RTP: A Transport Protocol for Real-Time Applications <http://tools.ietf.org/html/rfc3550>.

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

9. RFC 2648: A URN Namespace for IETF Documents <http://tools.ietf.org/html/rfc2648>.

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

11. XEP-0131: Stanza Headers and Internet Metadata <https://xmpp.org/extensions/xep-0131.html>.

12. XEP-0033: Extended Stanza Addressing <https://xmpp.org/extensions/xep-0033.html>.

13. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.

14. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.

15. XEP-0086: Error Condition Mappings <https://xmpp.org/extensions/xep-0086.html>.

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

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

Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

  1. Version 0.8 (2005-12-21)
    Retracted in favor of Jingle (XEP-0166).
    psa/jjh
  2. Version 0.7 (2005-05-12)
    Corrected several errors in the text and schemas.
    psa
  3. Version 0.6 (2004-10-26)
    Added extended addresses and SHIM headers to examples in order to illustrate the use of XEP-0033 and XEP-0121.
    psa/jjh
  4. Version 0.5 (2004-04-05)
    Changed <iq/> to <message/> given probability of multiple SIP responses.
    psa/jjh
  5. 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
  6. Version 0.3 (2004-03-15)
    Replaced SDPng with SDP; added sections for Requirements, Protocol, and Discovering Support; added XML schema.
    psa/jjh
  7. Version 0.2 (2003-07-29)
    Converted to XML format.
    psa
  8. Version 0.1 (2003-02-21)
    Internet-Draft version published as draft-hildebrand-xmpp-sdpng-00.
    jjh

END