1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00
xeps/xep-0111.xml

337 lines
16 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>A Transport for Initiating and Negotiating Sessions (TINS)</title>
<abstract>This document defined a SIP-compatible transport for initiating and negotiating sessions using SDP over XMPP.</abstract>
&LEGALNOTICE;
<number>0111</number>
<status>Retracted</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>RFC 2327</spec>
<spec>RFC 3261</spec>
</dependencies>
<supersedes/>
<supersededby>
<spec>XEP-0166</spec>
</supersededby>
<shortname>tins</shortname>
&hildjj;
&stpeter;
<revision>
<version>0.8</version>
<date>2005-12-21</date>
<initials>psa/jjh</initials>
<remark>Retracted in favor of Jingle (XEP-0166).</remark>
</revision>
<revision>
<version>0.7</version>
<date>2005-05-12</date>
<initials>psa</initials>
<remark>Corrected several errors in the text and schemas.</remark>
</revision>
<revision>
<version>0.6</version>
<date>2004-10-26</date>
<initials>psa/jjh</initials>
<remark>Added extended addresses and SHIM headers to examples in order to illustrate the use of XEP-0033 and XEP-0121.</remark>
</revision>
<revision>
<version>0.5</version>
<date>2004-04-05</date>
<initials>psa/jjh</initials>
<remark>Changed &lt;iq/&gt; to &lt;message/&gt; given probability of multiple SIP responses.</remark>
</revision>
<revision>
<version>0.4</version>
<date>2004-03-16</date>
<initials>psa/jjh</initials>
<remark>Specified that the &lt;sdp/&gt; element is in a separate namespace and that the same mechanism could be used for other content schemes in the future.</remark>
</revision>
<revision>
<version>0.3</version>
<date>2004-03-15</date>
<initials>psa/jjh</initials>
<remark>Replaced SDPng with SDP; added sections for Requirements, Protocol, and Discovering Support; added XML schema.</remark>
</revision>
<revision>
<version>0.2</version>
<date>2003-07-29</date>
<initials>psa</initials>
<remark>Converted to XML format.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2003-02-21</date>
<initials>jjh</initials>
<remark>Internet-Draft version published as draft-hildebrand-xmpp-sdpng-00.</remark>
</revision>
</header>
<section1 topic="Introduction" anchor='intro'>
<p><em>Note Well: This proposal has been retracted by the authors in favor of &xep0166;.</em></p>
<p>The Session Description Protocol (SDP; see &rfc2327;) 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 &xmppcore;).
<note>The approach taken herein is to send pure SDP. While earlier versions of this document used &sdpng; (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.</note>
In particular, TINS provides an XMPP representation of standard session management semantics such as those provided by the Session Initiation Protocol (SIP; see &rfc3261;). 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 &rfc3550;) and XMPP services that support TINS can easily interoperate with SIP services through gateways.</p>
</section1>
<section1 topic="Requirements" anchor='reqs'>
<p>This document addresses the following requirements:</p>
<ol>
<li>Enable an XMPP entity to negotiate an out-of-band multimedia session with another XMPP entity.</li>
<li>Enable an XMPP entity to negotiate an out-of-band multimedia session with a non-XMPP entity through a gateway.</li>
<li>Maximize interoperability with existing gateways and devices by using standard Internet protocols.</li>
</ol>
</section1>
<section1 topic="Protocol" anchor='protocol'>
<p>TINS exchanges are completed by sending &MESSAGE; stanzas containing a child &lt;tins/&gt; element qualified by the 'http://jabber.org/protocol/tins' namespace.
<note>While it may seem that the semantics of &IQ; stanzas are more appropriate, <cite>RFC 3261</cite> 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 <cite>RFC 6120</cite>.</note>
In order to track the structure of the TINS "conversation", the &THREAD; child of &MESSAGE; MAY also be included. The &lt;tins/&gt; 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:</p>
<ul>
<li><p>INVITE -- Used to invite the target user to an out-of-band session. The content inside the &lt;tins/&gt; 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.</p></li>
<li><p>ACK -- Used by the initiator to tell the invitee that an out-of-band session has been established.</p></li>
<li><p>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.</p></li>
</ul>
<p>The SDP data itself is included as the XML character data of an &lt;sdp/&gt; child of the &lt;tins/&gt; element, qualifed by the 'urn:ietf:rfc:2327' namespace (this is consistent with &rfc2648;).
<note>The &lt;sdp/&gt; 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.</note>
Any restricted XML characters in the SDP data (i.e., &amp; &apos; &lt; &gt; &quot;) MUST be properly escaped when contained in the XML character data of the &lt;sdp/&gt; element (for example, the ' character MUST be escaped to &amp;apos;). It is the responsibility of the XMPP recipient or translating gateway to unescape these restricted characters for processing.</p>
<p>The request stanza MAY also include either or both of the following:</p>
<ul>
<li>Header information or Internet metadata (such as that defined by <cite>RFC 3261</cite>) in the format specified by &xep0131;.</li>
<li>Multicast addresses as specified by &xep0033;.</li>
</ul>
<p>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 <cite>RFC 3261</cite>.</p>
</section1>
<section1 topic="Discovering Support" anchor='discovery'>
<p>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 &xep0030;, either directly by querying the target entity or indirectly by means of &xep0115;. 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.</p>
<p>If an XMPP entity receives, or a gateway handles, a &MESSAGE; stanza containing a &lt;tins/&gt; 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 &unavailable; error (see &xep0086; for error syntax).</p>
</section1>
<section1 topic="Examples" anchor='examples'>
<section2 topic="Negotiating a Voice Call" anchor='examples-call'>
<p>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.</p>
<example caption='Step 1: A sends an invite to B'><![CDATA[
<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>
<example caption='Step 2: B tells A that it is trying'><![CDATA[
<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>
<example caption='Step 3: B tells A that it is ringing'><![CDATA[
<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>
<example caption='Step 4: B sends an updated description to A'><![CDATA[
<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>
<example caption='Step 5: A sends an acknowledgement to B'><![CDATA[
<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>
<example caption='Step 6: B hangs up'><![CDATA[
<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>
<example caption='Step 7: A acknowledges the hang up'><![CDATA[
<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>
]]></example>
</section2>
<p><em>More examples to follow.</em></p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>TINS is subject to the same security considerations as XMPP, particularly with regard to authentication and channel encryption; for details, refer to <cite>RFC 6120</cite>.</p>
<p>This document does not describe how the media protocols (e.g. RTP) traverse firewalls and NATs.</p>
<p>There is no general-purpose way to ensure that media protocol connections are associated with the in-band TINS conversation.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'http://jabber.org/protocol/tins' in its registry of protocol namespaces.</p>
</section2>
</section1>
<section1 topic='XML Schemas' anchor='schema'>
<section2 topic='tins' anchor='schema-tins'>
<code><![CDATA[
<?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>
]]></code>
</section2>
<section2 topic='sdp' anchor='schema-sdp'>
<code><![CDATA[
<?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>
]]></code>
</section2>
</section1>
</xep>