<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<rfc ipr="full2026" docName="draft-hildebrand-xmpp-sdpng-00">

  <front>
    <title abbrev="TINS">TINS: A Transport for Initiating and Negotiating Sessions using SDPng over XMPP</title>
    <author initials="J." surname="Hildebrand" fullname="Joe Hildebrand">
      <organization>Jabber, Inc.</organization>
      <address>
        <email>jhildebrand@jabber.com</email>
        <uri>http://www.jabber.com/</uri>
      </address>
    </author>
    <date month="February" year="2003" day="21"/>
    <area>Applications</area>
    <keyword>XMPP</keyword>
    <keyword>SDP</keyword>
    <keyword>SDPng</keyword>
    <keyword>SIP</keyword>
    <keyword>XML</keyword>
    <keyword>Extensible Markup Language</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
      <t>This document describes a method of initiating and 
      negotiating media sessions by using SDPng on top of
      the eXtensible Messaging and Presence Protocol (XMPP) 
      as the signalling protocol.</t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction" anchor="intro">
      <t>The MMUSIC WG has defined an XML format for Session
      Description and Capability Negotiation 
      (<xref target="ref-sdpng">SDPng</xref>). Given the 
      availability of a native XML transport in the form
      of the Extensible Messaging and Presence Protocol 
      (<xref target="ref-xmppcore">XMPP</xref>), it may be
      valuable to explore how to build a framework for media
      stream/session initiation and negotiation over XMPP.
      This document explores such a framework, with SDPng over
      XMPP providing a semantics for signalling call setup that
      is similar to the semantics alternatively provided by 
      the Session Initiation Protocol
      (<xref target='ref-sip'>SIP</xref>).</t>

      <section title="Terminology" anchor="intro-terms">
        <t>This document inherits terminology defined in <xref target="ref-sdpng">SDPng</xref> and in <xref target="ref-xmppcore">XMPP Core</xref>.</t>

        <t>The capitalized key words "MUST", "MUST NOT", "REQUIRED",
        "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",
        "MAY", and "OPTIONAL" in this document are to be interpreted
        as described in <xref target="ref-rfc2119">RFC
        2119</xref>.</t>
      </section>

      <section title="Discussion Venue" anchor="intro-discuss">
        <t>The author welcomes discussion and comments related to the
        topics presented in this document. The preferred forum is the
        &lt;xmppwg@jabber.org&gt; mailing list, for which archives and
        subscription information are available at &lt;<eref
        target="http://www.jabber.org/cgi-bin/mailman/listinfo/xmppwg/">http://www.jabber.org/cgi-bin/mailman/listinfo/xmppwg/</eref>&gt;.</t>
      </section>

      <section title="Intellectual Property Notice" anchor="intro-ipr">
        <t>This document is in full compliance with all provisions of
        Section 10 of RFC 2026.</t>
      </section>
    </section>

    <section title="Stanza Flow Overview" anchor="overview">
      <t>The following is an example flow of XMPP stanzas to initiate
      a call.  The from addresses will usually be added by the XMPP
      server, but are shown for clarity.</t>

	  <figure>
		<preamble>Step 1: A sends an invite to B:</preamble>
		<artwork><![CDATA[
<message from='A@example.com/work' to='B@example.com'>
  <thread>1234@hostA.example.com</thread>
  <body>This message contains a TINS invite, 
        but your client does not support TINS.</body>
  <tins method='INVITE'
    xmlns='http://www.jabber.org/protocol/tins'>

    <def xmlns='http://www.iana.org/sdpng'>
      <codec name="audio-basic" encoding="PCMU"
        sampling="8000" channels="1" 
        xmlns='http://www.iana.org/sdpng/audio'/>
      <pt name="rtp-avp-0" pt="0" format="audio-basic"
        xmlns='http://www.iana.org/sdpng/rtp'/>
    </def>

    <cfg xmlns='http://www.iana.org/sdpng'>
      <component name="interactive-audio" media="audio">
        <alt name="AVP-audio-0">
          <session format="rtp-avp-0"
		    xmlns='http://www.iana.org/sdpng/rtp'>
            <udp role="receive" endpoint="A" addr="192.168.1.1"
	            rtp-port="7800"/>
          </session>
        </alt>
      </component>
    </cfg>

    <conf xmlns='http://www.iana.org/sdpng'>
      <owner user="A@example.com" id="98765432" version="1" nettype="IN"
             addrtype="IP4" addr="192.168.1.1"/>
      <session name="SDPng questions"/>

      <info name="interactive-audio" function="voice">
        Telephony media stream
      <info>
    </conf>
  </tins>
</message>
          ]]></artwork>
	  </figure>
	  <figure>
		<preamble>Step 2: B tells A that it is trying:</preamble>
		<artwork><![CDATA[
<message from='B@example.com/laptop' to='A@example.com/work'>
  <thread>1234@hostA.example.com</thread>
  <tins method='result' code='100' reason='Trying'
    xmlns='http://www.jabber.org/protocol/tins'/>
</message>
          ]]></artwork>
	  </figure>
	  <figure>
		<preamble>Step 3: B tells A that it is ringing:</preamble>
		<artwork><![CDATA[
<message from='B@example.com/laptop' to='A@example.com/work'>
  <thread>1234@hostA.example.com</thread>
  <tins method='result' code='180' reason='Ringing'
    xmlns='http://www.jabber.org/protocol/tins'/>
</message>
          ]]></artwork>
	  </figure>
	  <figure>
		<preamble>Step 4: B sends A updated description:</preamble>
		<artwork><![CDATA[
<message from='B@example.com/laptop' to='A@example.com/work'>
  <thread>1234@hostA.example.com</thread>
  <tins method='result' code='200' reason='OK'
    xmlns='http://www.jabber.org/protocol/tins'>

    <def xmlns='http://www.iana.org/sdpng'>
      <codec name="audio-basic" encoding="PCMU"
        sampling="8000" channels="1"
  	    xmlns='http://www.iana.org/sdpng/audio'/>
      <pt name="rtp-avp-0" pt="0" format="audio-basic"
        xmlns='http://www.iana.org/sdpng/rtp'/>
    </def>

    <cfg xmlns='http://www.iana.org/sdpng'>
      <component name="interactive-audio" media="audio">
        <alt name="AVP-audio-0">
          <session format="rtp-avp-0" 
            xmlns='http://www.iana.org/sdpng/rtp'>
            <udp role="receive" endpoint="A" addr="192.168.1.1"
	          rtp-port="7800"/>
            <udp role="receive" endpoint="B" addr="192.168.1.2"
	          rtp-port="9410"/>
          </session>
        </alt>
      </component>
    </cfg>
  </t:tins>
</message>
          ]]></artwork>
	  </figure>
	  <figure>
		<preamble>Step 5: A sends an ACKnowldgement:</preamble>
		<artwork><![CDATA[
<message to='B@example.com/laptop' from='A@example.com/work'>
  <thread>1234@hostA.example.com</thread>
  <tins method='ACK'
    xmlns='http://www.jabber.org/protocol/tins'/>
</message>
          ]]></artwork>
	  </figure>
	  <figure>
		<preamble>Step 6: B hangs up:</preamble>
		<artwork><![CDATA[
<message from='B@example.com/laptop' to='A@example.com/work'>
  <thread>1234@hostA.example.com</thread>
  <tins method='BYE'
    xmlns='http://www.jabber.org/protocol/tins'/>
</message>
          ]]></artwork>
	  </figure>
	  <figure>
		<preamble>Step 7: A acknowledges the hang up:</preamble>
		<artwork><![CDATA[
<message to='B@example.com/laptop' from='A@example.com/work'>
  <thread>1234@hostA.example.com</thread>
  <tins method='result' code='200' reason='OK'
    xmlns='http://www.jabber.org/protocol/tins'/>
</message>
          ]]></artwork>
	  </figure>
    </section>

	<section title="Transactions" anchor="transactions">
	  <t>The &lt;thread/&gt; element from XMPP is used to group TINS
	  messages together into a shared context.  A unique thread value
	  MUST be used for each transaction.  An example of a transaction
	  might be a single voice call.</t>
	</section>

	<section title="TINS Methods" anchor="methods">
	  <t>The following methods can be used in a TINS message.</t>

	  <section title="INVITE" anchor="invite">
		<t>Invite the target user to an out-of-band session.  The
		content inside the &lt;tins/&gt; element MAY be SDPng
		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.</t>
	  </section>

	  <section title="ACK" anchor="ack">
		<t>The initiator tells the invitee that an out-of-band session
		has been established.</t>
	  </section>

	  <section title="BYE" anchor="bye">
		<t>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.</t>
	  </section>
	</section>

    <section title="Results" anchor="results">
      <t>In reply to each of the method messages, the receiver sends 0
      or more replies, with the method set to 'result'.  Result codes
      are as specified in RFC 3261, section 21.</t>
    </section>

    <section title='Security Considerations'>
	  <t>TINS is subject to the same security considerations as XMPP,
	  particularly with regard to authentication and channel
	  encryption.</t>
      <t>This document does not describe how the media protocols
      (e.g. RTP) traverse firewalls and NATs.</t> 
	  <t>There is no general-purpose way to ensure that media protocol
	  connections are associated with the in-band TINS conversation.</t>
    </section>

    <section title='IANA Considerations'>
      <t>None</t>
    </section>

  </middle>

  <back>

    <references>
      <reference anchor="ref-sdpng">
        <front>
          <title>Session Description and Capability Negotiation</title>
          <author initials="J" surname="Ott" fullname="Joerg Ott"><organization /></author>
          <author initials="C" surname="Bormann" fullname="Carsten  Bormann"><organization /></author>
          <author initials="D" surname="Kutscher" fullname="Dirk Kutscher"><organization /></author>
          <date month="July" day="8" year="2002" />
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-mmusic-sdpng-05" />
        <format type="TXT"
                target="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-sdpng-05.txt" />
      </reference>

      <reference anchor='ref-xmppcore'>
        <front>
          <title abbrev="XMPP Core">XMPP Core (draft-ietf-xmpp-core-03, work in progress)</title>
          <author initials='P.' surname='Saint-Andre' fullname='P. Saint-Andre'>
            <organization>Jabber Software Foundation</organization>
          </author>
          <author initials='J.' surname='Miller' fullname='J. Miller'>
            <organization>Jabber Software Foundation</organization>
          </author>
          <date month='February' year='2003'></date>
        </front>
      </reference>

      <reference anchor='ref-sip'>
        <front>
        <title>SIP: Session Initiation Protocol</title>
          <author initials='J.' surname='Rosenberg' fullname='J. Rosenberg'><organization /></author>
          <author initials='H.' surname='Schulzrinne' fullname='H. Schulzrinne'><organization /></author>
          <author initials='G.' surname='Camarillo' fullname='G. Camarillo'><organization /></author>
          <author initials='A.' surname='Johnston' fullname='A. Johnston'><organization /></author>
          <author initials='J.' surname='Peterson' fullname='J. Peterson'><organization /></author>
          <author initials='R.' surname='Sparks' fullname='R. Sparks'><organization /></author>
          <author initials='M.' surname='Handley' fullname='M. Handley'><organization /></author>
          <author initials='E.' surname='Schooler' fullname='E. Schooler'><organization /></author>
        <date month='June' year='2002' /></front>
        <seriesInfo name='RFC' value='3261' />
        <format type='TXT' octets='647976' target='ftp://ftp.isi.edu/in-notes/rfc3261.txt' />
      </reference>

      <reference anchor='ref-rfc2119'>
        <front>
          <title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials='S.' surname='Bradner' fullname='Scott Bradner'>
          <organization>Harvard University</organization>
          <address>
            <postal>
              <street>1350 Mass. Ave.</street>
              <street>Cambridge</street>
              <street>MA 02138</street>
            </postal>
            <phone>- +1 617 495 3864</phone>
            <email>-</email>
          </address>
        </author>
        <date month='March' year='1997'></date>
        <area>General</area>
        <keyword>keyword</keyword>
        <abstract>
          <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized.  This document defines these words as they should be interpreted in IETF documents.  Authors who follow these guidelines should incorporate this phrase near the beginning of their document: 
            <list>
              <t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,  &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in RFC 2119.</t>
            </list>
          </t>
          <t>Note that the force of these words is modified by the requirement level of the document in which they are used.</t>
        </abstract>
      </front>
      <seriesInfo name='BCP' value='14' />
      <seriesInfo name='RFC' value='2119' />
      </reference>

      <reference anchor="ref-iana" target="http://www.iana.org/">
        <front>
          <title abbrev="IANA">Internet Assigned Numbers Authority</title>
          <author>
            <organization>Internet Assigned Numbers Authority</organization>
            <address>
              <email>iana@iana.org</email>
            </address>
          </author>
          <date month="January" year="1998"/>
        </front>
      </reference>
    </references>
  </back>

</rfc>
