source: draft-ietf-stox-chat.xml

Last change on this file was 72, checked in by stpeter@…, 9 years ago

06

  • Property svn:mime-type set to application/xml
File size: 46.4 KB
Line 
1<?xml version="1.0"?>
2<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
3<?rfc compact="yes"?>
4<?rfc sortrefs="yes"?>
5<?rfc strict="yes"?>
6<?rfc symrefs="yes"?>
7<?rfc toc="yes"?>
8<?rfc tocdepth="1"?>
9<rfc category="std" docName="draft-ietf-stox-chat-06" ipr="trust200902">
10
11  <front>
12    <title abbrev="SIP-XMPP Interworking: Chat">Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): One-to-One Text Chat Sessions</title>
13    <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
14      <organization>&amp;yet</organization>
15      <address>
16        <postal>
17          <street>P.O. Box 787</street>
18          <city>Parker</city>
19          <region>CO</region>
20          <code>80134</code>
21          <country>USA</country>
22        </postal>
23        <email>ietf@stpeter.im</email>
24      </address>
25    </author>
26    <author initials="S." surname="Loreto" fullname="Salvatore Loreto">
27      <organization>Ericsson</organization>
28      <address>
29        <postal>
30          <street>Hirsalantie 11</street>
31          <code>02420</code>
32          <city>Jorvas</city>
33          <country>Finland</country>
34         </postal>
35        <email>Salvatore.Loreto@ericsson.com</email>
36      </address>
37    </author>
38    <date/>
39    <area>RAI</area>
40    <keyword>Text Chat</keyword>
41    <keyword>Instant Messaging</keyword>
42    <keyword>Session Initiation Protocol</keyword>
43    <keyword>SIP</keyword>
44    <keyword>Message Sessions Relay Protocol</keyword>
45    <keyword>MSRP</keyword>
46    <keyword>Extensible Messaging and Presence Protocol</keyword>
47    <keyword>XMPP</keyword>
48    <abstract>
49      <t>This document defines a bidirectional protocol mapping for the exchange of instant messages in the context of a one-to-one chat session between a user of the Session Initiation Protocol (SIP) and a user of the Extensible Messaging and Presence Protocol (XMPP).  Specifically for SIP text chat, this document specifies a mapping to the Message Session Relay Protocol (MSRP).</t>
50    </abstract>
51  </front>
52
53  <middle>
54
55    <section title="Introduction" anchor="intro">
56      <t>Both the Session Initiation Protocol (SIP) <xref target="RFC3261"/> and the Extensible Messaging and Presence Protocol (XMPP) <xref target='RFC6120'/> can be used for the purpose of one-to-one text chat over the Internet.  To ensure interworking between these technologies, it is important to define bidirectional protocol mappings.</t>
57      <t>The architectural assumptions underlying such protocol mappings are provided in <xref target='I-D.ietf-stox-core'/>, including mapping of addresses and error conditions.  This document specifies mappings for one-to-one text chat sessions (sometimes called "session-mode" messaging); in particular, this document specifies mappings between XMPP messages of type "chat" and the Message Session Relay Protocol (MSRP) <xref target='RFC4975'/>, which is commonly used in SIP-based systems for chat functionality (although note that MSRP is not conjoined to SIP, and can be used by non-SIP technologies).  Mappings for single instant messages and groupchat are provided in separate documents.</t>
58      <t>The approach taken here is to directly map syntax and semantics from one protocol to another.  The mapping described herein depends on the protocols defined in the following specifications:</t>
59      <t>
60        <list style='symbols'>
61          <t>XMPP chat sessions using message stanzas of type "chat" are specified in <xref target="RFC6121"/>.</t>
62          <t>MSRP chat sessions using the SIP INVITE and SEND request types are specified in <xref target='RFC4975'/>.</t>
63        </list>
64      </t>
65      <t>In SIP-based systems that use MSRP, a chat session is formally negotiated just as any other session type is using SIP.  By contrast, a one-to-one chat "session" in XMPP is an informal construct and is not formally negotiated: a user simply sends a message of type "chat" to a contact, the contact then replies to the message, and the sum total of such messages exchanged during a defined period of time is considered to be a chat session (ideally tied together using an XMPP &lt;thread/&gt; element as described in Section 5.1 of <xref target='RFC6121'/>).  To overcome the disparity between these approaches, a gateway that wishes to map between SIP/MSRP and XMPP for one-to-one chat sessions needs to maintain some additional state, as described below.</t>
66    </section>
67
68    <section title="Intended Audience" anchor="audience">
69      <t>The documents in this series are intended for use by software developers who have an existing system based on one of these technologies (e.g., SIP), and would like to enable communication from that existing system to systems based on the other technology (e.g., XMPP).  We assume that readers are familiar with the core specifications for both SIP <xref target='RFC3261'/> and XMPP <xref target='RFC6120'/>, with the base document for this series <xref target='I-D.ietf-stox-core'/>, and with the following chat-related specifications:</t>
70      <t>
71        <list style='symbols'>
72          <t>The Message Session Relay Protocol (MSRP) <xref target='RFC4975'/></t>
73          <t>Extensible Messaging and Presence Protocol: Instant Messaging and Presence <xref target='RFC6121'/></t>
74          <t>Indication of Message Composition for Instant Messaging <xref target='RFC3994'/></t>
75          <t>Chat State Notifications <xref target='XEP-0085'/></t>
76        </list>
77      </t>
78    </section>
79
80    <section title="Terminology" anchor="terms">
81      <t>A number of terms used here are explained in <xref target='RFC3261'/>, <xref target='RFC4975'/>, <xref target='RFC6120'/>, and <xref target='RFC6121'/>.</t>
82      <t>In flow diagrams, SIP/MSRP traffic is shown using arrows such as "***&gt;" whereas XMPP traffic is shown using arrows such as "...&gt;".</t>
83      <t>The key words "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 <xref target='RFC2119'/>.</t>
84    </section>
85
86    <section title="XMPP to MSRP" anchor="xmpp2msrp">
87      <t>In XMPP, the "informal session" approach is to simply send someone a &lt;message/&gt; of type "chat" without starting any session negotiation ahead of time (as described in <xref target="RFC6121"/>).  The XMPP "informal session" approach maps very well into a SIP MESSAGE request, as described in <xref target="I-D.ietf-stox-core"/>.  However, the XMPP informal session approach can also be mapped to MSRP if the XMPP-to-SIP gateway maintains additional state.</t>
88      <t>The order of events is as follows.</t>
89      <figure>
90        <artwork><![CDATA[
91XMPP       XMPP      XMPP-to-SIP    SIP-to-XMPP     SIP         SIP
92User      Server      Gateway        Gateway       Server       User
93 |           |            |              |            |          |
94 | (F1) XMPP |            |              |            |          |
95 | message   |            |              |            |          |
96 |..........>|            |              |            |          |
97 |           | (F2) XMPP  |              |            |          |
98 |           | message    |              |            |          |
99 |           |...........>|              |            |          |
100 |           |            | (F3) SIP INVITE           |          |
101 |           |            |**************************>|          |
102 |           |            |              |            | (F4) SIP |
103 |           |            |              |            | INVITE   |
104 |           |            |              |            |*********>|
105 |           |            |              |            | (F5) SIP |
106 |           |            |              |            | 200 OK   |
107 |           |            |              |            |<*********|
108 |           |            |              | (F6) SIP   |          |
109 |           |            |              | 200 OK     |          |
110 |           |            |              |<***********|          |
111 |           |            |              | (F7) SIP   |          |
112 |           |            |              | ACK        |          |
113 |           |            |              |***********>|          |
114 |           |            |              | (F8) MSRP  |          |
115 |           |            |              | SEND       |          |
116 |           |            |              |***********>|          |
117 |           |            |              |            | (F9) SIP |
118 |           |            |              |            | ACK      |
119 |           |            |              |            |*********>|
120 |           |            |              |            |(F10) MSRP|
121 |           |            |              |            | SEND     |
122 |           |            |              |            |*********>|
123 .           .            .              .            .          .
124 .           .            .              .            .          .
125 |           |            |              |            |(F11) MSRP|
126 |           |            |              |            | SEND     |
127 |           |            |              |            |<*********|
128 |           |            |              | (F12) MSRP |          |
129 |           |            |              | SEND       |          |
130 |           |            |              |<***********|          |
131 |           | (F13) XMPP message        |            |          |
132 |           |<..........................|            |          |
133 |(F14) XMPP |            |              |            |          |
134 | message   |            |              |            |          |
135 |<..........|            |              |            |          |
136 .           .            .              .            .          .
137 .           .            .              .            .          .
138 |           |            |              |            |(F15) SIP |
139 |           |            |              |            | BYE      |
140 |           |            |              |            |<*********|
141 |           |            |              | (F16) SIP  |          |
142 |           |            |              | BYE        |          |
143 |           |            |              |<***********|          |
144 |           |            |              | (F17) SIP  |          |
145 |           |            |              | 200 OK     |          |
146 |           |            |              |***********>|          |
147 |           |            |              |            |(F18) SIP |
148 |           |            |              |            | 200 OK   |
149 |           |            |              |            |*********>|
150        ]]></artwork>
151      </figure>
152      <t>The mapping of XMPP syntax to SIP syntax SHOULD be as shown in the following table.  (Mappings for several aspects not mentioned here are specified in <xref target='I-D.ietf-stox-im'/>.)</t>
153      <figure>
154        <preamble>Table 1: Message syntax mapping from XMPP to SIP</preamble>
155        <artwork><![CDATA[
156   +-----------------------------+--------------------------+
157   |  XMPP Element or Attribute  |  SIP Header or Contents  |
158   +-----------------------------+--------------------------+
159   |  <thread/>                  |  Call-ID                 |
160   |  id                         |  transaction identifier  |
161   +-----------------------------+--------------------------+
162        ]]></artwork>
163      </figure>
164      <t>First the XMPP user would generate an XMPP chat message.</t>
165      <figure>
166        <preamble>Example 1: Juliet sends XMPP message (F1)</preamble>
167        <artwork><![CDATA[
168| <message from='juliet@example.com/balcony'
169|          to='romeo@example.net'
170|          id='a786hjs2'
171|          type='chat'>
172|   <thread>29377446-0CBB-4296-8958-590D79094C50</thread>
173|   <body>Art thou not Romeo, and a Montague?</body>
174| </message>
175        ]]></artwork>
176      </figure>
177      <t>Upon receiving such a message stanza, the XMPP server needs to determine the identity of the domainpart in the 'to' address, which it does by following the procedures explained in Section 5 of <xref target='I-D.ietf-stox-core'/>.  If the domain is a SIP domain, the XMPP server will hand off the message stanza to an XMPP-to-SIP gateway or connection manager that natively communicates with MSRP-aware SIP servers.</t>
178      <t>The XMPP-to-SIP gateway at the XMPP server would then initiate an MSRP session with Romeo on Juliet's behalf (since there is no reliable way for the gateway to determine if Romeo's client supports MSRP, it simply needs to guess).</t>
179      <figure>
180        <preamble>Example 2: Gateway starts SIP session on behalf of Juliet (F3)</preamble>
181        <artwork><![CDATA[
182| INVITE sip:romeo@example.net SIP/2.0
183| To: <sip:romeo@example.net>
184| From: <sip:juliet@example.com>
185| Contact: <sip:juliet@example.com>;gr=balcony
186| Subject: Open chat with Juliet?
187| Call-ID: 29377446-0CBB-4296-8958-590D79094C50
188| Content-Type: application/sdp
189|
190| c=IN IP4 x2s.example.com
191| m=message 7654 TCP/MSRP *
192| a=accept-types:text/plain
193| a=path:msrp://x2s.example.com:7654/jshA7weztas;tcp
194        ]]></artwork>
195      </figure>
196      <t>Here we assume that Romeo accepts the MSRP session request.</t>
197      <figure>
198        <preamble>Example 3: Romeo accepts session request (F5)</preamble>
199        <artwork><![CDATA[
200| SIP/2.0 200 OK
201| To: <sip:juliet@example.com>
202| From: <sip:romeo@example.net>
203| Contact: <sip:romeo@example.net>;gr=orchard
204| Call-ID: 29377446-0CBB-4296-8958-590D79094C50
205| Content-Type: application/sdp
206|
207| c=IN IP4 s2x.example.net
208| m=message 12763 TCP/MSRP *
209| a=accept-types:text/plain
210| a=path:msrp://s2x.example.net:12763/kjhd37s2s20w2a;tcp
211        ]]></artwork>
212      </figure>
213      <t>The XMPP-to-SIP gateway then acknowledges the session acceptance on behalf of Juliet.</t>
214      <figure>
215        <preamble>Example 4: Gateway sends ACK to Romeo (F7)</preamble>
216        <artwork><![CDATA[
217| ACK sip:juliet@example.com SIP/2.0
218| To: <sip:romeo@example.net>;gr=orchard
219| From: <sip:juliet@example.com>
220| Contact: <sip:juliet@example.com>;gr=balcony
221| Call-ID: 29377446-0CBB-4296-8958-590D79094C50
222        ]]></artwork>
223      </figure>
224      <t>The XMPP-to-SIP gateway then transforms the original XMPP chat message into MSRP.</t>
225      <figure>
226        <preamble>Example 5: Gateway maps XMPP message to MSRP (F8)</preamble>
227        <artwork><![CDATA[
228| MSRP a786hjs2 SEND
229| From-Path: msrp://x2s.example.com:7654/jshA7weztas;tcp
230| To-Path: msrp://s2x.example.net:12763/kjhd37s2s20w2a;tcp
231| Message-ID: 54C6F4F1-A39C-47D6-8718-FA65B3D0414A
232| Byte-Range: 1-25/25
233| Content-Type: text/plain
234|
235| Art thou not Romeo, and a Montague?
236| -------a786hjs2$
237        ]]></artwork>
238      </figure>
239      <t>Romeo can then send a reply using his MSRP client.</t>
240      <figure>
241        <preamble>Example 6: Romeo sends reply (F11)</preamble>
242        <artwork><![CDATA[
243| MSRP di2fs53v SEND
244| To-Path: msrp://x2s.example.com:7654/jshA7weztas;tcp
245| From-Path: msrp://s2x.example.net:12763/kjhd37s2s20w2a;tcp
246| Message-ID: 6480C096-937A-46E7-BF9D-1353706B60AA
247| Byte-Range: 1-25/25
248| Failure-Report: no
249| Content-Type: text/plain
250|
251| Neither, fair saint, if either thee dislike.
252| -------di2fs53v$
253        ]]></artwork>
254      </figure>
255      <t>The SIP-to-XMPP gateway would then transform that message into appropriate XMPP syntax for routing to the intended recipient.</t>
256      <figure>
257        <preamble>Example 7: Gateway maps MSRP message to XMPP (F13)</preamble>
258        <artwork><![CDATA[
259| <message from='romeo@example.net/orchard'
260|          to='juliet@example.com/balcony'
261|          id='di2fs53v'
262|          type='chat'>
263|   <thread>29377446-0CBB-4296-8958-590D79094C50</thread>
264|   <body>Neither, fair saint, if either thee dislike.</body>
265| </message>
266        ]]></artwork>
267      </figure>
268      <t>When the MSRP user wishes to end the chat session, the user's MSRP client sends a SIP BYE.</t>
269      <figure>
270        <preamble>Example 8: Romeo terminates chat session (F15)</preamble>
271        <artwork><![CDATA[
272| BYE juliet@example.com sip: SIP/2.0
273| From: <sip:romeo@example.net>;tag=087js
274| To: <sip:juliet@example.com>;tag=786
275| Call-ID: 29377446-0CBB-4296-8958-590D79094C50
276| Cseq: 1 BYE
277| Content-Length: 0
278        ]]></artwork>
279      </figure>
280      <t>The BYE is then acknowledged by the XMPP-to-SIP gateway.</t>
281      <figure>
282        <preamble>Example 9: Gateway acknowledges termination (F17)</preamble>
283        <artwork><![CDATA[
284| SIP/2.0 200 OK
285| From: <sip:juliet@example.com>;tag=786
286| To: <sip:romeo@example.net>;tag=087js
287| Call-ID: 29377446-0CBB-4296-8958-590D79094C50
288| CSeq: 1 BYE
289| Content-Length: 0
290        ]]></artwork>
291      </figure>
292    </section>
293
294    <section title="MSRP to XMPP" anchor="msrp2xmpp">
295      <t>When an MSRP client sends messages through a gateway to an XMPP client, the order of events is as follows.</t>
296      <figure>
297        <artwork><![CDATA[
298SIP        SIP      SIP-to-XMPP    XMPP-to-SIP      XMPP         XMPP
299User      Server      Gateway        Gateway       Server        User
300 |           |            |              |            |           |
301 | (F19) SIP |            |              |            |           |
302 | INVITE    |            |              |            |           |
303 |**********>|            |              |            |           |
304 |           | (F20) SIP  |              |            |           |
305 |           | INVITE     |              |            |           |
306 |           |***********>|              |            |           |
307 |           | (F21) SIP  |              |            |           |
308 |           | 200 OK     |              |            |           |
309 |           |<***********|              |            |           |
310 | (F22) SIP |            |              |            |           |
311 | 200 OK    |            |              |            |           |
312 |<**********|            |              |            |           |
313 | (F23) SIP |            |              |            |           |
314 | ACK       |            |              |            |           |
315 |**********>|            |              |            |           |
316 | (F24) MSRP|            |              |            |           |
317 | SEND      |            |              |            |           |
318 |**********>|            |              |            |           |
319 |           | (F25) SIP  |              |            |           |
320 |           | ACK        |              |            |           |
321 |           |***********>|              |            |           |
322 |           | (F26) MSRP |              |            |           |
323 |           | SEND       |              |            |           |
324 |           |***********>|              |            |           |
325 |           |            | (F27) XMPP message        |           |
326 |           |            |..........................>|           |
327 |           |            |              |            | (F28) XMPP|
328 |           |            |              |            | message   |
329 |           |            |              |            |..........>|
330 .           .            .              .            .           .
331 .           .            .              .            .           .
332 |           |            |              |            | (F29) XMPP|
333 |           |            |              |            | message   |
334 |           |            |              |            |<..........|
335 |           |            |              | (F30) XMPP |           |
336 |           |            |              | message    |           |
337 |           |            |              |<...........|           |
338 |           | (F31) MSRP SEND           |            |           |
339 |           |<**************************|            |           |
340 | (F32) MSRP|            |              |            |           |
341 | SEND      |            |              |            |           |
342 |<**********|            |              |            |           |
343 .           .            .              .            .           .
344 .           .            .              .            .           .
345 |           |            |              |            |           |
346 |           |            |              |            |           |
347 | (F33) SIP |            |              |            |           |
348 | BYE       |            |              |            |           |
349 |**********>|            |              |            |           |
350 |           | (F34) SIP  |              |            |           |
351 |           | BYE        |              |            |           |
352 |           |***********>|              |            |           |
353 |           | (F35) SIP  |              |            |           |
354 |           | 200 OK     |              |            |           |
355 |           |<***********|              |            |           |
356 | (F36) SIP |            |              |            |           |
357 | 200 OK    |            |              |            |           |
358 |<**********|            |              |            |           |
359        ]]></artwork>
360      </figure>
361      <t>The mapping of SIP syntax to XMPP syntax SHOULD be as shown in the following table.  (Mappings for several aspects not mentioned here are specified in <xref target='I-D.ietf-stox-im'/>.)</t>
362      <figure>
363        <preamble>Table 2: Message syntax mapping from SIP to XMPP</preamble>
364        <artwork><![CDATA[
365   +--------------------------+-----------------------------+
366   |  SIP Header or Contents  |  XMPP Element or Attribute  |
367   +--------------------------+-----------------------------+
368   |  Call-ID                 |  <thread/>                  |
369   |  transaction identifier  |  id                         |
370   +--------------------------+-----------------------------+
371        ]]></artwork>
372      </figure>
373      <t>The protocol flow begins when Romeo starts a chat session with Juliet.</t>
374      <figure>
375        <preamble>Example 10: Romeo starts chat session (F19)</preamble>
376        <artwork><![CDATA[
377| INVITE sip:juliet@example.com SIP/2.0
378| To: <sip:juliet@example.com>
379| From: <sip:romeo@example.net>
380| Contact: <sip:romeo@example.net>;gr=orchard
381| Subject: Open chat with Romeo?
382| Call-ID: F6989A8C-DE8A-4E21-8E07-F0898304796F
383| Content-Type: application/sdp
384|
385| c=IN IP4 s2x.example.net
386| m=message 7313 TCP/MSRP *
387| a=accept-types:text/plain
388| a=path:msrp://s2x.example.net:7313/ansp71weztas;tcp
389        ]]></artwork>
390      </figure>
391      <t>Upon receiving the INVITE, the SIP (MSRP) server needs to determine the identity of the domain portion of the Request-URI or To header, which it does by following the procedures explained in Section 5 of <xref target='I-D.ietf-stox-core'/>.  If the domain is an XMPP domain, the SIP server will hand off the INVITE to an associated SIP-XMPP gateway or connection manager that natively communicates with XMPP servers.</t>
392      <figure>
393        <preamble>Example 11: Gateway accepts session on Juliet's behalf (F21)</preamble>
394          <artwork><![CDATA[
395| SIP/2.0 200 OK
396| To: <sip:romeo@example.net>;gr=orchard
397| From: <sip:juliet@example.com>
398| Contact: <sip:juliet@example.com>;gr=balcony
399| Call-ID: F6989A8C-DE8A-4E21-8E07-F0898304796F
400| Content-Type: application/sdp
401|
402| c=IN IP4 x2s.example.com
403| m=message 8763 TCP/MSRP *
404| a=accept-types:text/plain
405| a=path:msrp://x2s.example.com:8763/lkjh37s2s20w2a;tcp
406          ]]></artwork>
407        </figure>
408        <figure>
409          <preamble>Example 12: Romeo sends ACK (F23)</preamble>
410          <artwork><![CDATA[
411| ACK sip:juliet@example.com SIP/2.0
412| To: <sip:juliet@example.com>;gr=balcony
413| From: <sip:romeo@example.net>
414| Contact: <sip:romeo@example.net>;gr=orchard
415| Call-ID: F6989A8C-DE8A-4E21-8E07-F0898304796F
416          ]]></artwork>
417        </figure>
418        <figure>
419          <preamble>Example 13: Romeo sends message (F24)</preamble>
420          <artwork><![CDATA[
421| MSRP ad49kswow SEND
422| To-Path: msrp://x2s.example.com:8763/lkjh37s2s20w2a;tcp
423| From-Path: msrp://s2x.example.net:7313/ansp71weztas;tcp
424| Message-ID: 676FDB92-7852-443A-8005-2A1B9FE44F4E
425| Byte-Range: 1-32/32
426| Failure-Report: no
427| Content-Type: text/plain
428|
429| I take thee at thy word ...
430| -------ad49kswow$
431          ]]></artwork>
432        </figure>
433        <figure>
434          <preamble>Example 14: SIP-XMPP gateway maps MSRP message to XMPP (F27)</preamble>
435          <artwork><![CDATA[
436| <message from='romeo@example.net'
437|          to='juliet@example.com'
438|          id='ad49kswow'
439|          type='chat'>
440|   <thread>F6989A8C-DE8A-4E21-8E07-F0898304796F</thread>
441|   <body>I take thee at thy word ...</body>
442| </message>
443          ]]></artwork>
444        </figure>
445        <figure>
446          <preamble>Example 15: Juliet sends reply (F29)</preamble>
447          <artwork><![CDATA[
448| <message from='juliet@example.com'
449|          to='romeo@example.net'
450|          id='ms53b7z9'
451|          type='chat'>
452|   <thread>29377446-0CBB-4296-8958-590D79094C50</thread>
453|   <body>What man art thou ...?</body>
454| </message>
455          ]]></artwork>
456        </figure>
457        <figure>
458          <preamble>Example 16: Gateway maps XMPP message to MSRP (F31)</preamble>
459          <artwork><![CDATA[
460| MSRP ms53b7z9 SEND
461| To-Path: msrp://s2x.example.net:7313/jshA7weztas;tcp
462| From-Path: msrp://x2s.example.com:8763/lkjh37s2s20w2a;tcp
463| Message-ID: 17EBA17B-94C0-463B-AD84-DE405C4C9D41
464| Byte-Range: 1-25/25
465| Failure-Report: no
466| Content-Type: text/plain
467|
468| What man art thou ...?
469| -------ms53b7z9$
470          ]]></artwork>
471        </figure>
472        <figure>
473          <preamble>Example 17: Romeo terminates chat session (F33)</preamble>
474          <artwork><![CDATA[
475| BYE juliet@example.com sip: SIP/2.0
476| To: <sip:juliet@example.com>;gr=balcony
477| From: <sip:romeo@example.net>
478| Contact: <sip:romeo@example.net>;gr=orchard
479| Call-ID: F6989A8C-DE8A-4E21-8E07-F0898304796F
480| Cseq: 1 BYE
481| Content-Length: 0
482          ]]></artwork>
483        </figure>
484        <figure>
485          <preamble>Example 18: Gateway acknowledges termination of session on behalf of Juliet (F35)</preamble>
486          <artwork><![CDATA[
487| SIP/2.0 200 OK
488| To: <sip:juliet@example.com>;gr=balcony
489| From: <sip:romeo@example.net>
490| Contact: <sip:romeo@example.net>;gr=orchard
491| Call-ID: F6989A8C-DE8A-4E21-8E07-F0898304796F
492| CSeq: 1 BYE
493          ]]></artwork>
494        </figure>
495    </section>
496
497    <section title="Composing Events" anchor="composing">
498      <t>Both XMPP and MSRP enable a client to receive notifications when a person's conversation partner is composing an instant message within the context of a chat session.</t>
499      <t>For XMPP, the Chat State Notifications specification <xref target='XEP-0085'/> defines five states: active, inactive, gone, composing, and paused. Some of these states are related to the act of message composition (composing, paused), whereas others are related to the sender's involvement with the chat session (active, inactive, gone).</t>
500      <t>For MSRP (and SIP/SIMPLE in general), the Indication of Message Composition for Instant Messaging specification <xref target='RFC3994'/> defines two states: idle and active.  Here the idle state indicates that the sender is not actively composing a message, and the active state indicates that the sender is indeed actively composing a message (the sending client simply toggles between the two states, changing to active if the user is actively composing a message and changing to idle if the user is no longer actively composing a message).</t>
501      <t>Because the XEP-0085 states can represent information that is not captured in RFC 3994, gateways can either (a) map only the composing-related states or (b) map all the XEP-0085 states.</t>
502      <t>The following mappings are suggested.</t>
503      <figure>
504        <preamble>Table 3: Mapping of SIP/SIMPLE isComposing events to XMPP chat states</preamble>
505        <artwork><![CDATA[
506+-------------------+--------------------+
507| isComposing Event |  Chat State        |
508+-------------------+--------------------+
509| active            |  composing         |
510| idle              |  active            |
511+-------------------+--------------------+
512        ]]></artwork>
513      </figure>
514      <figure>
515        <preamble>Table 4: Mapping of XMPP chat states to SIP/SIMPLE isComposing events</preamble>
516        <artwork><![CDATA[
517+-------------------+--------------------+
518| Chat State        | isComposing Event  |
519+-------------------+--------------------+
520| active            |  idle              |
521| inactive          |  idle              |
522| gone              |  [none, see note]  |
523| composing         |  active            |
524| paused            |  idle              |
525+-------------------+--------------------+
526        ]]></artwork>
527      </figure>
528      <t>Although there is no direct mapping for the "gone" chat state (which is not to be confused with the &lt;gone/&gt; stanza error condition defined in <xref target='RFC6120'/>) to an isComposing event, receipt of the "gone" state can be used as a trigger for terminating the formal chat session within MSRP, i.e., for sending a SIP BYE for the session from the XMPP-SIP gateway to the SIP user.  The following examples illustrate this indirect mapping.</t>
529      <figure>
530        <preamble>Example 19: Juliet sends gone chat state</preamble>
531        <artwork><![CDATA[
532| <message from='juliet@example.com'
533|          id='nx62f197'
534|          to='romeo@example.net'
535|          type='chat'>
536|   <thread>29377446-0CBB-4296-8958-590D79094C50</thread>
537|   <gone xmlns='http://jabber.org/protocol/chatstates'/>
538| </message>
539        ]]></artwork>
540      </figure>
541      <figure>
542        <preamble>Example 20: XMPP-SIP gateway maps gone chat state to SIP BYE</preamble>
543        <artwork><![CDATA[
544| BYE romeo@example.net sip: SIP/2.0
545| From: <sip:juliet@example.com>;tag=786
546| To: <sip:romeo@example.net>;tag=087js
547| Call-ID: 29377446-0CBB-4296-8958-590D79094C50
548| Cseq: 1 BYE
549| Content-Length: 0
550        ]]></artwork>
551      </figure>
552    </section>
553
554    <section title="Delivery Reports" anchor="delivery">
555      <t>Both XMPP and MSRP enable a client to receive notifications when a message has been received by the intended recipient.</t>
556      <t>For XMPP, the Message Receipts specification <xref target='XEP-0184'/> defines a method and XML namespace for requesting and returning indications that a message has been received by a client controlled by the intended recipient.</t>
557      <t>For MSRP, a native reporting feature is included, in the form of REPORT chunks (see Sections 7.1.2 and 7.1.3 of <xref target='RFC4975'/>).</t>
558      <t>Examples follow.</t>
559      <t>First, the XMPP user sends a message containing a request for delivery notification.</t>
560      <figure>
561        <preamble>Example 21: Juliet sends XMPP message with receipt request</preamble>
562        <artwork><![CDATA[
563| <message from='juliet@example.com'
564|          id='bf9m36d5'
565|          to='romeo@example.net'
566|          type='chat'>
567|   <thread>29377446-0CBB-4296-8958-590D79094C50</thread>
568|   <body>What man art thou ...?</body>
569|   <request xmlns='urn:xmpp:receipts'/>
570| </message>
571        ]]></artwork>
572      </figure>
573      <figure>
574        <preamble>Example 22: Gateway maps XMPP message to MSRP</preamble>
575        <artwork><![CDATA[
576| MSRP bf9m36d5 SEND
577| To-Path: msrp://s2x.example.net:7313/jshA7weztas;tcp
578| From-Path: msrp://x2s.example.com:8763/lkjh37s2s20w2a;tcp
579| Message-ID: 6187CF9B-317A-41DA-BB6A-5E48A9C794EF
580| Byte-Range: 1-25/25
581| Success-Report: yes
582| Failure-Report: no
583| Content-Type: text/plain
584|
585| What man art thou ...?
586| -------bf9m36d5$
587        ]]></artwork>
588      </figure>
589      <t>Next, the recipient returns a report.</t>
590      <figure>
591        <preamble>Example 23: Romeo returns MSRP receipt</preamble>
592        <artwork><![CDATA[
593| MSRP hx74g336 REPORT
594| To-Path: msrp://x2s.example.com:8763/lkjh37s2s20w2a;tcp
595| From-Path: msrp://s2x.example.net:7313/jshA7weztas;tcp
596| Message-ID: 6187CF9B-317A-41DA-BB6A-5E48A9C794EF
597| Byte-Range: 1-106/106
598| Status: 000 200 OK
599| -------hx74g336$
600        ]]></artwork>
601      </figure>
602      <figure>
603        <preamble>Example 24: SIP-XMPP gateway maps receipt to XMPP</preamble>
604        <artwork><![CDATA[
605| <message from='romeo@example.net'
606|          id='hx74g336'
607|          to='juliet@example.com'>
608|   <received xmlns='urn:xmpp:receipts' id='87652491'/>
609| </message>
610
611        ]]></artwork>
612      </figure>
613    </section>
614
615    <section title="Internationalization Considerations" anchor="i18n">
616      <t>Relevant discussion of internationalized text in messages can be found in <xref target='I-D.ietf-stox-im'/>.</t>
617    </section>
618
619    <section title="IANA Considerations" anchor="iana">
620      <t>This document requests no actions of IANA.</t>
621    </section>
622
623    <section title="Security Considerations" anchor="security">
624      <t>Detailed security considerations for instant messaging protocols are given in <xref target='RFC2779'/>, for MSRP chat in <xref target="RFC4975"/> (see also <xref target='RFC3261'/> when SIP is used to negotiate MSRP sessions), and for XMPP-based instant messaging in <xref target="RFC6121"/> (see also <xref target="RFC6120"/>).  The security considerations provided in <xref target='I-D.ietf-stox-core'/> also apply.</t>
625      <t>This document specifies methods for exchanging instant messages through a gateway that translates between SIP/MSRP and XMPP.  Such a gateway MUST be compliant with the minimum security requirements of the textual chat protocols for which it translates (i.e., MSRP and XMPP).  The addition of gateways to the security model of instant messaging specified in <xref target="RFC2779"/> introduces some new risks.  In particular, end-to-end security properties (especially confidentiality and integrity) between instant messaging clients that interface through an MSRP-XMPP gateway can be provided only if common formats are supported.  Specification of those common formats is out of scope for this document, although it is suggested to use <xref target="RFC3862"/> for instant messages.</t>
626    </section>
627
628  </middle>
629  <back>
630    <references title="Normative References">
631
632<reference anchor='I-D.ietf-stox-core'>
633<front>
634<title>Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Core</title>
635<author initials='P' surname='Saint-Andre' fullname='Peter Saint-Andre'>
636    <organization />
637</author>
638<author initials='A' surname='Houri' fullname='Avshalom Houri'>
639    <organization />
640</author>
641<author initials='J' surname='Hildebrand' fullname='Joe Hildebrand'>
642    <organization />
643</author>
644<date month='February' day='11' year='2014' />
645<abstract><t>As a foundation for the definition of application-specific, bi-directional protocol mappings between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP), this document specifies the architectural assumptions underlying such mappings as well as the mapping of addresses and error conditions.</t></abstract>
646</front>
647<seriesInfo name='Internet-Draft' value='draft-ietf-stox-core-11' />
648<format type='TXT'
649        target='http://www.ietf.org/internet-drafts/draft-ietf-stox-core-11.txt' />
650</reference>
651
652
653<reference anchor='RFC2119'>
654<front>
655<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
656<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
657<organization>Harvard University</organization>
658<address>
659<postal>
660<street>1350 Mass.  Ave.</street>
661<street>Cambridge</street>
662<street>MA 02138</street></postal>
663<phone>- +1 617 495 3864</phone>
664<email>sob@harvard.edu</email></address></author>
665<date year='1997' month='March' />
666<area>General</area>
667<keyword>keyword</keyword>
668<abstract>
669<t>
670   In many standards track documents several words are used to signify
671   the requirements in the specification.  These words are often
672   capitalized.  This document defines these words as they should be
673   interpreted in IETF documents.  Authors who follow these guidelines
674   should incorporate this phrase near the beginning of their document:
675
676<list>
677<t>
678      The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
679      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
680      "OPTIONAL" in this document are to be interpreted as described in
681      RFC 2119.
682</t></list></t>
683<t>
684   Note that the force of these words is modified by the requirement
685   level of the document in which they are used.
686</t></abstract></front>
687<seriesInfo name='BCP' value='14' />
688<seriesInfo name='RFC' value='2119' />
689<format type='TXT' octets='4723' target='ftp://ftp.isi.edu/in-notes/rfc2119.txt' />
690<format type='HTML' octets='17491' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
691<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
692</reference>
693
694<reference anchor='RFC3261'>
695<front>
696<title>SIP: Session Initiation Protocol</title>
697<author initials='J.' surname='Rosenberg' fullname='J.  Rosenberg'>
698<organization /></author>
699<author initials='H.' surname='Schulzrinne' fullname='H.  Schulzrinne'>
700<organization /></author>
701<author initials='G.' surname='Camarillo' fullname='G.  Camarillo'>
702<organization /></author>
703<author initials='A.' surname='Johnston' fullname='A.  Johnston'>
704<organization /></author>
705<author initials='J.' surname='Peterson' fullname='J.  Peterson'>
706<organization /></author>
707<author initials='R.' surname='Sparks' fullname='R.  Sparks'>
708<organization /></author>
709<author initials='M.' surname='Handley' fullname='M.  Handley'>
710<organization /></author>
711<author initials='E.' surname='Schooler' fullname='E.  Schooler'>
712<organization /></author>
713<date year='2002' month='June' />
714<abstract>
715<t>This document describes Session Initiation Protocol (SIP), an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants.  These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences.  [STANDARDS TRACK] </t></abstract></front>
716<seriesInfo name='RFC' value='3261' />
717<format type='TXT' octets='647976' target='ftp://ftp.isi.edu/in-notes/rfc3261.txt' />
718</reference>
719
720<reference anchor="RFC3862">
721<front>
722<title>Common Presence and Instant Messaging (CPIM): Message Format</title>
723<author initials='G.' surname='Klyne' fullname='G. Klyne'>
724<organization /></author>
725<author initials='D.' surname='Atkins' fullname='D. Atkins'>
726<organization /></author>
727<date year='2004' month='August' /></front>
728<seriesInfo name='RFC' value='3862' />
729<format type='TXT' octets='56133' target='ftp://ftp.isi.edu/in-notes/rfc3862.txt' />
730</reference>
731
732<reference anchor='RFC3994'>
733<front>
734<title>Indication of Message Composition for Instant Messaging</title>
735<author initials='H.' surname='Schulzrinne' fullname='H. Schulzrinne'>
736<organization /></author>
737<date year='2005' month='January' />
738<abstract>
739<t>In instant messaging (IM) systems, it is useful to know during an IM conversation whether the other party is composing a message; e.g., typing or recording an audio message.  This document defines a new status message content type and XML namespace that conveys information about a message being composed.  The status message can indicate the composition of a message of any type, including text, voice, or video.  The status messages are delivered to the instant messaging recipient in the same manner as the instant messages themselves. [STANDARDS-TRACK]</t></abstract></front>
740<seriesInfo name='RFC' value='3994' />
741<format type='TXT' octets='27472' target='http://www.rfc-editor.org/rfc/rfc3994.txt' />
742</reference>
743
744<reference anchor='RFC4975'>
745<front>
746<title>The Message Session Relay Protocol (MSRP)</title>
747<author initials='B.' surname='Campbell' fullname='B.  Campbell'>
748<organization /></author>
749<author initials='R.' surname='Mahy' fullname='R.  Mahy'>
750<organization /></author>
751<author initials='C.' surname='Jennings' fullname='C.  Jennings'>
752<organization /></author>
753<date year='2007' month='September' />
754<abstract>
755<t>This document describes the Message Session Relay Protocol, a protocol for transmitting a series of related instant messages in the context of a session.  Message sessions are treated like any other media stream when set up via a rendezvous or session creation protocol such as the Session Initiation Protocol.  [STANDARDS TRACK]</t></abstract></front>
756<seriesInfo name='RFC' value='4975' />
757<format type='TXT' octets='144254' target='ftp://ftp.isi.edu/in-notes/rfc4975.txt' />
758</reference>
759
760<reference anchor='RFC6120'>
761<front>
762<title>Extensible Messaging and Presence Protocol (XMPP): Core</title>
763<author initials='P.' surname='Saint-Andre' fullname='P. Saint-Andre'>
764<organization /></author>
765<date year='2011' month='March' />
766<abstract>
767<t>The Extensible Messaging and Presence Protocol (XMPP) is an application profile of the Extensible Markup Language (XML) that enables the near-real-time exchange of structured yet extensible data between any two or more network entities.  This document defines XMPP's core protocol methods: setup and teardown of XML streams, channel encryption, authentication, error handling, and communication primitives for messaging, network availability ("presence"), and request-response interactions.  This document obsoletes RFC 3920. [STANDARDS-TRACK]</t></abstract></front>
768<seriesInfo name='RFC' value='6120' />
769<format type='TXT' octets='451942' target='http://www.rfc-editor.org/rfc/rfc6120.txt' />
770</reference>
771
772<reference anchor='RFC6121'>
773<front>
774<title>Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence</title>
775<author initials='P.' surname='Saint-Andre' fullname='P. Saint-Andre'>
776<organization /></author>
777<date year='2011' month='March' />
778<abstract>
779<t>This document defines extensions to core features of the Extensible Messaging and Presence Protocol (XMPP) that provide basic instant messaging (IM) and presence functionality in conformance with the requirements in RFC 2779.  This document obsoletes RFC 3921. [STANDARDS-TRACK]</t></abstract></front>
780<seriesInfo name='RFC' value='6121' />
781<format type='TXT' octets='244800' target='http://www.rfc-editor.org/rfc/rfc6121.txt' />
782</reference>
783
784<reference anchor="XEP-0085">
785  <front>
786    <title>Chat State Notifications</title>
787    <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
788      <organization/>
789      <address>
790        <email>stpeter@jabber.org</email>
791      </address>
792    </author>
793    <author initials="D." surname="Smith" fullname="Dave Smith">
794      <organization/>
795      <address>
796        <email>dizzyd@jabber.org</email>
797      </address>
798    </author>
799    <date day="23" month="September" year="2009"/>
800  </front>
801  <seriesInfo name="XSF XEP" value="0085"/>
802  <format type="HTML" target="http://xmpp.org/extensions/xep-0085.html"/>
803</reference>
804
805<reference anchor="XEP-0184">
806  <front>
807    <title>Message Delivery Receipts</title>
808    <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
809      <organization/>
810      <address>
811        <email>stpeter@jabber.org</email>
812      </address>
813    </author>
814    <author initials="J." surname="Hildebrand" fullname="Joe Hildebrand">
815      <organization/>
816      <address>
817        <email>jhildebr@cisco.com</email>
818      </address>
819    </author>
820    <date day="01" month="March" year="2011"/>
821  </front>
822  <seriesInfo name="XSF XEP" value="0184"/>
823  <format type="HTML" target="http://xmpp.org/extensions/xep-0184.html"/>
824</reference>
825
826    </references>
827
828    <references title='Informative References'>
829
830<reference anchor='I-D.ietf-stox-im'>
831<front>
832<title>Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Instant Messaging</title>
833<author initials='P' surname='Saint-Andre' fullname='Peter Saint-Andre'>
834    <organization />
835</author>
836<author initials='A' surname='Houri' fullname='Avshalom Houri'>
837    <organization />
838</author>
839<author initials='J' surname='Hildebrand' fullname='Joe Hildebrand'>
840    <organization />
841</author>
842<date month='March' day='11' year='2014' />
843<abstract><t>This document defines a bidirectional protocol mapping for the exchange of single instant messages between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP).</t></abstract>
844</front>
845<seriesInfo name='Internet-Draft' value='draft-ietf-stox-im-08' />
846<format type='TXT'
847        target='http://www.ietf.org/internet-drafts/draft-ietf-stox-im-08.txt' />
848</reference>
849
850<reference anchor="RFC2779">
851<front>
852<title abbrev='Instant Messaging/Presence Protocol'>Instant Messaging / Presence Protocol Requirements</title>
853<author initials='M.' surname='Day' fullname='Mark Day'>
854<organization>SightPath, Inc.</organization>
855<address>
856<postal>
857<street>135 Beaver Street</street>
858<city>Waltham</city>
859<region>MA</region>
860<code>02452</code>
861<country>US</country></postal>
862<email>mday@alum.mit.edu</email></address></author>
863<author initials='S.' surname='Aggarwal' fullname='Sonu Aggarwal'>
864<organization>Microsoft Corporation</organization>
865<address>
866<postal>
867<street>One Microsoft Way</street>
868<city>Redmond</city>
869<region>WA</region>
870<code>98052</code>
871<country>US</country></postal>
872<email>sonuag@microsoft.com</email></address></author>
873<author initials='J.' surname='Vincent' fullname='Jesse Vincent'>
874<organization>Into Networks, Inc.</organization>
875<address>
876<postal>
877<street>150 Cambridgepark Drive</street>
878<city>Cambridge</city>
879<region>MA</region>
880<code>02140</code>
881<country>US</country></postal>
882<email>jesse@intonet.com</email></address></author>
883<date month='February' year='2000' />
884<abstract>
885<t>Presence and Instant Messaging have recently emerged as a new medium of communications over the Internet.  Presence is a means for finding, retrieving, and subscribing to changes in the presence information (e.g.  "online" or "offline") of other users.  Instant messaging is a means for sending small, simple messages that are delivered immediately to online users.</t>
886<t>Applications of presence and instant messaging currently use independent, non-standard and non-interoperable protocols developed by various vendors.  The goal of the Instant Messaging and Presence Protocol (IMPP) Working Group is to define a standard protocol so that independently developed applications of instant messaging and/or   presence can interoperate across the Internet.  This document defines a minimal set of requirements that IMPP must meet.</t></abstract></front>
887<seriesInfo name='RFC' value='2779' />
888<format type='TXT' octets='47420' target='ftp://ftp.isi.edu/in-notes/rfc2779.txt' />
889</reference>
890
891    </references>
892
893    <section title="Acknowledgements" anchor="acks">
894      <t>Special thanks to Eddy Gavita and Nazin Hossain for co-authoring an early version of this document.</t>
895      <t>Thanks to Mary Barnes, Dave Crocker, Adrian Georgescu, Philipp Hancke, Saul Ibarra Corretge, and Tory Patnoe for their feedback.</t>
896      <t>The authors gratefully acknowledge the assistance of Markus Isomaki and Yana Stamcheva as the working group chairs and Gonzalo Camarillo and Alissa Cooper as the sponsoring Area Directors.</t>
897      <t>Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for employing him during his work on earlier versions of this document.</t>
898    </section>
899
900  </back>
901</rfc>
Note: See TracBrowser for help on using the repository browser.