diff --git a/xep-0301.xml b/xep-0301.xml
index 78939b4e..d5746e43 100644
--- a/xep-0301.xml
+++ b/xep-0301.xml
@@ -29,9 +29,15 @@
Spelling, grammar, and clarification edits, including section clarifications recommended from public discussion. Interop with XEP-0308 message correction. Edits recommended from public discussion. Real-time text is text transmitted instantly while it is being typed or created. The recipient can immediately read the sender's text as it is written, without waiting. Text can be used conversationally, similar to a telephone conversation, where one listens while the other is speaking. It eliminates waiting times found in messaging, and is favored by deaf and hard of hearing individuals who prefer text conversation. For a visual animation of real-time text, see RealJabber.org
-
Real-time text has been around for decades in various implementations:
Real-time text is suitable for smooth and rapid mainstream communication in text, as an all-inclusive technology to complement instant messaging. At the same time, real-time text has special usefulness to many audiences including the deaf, hard of hearing, and other people who cannot use speech on the telephone. Real-time text is also beneficial in emergency situations, due to its immediacy. This document defines a specification for real-time text transmitted in-band over an XMPP network.
+Real-time text is suitable for smooth and rapid mainstream communication in text, as an all-inclusive technology to complement instant messaging. It can also allow immediate conversation in situations where speech cannot be used (e.g. quiet environments, privacy, deaf and hard of hearing). Real-time text is also beneficial in emergency situations, due to its immediacy. This document defines a specification for real-time text transmitted in-band over an XMPP network.
real-time – A conversational latency of less than 1 second, as defined by ITU-T Rec. F.700
real-time text – Text transmitted in real-time while it is being typed or created.
real-time message – Recipient's real-time view of the sender's message still being typed or created.
-real-time message edit – An edit operation done by the remote sender, that is transmitted in real-time to the recipient.
action element – An XML element that represents a single real-time message edit, such as text insertion or deletion.
RTT – Acronym for real-time text.
Real-time text is transmitted via an <rtt/> child element of a <message/> stanza. The <rtt/> element is transmitted at regular intervals by the sender while a message is being composed, to allow the recipient to see the sender type (and edit) the message before the full message is sent in a <body/> element.
-This is a basic example of a real-time message "Hello, my Juliet!", transmitted live while it is being typed, before a final message delivery:
+Real-time text is transmitted via an <rtt/> child element of a <message/> stanza. The <rtt/> element is transmitted at regular intervals by the sender client while a message is being composed, to allow the recipient to see the sender type the message, without waiting for the full message sent in a <body/> element.
+This is a basic example of a real-time message "Hello, my Juliet!” transmitted live while it is being typed, before a final message delivery in a <body/> element (to remain Backwards Compatible):
Example 1: Introductory Example
The <rtt/> element contains a series of one or more child elements called action elements that represent real-time message edits such as text being appended, inserted, or deleted. Example 1 illustrates only the <t/> action element, which appends text to the end of a message. See Real-Time Text Operations.
-Transmission of the <rtt/> element occurs at regular intervals whenever the sender is actively composing a message. If there are no changes to the message since the last transmission, no transmission occurs. See Transmission Interval.
-The namespace of the <rtt/> element is “urn:xmpp:rtt:0”. There MUST NOT be more than one <rtt/> element per <message/> stanza.
+The <rtt/> element contains a series of one or more child elements called action elements that represent Real-Time Text Actions such as text being appended, inserted, or deleted. Example 1 illustrates only the <t/> action element, which appends text to the end of a message.
+Transmission of the <rtt/> element occurs at a regular Transmission Interval whenever the sender is actively composing a message. If there are no changes to the message since the last transmission, no transmission occurs.
+There MUST NOT be more than one <rtt/> element per <message/> stanza.
+The namespace of the <rtt/> element is “urn:xmpp:rtt:0”.
This REQUIRED attribute is a counter to maintain the integrity of real-time text. (The bounds of seq is 31-bits, the range of positive values of a signed integer.)
-Senders MUST increment the seq attribute by 1 in each subsequent <rtt/> transmitted without an event attribute. When an <rtt/> element has an event attribute, senders MAY instead use any value as the new starting value for seq. A random starting seq value is RECOMMENDED for best integrity during Usage With Multi-User Chat and Simultaneous Logins. Senders MAY limit the size of the new starting seq value, to keep <rtt/> compact, and allow plenty of incrementing room without overflow.
+Senders MUST increment the seq attribute by 1 in each subsequent <rtt/> transmitted without an event attribute. When an <rtt/> element has an event attribute, senders MAY instead use any value as the new starting value for seq. A random starting seq value is RECOMMENDED for best integrity during Usage with Multi-User Chat and Simultaneous Logins. Senders MAY limit the size of the new starting seq value, to keep <rtt/> compact while allowing plenty of incrementing room without overflow.
Recipients MUST monitor the seq value to verify the integrity of real-time text. See Keeping Real-Time Text Synchronized.
event='cancel'
Clients MAY use this value to signal the other end to stop transmitting real-time text. If used, this <rtt/> element MUST be empty with no action elements. Recipients SHOULD discontinue sending back <rtt/> elements for the remainder of the same chat session (or unless 'init' is used again). See Activating and Deactivating Real-Time Text.
This OPTIONAL attribute is used only if &xep0308; (XEP-0308) is implemented. Sender clients MAY use this attribute to allow recipient clients to have improved presentation of real-time text during message correction (e.g. shown as in-place editing of previous message).
+This id attribute refers to the <message/> stanza containing the <body/> that is being edited (See 'Business Rules' in XEP-0308). If used at all, then id MUST be included in all <rtt/> elements transmitted during message correction of the previous message. When switching messages being edited (i.e. editing the current message versus editing the previous message), the first <rtt/> element MUST contain an event attribute value, such as 'reset' (See Message Reset).
+The real-time message is considered complete upon receipt of a <body/> element in a message stanza. The delivered message is displayed instead of the real-time message. In the ideal case, the message from <body/> is redundant since this delivered message is identical to the final contents of the real-time message.
+The real-time message is considered complete upon receipt of a <body/> element in a message stanza. The delivered message in the <body/> element is displayed instead of the real-time message. In the ideal case, the message from <body/> is redundant since this delivered message is identical to the final contents of the real-time message.
Senders MUST include an event attribute in the next <rtt/> element that is transmitted after a message stanza containing a <body/> element.
The real-time text standard simply provides early delivery of text before the <body/> element. The <body/> element continues to follow the &xmppcore; specification. In particular, XMPP implementations need to ignore XML elements they do not understand. Clients that do not support real-time text, will continue to behave normally, displaying complete lines of messages as they are delivered.
+The real-time text standard simply provides early delivery of text before the <body/> element. The <body/> element continues to follow the &xmppcore; specification. In particular, XMPP implementations need to ignore XML elements they do not understand. Clients, that do not support real-time text, will continue to behave normally, displaying complete lines of messages as they are delivered.
For the best balance between interoperability and usability, the transmission interval of <rtt/> elements for a continuously-changing message SHOULD be approximately 0.7 second. This interval meets ITU-T Rec. F.700 for real-time conversation. If a different transmission interval needs to be used, the interval SHOULD be between 0.3 second and 1 second.
+For the best balance between interoperability and usability, the default transmission interval of <rtt/> elements for a continuously-changing message SHOULD be approximately 0.7 second. This interval meets ITU-T Rec. F.700 for real-time conversation. If a different transmission interval needs to be used, the interval SHOULD be between 0.3 second and 1 second.
A longer interval will lead to a less optimal user experience. Conversely, a much shorter interval may more frequently trigger throttling or flooding protection algorithms in public XMPP servers, leading to dropped <message/> elements and/or Congestion Considerations.
To provide fluid real-time text, one or more of the following methods can be used:
The <rtt/> element MAY contain one or more action elements representing real-time text operations, including text being appended, inserted, or deleted.
-Many chat clients allow a sender to edit their message before sending (via a Send button, or pressing Enter). The inclusion of real-time text functionality to existing client software, needs to preserve the sender's existing expectation of being able to edit their messages before sending. In a chat session with real-time text, the recipient can watch the sender compose and edit their message before it is delivered.
+Many chat clients allow a sender to edit their message before sending (via a Send button, or pressing Enter). The inclusion of real-time text functionality, in existing client software, needs to preserve the sender's existing expectation of being able to edit their messages. In a chat session with real-time text, the recipient can watch the sender compose and edit their message before it is delivered.
This is a short summary of action elements that operate on a real-time message. For detailed information, see List of Action Elements.
REQUIRED | ||||||
Interval | +Wait Interval | <w n='#'/> | Wait n thousandths of a second. | RECOMMENDED | @@ -279,25 +289,25 @@ If p is omitted, the default value of p MUST be the current message length (p defaults to end of message).
Element | @@ -815,17 +829,49 @@12 |
---|
Normally, the action elements are split into multiple separate transmissions. This example also does not illustrate Preserving Key Press Intervals. *The Cursor Position column is only relevant if the Optional Remote Cursor is implemented.
+*The Cursor Position column is only relevant if the Optional Remote Cursor is implemented.
+This example does not illustrate Preserving Key Press Intervals. Also, it is noted that most situations, during normal typing speeds at a normal Transmission Interval, the series of Action Elements will typically be spread over multiple separate <rtt/> elements.
+All examples shown below, result in the same real-time message “HELLO”. Only the last example follows Preserving Key Press Intervals.
+
+
The above example outputs “HELLO” in a single action element (Element <t/> – Insert Text).
+
+
The above example outputs “HELLO” in separate action elements for each key press.
+
+
The above example outputs “HELLO” in separate action elements for each key press, while also Preserving Key Press Intervals. The Element <w/> – Wait Interval specifies the number of milliseconds between key presses, to allow smooth presentation in recipient clients that support <w/> action elements.
This example is a transmission of “Hello there!” while Preserving Key Press Intervals. It illustrates a four-second typing sequence:
In between each key press, is Element <w/> – Interval to allow the receiving client execute a small pause between action elements, which allows the playback of the typing at its original look-and-feel.
+The use Element <w/> – Wait Interval, between key presses, allows the receiving client execute a small pause between action elements. This allows recipient clients to play back the sender's typing fluidly.
This example also illustrate the following:
+This example also illustrates the following:
There are other real-time text formats with interoperability considerations relating to the session setup level, the media transport level, and presentation level. For each environment where interoperability is supported, an interoperability specification needs to be documented that covers addressing, session control, media negotiation and media transcoding.
-It is noted there is also another real-time text standard (RFC 4103, IETF RFC 5194
One environment for interoperability considerations is SIP with real-time text (also called Text over IP, or ToIP) as specified in ITU-T T.140 and IETF RFC 4103. This protocol combination is specified by IETF, and by some emergency service organizations, to be one of the protocols supported for IP based real-time emergency calls that support real-time text. Another reason is that SIP is a popular real-time session control protocol. Also, there are many implementations of real-time text that is being controlled by SIP.
-Interoperability implies addressing translation, media negotiation and translation, and media transcoding. For media transcoding between this specification and T.140/RFC 4103, the real-time text transcoding is straight forward, except the editing feature of this specification. Backwards positioning and insertion or deletion far back in the message can cause a large number of erase operations in T.140, that takes time and bandwidth to convey.
-It is noted that T.140 specifies the use of ISO 6429 control codes for presentation characteristics, such as text color, that are not covered in this version of this specification. All control codes from both sides that cannot be presented on the other side of the conversion, needs to be filtered off in order to not disturb the presentation of text.
-Also, see Total Conversation – Combination With Audio And Video.
+There are other real-time text formats with interoperability considerations relating to the session setup level, the media transport level, and presentation level. Interoperability specifications between multiple real-time text formats can be found in the Interoperability section of Real-Time Text Taskforce
+
It is appropriate for implementers to choose the most appropriate real-time text standard for the session control standard in use during a particular session. Clients that use XMPP (e.g. Google Talk) would utilize this XEP-0301 specification. Clients that use SIP can utilize IETF RFC 4103, IETF RFC 5194
In the SIP environment, real-time text is specified in IETF RFC 4103 and ITU-T T.140. SIP is a popular real-time session control protocol, and there are many implementations of real-time text controlled by SIP. This includes some emergency service organizations (e.g. Reach 112).
+Interoperability considerations include addressing translation, media negotiation and translation, and media transcoding. Transcoding is straightforward between this specification and T.140/RFC4103, except for editing in the middle of messages. Text insertions or deletions, occurring far back in the message, can cause a large number of erase operations in T.140 that consume time and bandwidth. T.140 specifies the use of ISO 6429 control codes for presentation characteristics, such as text color, that are not supported by this specification. During transcoding, these control codes needs to be filtered off in order to not disturb the presentation of text.
It is important for implementors of real-time text to educate users about real-time text. Users of real-time text needs to be aware that their typing is now visible in real-time to everyone in the current chat conversation. This may have security implications if users copy & paste private information into their chat entry buffer (e.g. a shopping invoice) before editing out the private parts of the pasted text (e.g. a credit card number) before they send the message. With real-time message editing, recipients can watch all text changes that occur in the sender's text, before the sender sends the final message. Implementation behaviors and improved education can be added to reduce privacy issues. Examples include introduction upon first activation of feature, special handling for copy and pastes (i.e. preventing them, or prompting for confirmation), recipient confirmation of real-time text via Activating and Deactivating Real-Time Text, etc.
+It is important for implementers of real-time text to educate users about real-time text. Users of real-time text needs to be aware that their typing is now visible in real-time to everyone in the current chat conversation. This may have security implications if users copy & paste private information into their chat entry buffer (e.g. a shopping invoice) before editing out the private parts of the pasted text (e.g. a credit card number) before they send the message. With real-time message editing, recipients can watch all text changes that occur in the sender's text, before the sender sends the final message. Implementation behaviors and improved education can be added to reduce privacy issues. Examples include introduction upon first activation of feature, special handling for copy and pastes (i.e. preventing them, or prompting for confirmation), recipient confirmation of real-time text via Activating and Deactivating Real-Time Text, etc.
Real-time text (<rtt/> elements) transmit the content contained within messages. Therefore, a client that encrypts <body/>, also needs to also encrypt <rtt/> as well:
Encryption at the stream level (e.g. TLS) can be used normally with this specification. Stream-level encryption is the most common form of encryption.
Encryption at the stanza level (e.g. &xep0200;) can be used for all stanzas containing either <rtt/> or <body/>. It is worth noting that stanza-level encryption produces significantly more overhead, due to the increased number of stanzas that real-time text causes, leading to Congestion Considerations.
Encryption at the <message/> stanza level (e.g. deferred XEP-0200) can be used for all stanzas containing either <rtt/> or <body/>. It is worth noting that stanza-level encryption produces significantly more overhead, due to the increased number of stanzas that real-time text causes, leading to Congestion Considerations.
Encryption at the <body/> level (e.g. deprecated XEP-0027) do not encrypt <rtt/>. In this case, <rtt/> needs to be encrypted separately. It is preferable to use a broader level of encryption, where possible.
The nature of real-time text result in more frequent transmission of <message/> stanzas than may otherwise happen in a non-real-time text conversation. This may lead to increased network and server loading of XMPP networks.
-Transmission of real-time text can be throttled temporarily during poor network conditions. It is appropriate to use latency monitoring mechanisms (e.g. &xep0184; or &xep0198;) in order to temporarily adjust the Transmission Interval of real-time text beyond the recommended range. This results in lagged text (less real-time) but is better than failure during poor network conditions. The use of Message Reset can also retransmit real-time text lost by poor network conditions, including stanzas dropped by the server. This is also useful for mission-critical applications such as Next Generation 9-1-1 emergency services.
+Transmission of real-time text can be throttled temporarily during poor network conditions. It is appropriate to use latency monitoring mechanisms (e.g. &xep0184; or &xep0198;) in order to temporarily adjust the Transmission Interval of real-time text beyond the recommended range. This results in lagged text (less real-time) but is better than failure during poor network conditions. The use of Message Reset can also retransmit real-time text lost by poor network conditions, including stanzas dropped by an overloaded server. This is also useful for mission-critical applications such as Next Generation 9-1-1 emergency services.
Excess numbers of real-time messages (e.g. during DoS scenario in Multi-User Chat) might cause local resource-consumption issues, which can be mitigated by accelerated time-out of Stale Messages.
-Use of this specification in the recommended way will cause a load that is only marginally higher than a user communicating without this specification. Bandwidth overhead of real-time text is very low compared to many other activities possible on XMPP networks including in-band file transfers and audio.
+Use of this specification in the recommended way will cause a load that is only marginally higher than a user communicating without this specification. Bandwidth overhead of real-time text is very low compared to many other activities possible on XMPP networks including in-band file transfers and audio. Bandwidth can also be further mitigated using stream compression, to benefit bandwidth-constrained networks (e.g. GPRS, 3G, satellite).
The author would like to thank Real-Time Text Taskforce (R3TF) at www.realtimetext.org for their contribution to the technology documented in this specification. Mark Rejhon leads the Jabber/XMPP Taskgroup at R3TF. Members of R3TF who have contributed to this document, include Gunnar Helstrom (Omnitor), Paul E. Jones (Cisco), Gregg Vanderheiden (Trace R&D Center, University of Wisconsin), Barry Dingle (Interopability Leader, R3TF), and Arnoud van Wijk (Founder, R3TF). Others contributors include Bernard Aboba (Microsoft), Austin McKinley (Facebook), Christian Vogler (Gallaudet University), Norm Williams (Gallaudet University).
-“Natural Typing”, the technique of preserving key press intervals, is acknowledged as an invention by Mark Rejhon, who is deaf. This technology is provided to XMPP.org as part of this specification in compliance of the XSF's Intellectual Property Rights Policy at http://xmpp.org/extensions/ipr-policy.shtml.
- +The author would like to thank Real-Time Text Taskforce (R3TF) at www.realtimetext.org for their contribution to the technology documented in this specification. Mark Rejhon leads the Jabber/XMPP Taskgroup at R3TF. Members of R3TF who have contributed to this document include Gunnar Helstrom (Omnitor), Paul E. Jones (Cisco), Gregg Vanderheiden (Trace R&D Center, University of Wisconsin), Barry Dingle (Interopability Leader, R3TF), and Arnoud van Wijk (Founder, R3TF). Others contributors include Bernard Aboba (Microsoft), Darren Sturman (Teligent Telecom), Christian Vogler (Gallaudet University), Norm Williams (Gallaudet University), and several members from the XMPP Standards Mailing List, including Kevin Smith (XSF), Peter Saint Andre (XSF), and many others.
+“Natural Typing”, the technique of Preserving Key Press Intervals, is acknowledged as an invention by Mark Rejhon, who is deaf. This technology is provided to XMPP.org as part of this specification in compliance of the XSF's Intellectual Property Rights Policy at http://xmpp.org/extensions/ipr-policy.shtml.
+