Network Working Group G. Hellstrom Request for Comments: 4103 Omnitor AB Obsoletes: 2793 P. Jones Category: Standards Track Cisco Systems, Inc. June 2005 RTP Payload for Text Conversation Status of This Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Copyright Notice Copyright (C) The Internet Society (2005).
AbstractThis memo obsoletes RFC 2793; it describes how to carry real-time text conversation session contents in RTP packets. Text conversation session contents are specified in ITU-T Recommendation T.140. One payload format is described for transmitting text on a separate RTP session dedicated for the transmission of text. This RTP payload description recommends a method to include redundant text from already transmitted packets in order to reduce the risk of text loss caused by packet loss.
1. Introduction ...................................................3 2. Conventions Used in This Document ..............................4 3. Usage of RTP ...................................................4 3.1. Motivations and Rationale .................................4 3.2. Payload Format for Transmission of text/t140 Data .........4 3.3. The "T140block" ...........................................5 3.4. Synchronization of Text with Other Media ..................5 3.5. RTP Packet Header .........................................5 4. Protection against Loss of Data ................................6 4.1. Payload Format When Using Redundancy ......................6 4.2. Using Redundancy with the text/t140 Format ................7 5. Recommended Procedure ..........................................8 5.1. Recommended Basic Procedure ...............................8 5.2. Transmission before and after "Idle Periods" ..............8 5.3. Detection of Lost Text Packets ............................9 5.4. Compensation for Packets Out of Order ....................10 6. Parameter for Character Transmission Rate .....................10 7. Examples ......................................................11 7.1. RTP Packetization Examples for the text/t140 Format ......11 7.2. SDP Examples .............................................13 8. Security Considerations .......................................14 8.1. Confidentiality ..........................................14 8.2. Integrity ................................................14 8.3. Source Authentication ....................................14 9. Congestion Considerations .....................................14 10. IANA Considerations ...........................................16 10.1. Registration of MIME Media Type text/t140 ...............16 10.2. SDP Mapping of MIME Parameters ..........................17 10.3. Offer/Answer Consideration ..............................17 11. Acknowledgements ..............................................18 12. Normative References ..........................................18 13. Informative References ........................................19
2] packets. Text conversation session contents are specified in ITU-T Recommendation T.140 . Text conversation is used alone or in connection with other conversational facilities, such as video and voice, to form multimedia conversation services. Text in multimedia conversation sessions is sent character-by-character as soon as it is available, or with a small delay for buffering. The text is intended to be entered by human users from a keyboard, handwriting recognition, voice recognition or any other input method. The rate of character entry is usually at a level of a few characters per second or less. In general, only one or a few new characters are expected to be transmitted with each packet. Small blocks of text may be prepared by the user and pasted into the user interface for transmission during the conversation, occasionally causing packets to carry more payload. T.140 specifies that text and other T.140 elements must be transmitted in ISO 10646-1  code with UTF-8  transformation. This makes it easy to implement internationally useful applications and to handle the text in modern information technology environments. The payload of an RTP packet that follows this specification consists of text encoded according to T.140, without any additional framing. A common case will be a single ISO 10646 character, UTF-8 encoded. T.140 requires the transport channel to provide characters without duplication and in original order. Text conversation users expect that text will be delivered with no, or a low level, of lost information. Therefore, a mechanism based on RTP is specified here. It gives text arrival in correct order, without duplication, and with detection and indication of loss. It also includes an optional possibility to repeat data for redundancy in order to lower the risk of loss. Because packet overhead is usually much larger than the T.140 contents, the increase in bandwidth, with the use of redundancy, is minimal. By using RTP for text transmission in a multimedia conversation application, uniform handling of text and other media can be achieved in, for example, conferencing systems, firewalls, and network translation devices. This, in turn, eases the design and increases the possibility for prompt and proper media delivery.
This document obsoletes RFC 2793 . The text clarifies ambiguities in RFC 2793, improves on the specific implementation requirements learned through development experience and gives explicit usage examples. RFC 2119 . 2] described in this memo is intended for general text conversation use and is called text/t140 after its MIME registration. RFC 2793. It has been refined, with the main intention to minimize interoperability problems and encourage good reliability and functionality. By specifying text transmission as a text medium, many good effects are gained. Routing, device selection, invocation of transcoding, selection of quality of service parameters, and other high and low level functions depend on each medium being explicitly specified. Section 3.3). There are no additional headers specific to this payload format. The fields in the RTP header are set as defined in Section 3.5, carried in network byte order (see RFC 791 ).
1]. Most T.140 code elements are single ISO 10646  characters, but some are multiple character sequences. Each character is UTF-8 encoded  into one or more octets. Each block MUST contain an integral number of UTF-8 encoded characters regardless of the number of octets per character. Any composite character sequence (CCS) SHOULD be placed within one block. Section 5.1 of RFC 3550 ). Association of RTP streams can be done through the CNAME field of RTCP SDES function. It is dependent on the particular application and is outside the scope of this document. Section 10). If redundancy is used per RFC 2198, another payload type number needs to be provided for the redundancy format. The MIME type for identifying RFC 2198 is available in RFC 4102 . Sequence number: The definition of sequence numbers is available in RFC 3550 . When transmitting text using the payload format for text/t140, it is used for detection of packet loss and out-of-order packets, and can be used in the process of retrieval of redundant text, reordering of text and marking missing text.
Timestamp: The RTP Timestamp encodes the approximate instance of entry of the primary text in the packet. A clock frequency of 1000 Hz MUST be used. Sequential packets MUST NOT use the same timestamp. Because packets do not represent any constant duration, the timestamp cannot be used to directly infer packet loss. M-bit: The M-bit MUST be included. The first packet in a session, and the first packet after an idle period, SHOULD be distinguished by setting the marker bit in the RTP data header to one. The marker bit in all other packets MUST be set to zero. The reception of the marker bit MAY be used for refined methods for detection of loss. 17]) The default method that MUST be used, when no other method is explicitly selected, is redundancy in accordance with RFC 2198 . When this method is used, the original text and two redundant generations SHOULD be transmitted if the application or end-to-end conditions do not call for other levels of redundancy to be used. Forward Error Correction mechanisms, as per RFC 2733 , or any other mechanism with the purpose of increasing the reliability of text transmission, MAY be used as an alternative or complement to redundancy. Text data MAY be sent without additional protection if end-to-end network conditions allow the text quality requirements, specified in ITU-T F.703 , to be met in all anticipated load conditions.
The redundant data block headers are followed by the redundant data fields carrying T140blocks from previous packets. Finally, the new (primary) T140block for this packet follows. Redundant data that would need a timestamp offset higher than 16383 (due to its age at transmission) MUST NOT be included in transmitted packets.
Any empty T140block sent as primary data MUST be included as redundant T140blocks in subsequent packets, just as normal text T140blocks would be, unless the empty T140block is too old to be transmitted. This is done so that sequence number inference for the redundant T140blocks will be correct, as explained in Section 4.2. After an idle period, the transmitter SHOULD set the M-bit to one in the first packet with new text. 1]. Because empty T140blocks are transmitted in the beginning of an idle period, there is a slight risk of falsely marking loss of text, when only an empty T140block was lost. Procedures based on detection of the packet with the M-bit set to one MAY be used to reduce the risk of introducing false markers of loss. If redundancy is used with the text/t140 format, and a packet is received with fewer redundancy levels than normally in the session, it SHOULD be treated as if one empty T140block has been received for each excluded level in the received packet. This is because the only occasion when a T140block is excluded from transmission is when it is an empty T140block that has become too old to be transmitted. If two successive packets have the same number of redundant generations, it SHOULD be treated as the general redundancy level for the session. Change of the general redundancy level SHOULD only be done after an idle period. The text/t140 format relies on use of the sequence number in the RTP packet header for detection of loss and, therefore, is not suitable for applications where it needs to be alternating with other payloads in the same RTP stream. It would be complicated and unreliable to
try to detect loss of data at the edges of the shifts between t140 text and other stream contents. Therefore, text/t140 is RECOMMENDED to be the only payload type in the RTP stream. Section 5.3). 7] is defined (see Section 10 ). It is used in SDP with the following syntax: a=fmtp:<format> cps=<integer> The <format> field is populated with the payload type that is used for text. The <integer> field contains an integer representing the maximum number of characters that may be received per second. The value shall be used as a mean value over any 10-second interval. The default value is 30. Examples of use in SDP are found in Section 7.2. In receipt of this parameter, devices MUST adhere to the request by transmitting characters at a rate at or below the specified <integer> value. Note that this parameter was not defined in RFC 2793 . Therefore implementations of the text/t140 format may be in use that do not recognize and act according to this parameter. Therefore,
receivers of text/t140 MUST be designed so they can handle temporary reception of characters at a higher rate than this parameter specifies. As a result malfunction due to buffer overflow is avoided for text conversation with human input.
Below is an example of an RTP packet with one redundant T140block using text/t140 payload format. The primary data block is empty, which is the case when transmitting a packet for the sole purpose of forcing the redundant data to be transmitted in the absence of any new data. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC=0 |M| "RED" PT | sequence number of primary | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp of primary encoding "P" | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | synchronization source (SSRC) identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1| T140 PT | timestamp offset of "R" | "R" block length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| T140 PT | "R" T.140 encoded redundant data | +-+-+-+-+-+-+-+-+ +---------------+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ As a follow-on to the previous example, the example below shows the next RTP packet in the sequence, which does contain a real T140block when using the text/t140 payload format. Note that the empty block is present in the redundant transmissions of the text/t140 payload format. This example shows two levels of redundancy and one primary data block. The value of the "R2 block length" would be set to zero in order to represent the empty T140block.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC=0 |M| "RED" PT | sequence number of primary | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp of primary encoding "P" | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | synchronization source (SSRC) identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1| T140 PT | timestamp offset of "R2" | "R2" block length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1| T140 PT | timestamp offset of "R1" | "R1" block length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| T140 PT | "R1" T.140 encoded redundant data | +-+-+-+-+-+-+-+-+ +---------------+ | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+ | "P" T.140 encoded primary data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ RFC 2198 to provide the recommended two levels of redundancy for the text packets: m=text 11000 RTP/AVP 98 100 a=rtpmap:98 t140/1000 a=rtpmap:100 red/1000 a=fmtp:100 98/98/98 Note: Although these examples utilize the RTP/AVP profile, it is not intended to limit the scope of this memo. Any appropriate profile may be used in conjunction with this memo.
Section 14 of RFC 3550  apply. 14] provides a suitable method for ensuring confidentiality. 14] provides methods for providing integrity that MAY be applied. 14] mechanisms MAY be applied to ascertain that the source is maintained the same during the session. Section 10 of RFC 3550 , Section 6 of RFC 2198 , and any used profile (e.g., the section about congestion in chapter 2 of RFC 3551 ) apply with the following application-specific considerations. Automated systems MUST NOT use this format to send large amounts of text at rates significantly above those a human user could enter. Even if the network load from users of text conversation is usually very low, for best-effort networks an application MUST monitor the packet loss rate and take appropriate actions to reduce its sending rate (if this application sends at higher rate than what TCP would
achieve over the same path). The reason for this is that this application, due to its recommended usage of two or more redundancy levels, is very robust against packet loss. At the same time, due to the low bit-rate of text conversations, if one considers the discussion in RFC 3714 , this application will experience very high packet loss rates before it needs to perform any reduction in the sending rate. If the application needs to reduce its sending rate, it SHOULD NOT reduce the number of redundancy levels below the default amount specified in Section 4. Instead, the following actions are RECOMMENDED in order of priority: - Increase the shortest time between transmissions (described in Section 5.1) from the recommended 300 ms to 500 ms, which is the highest value allowed according to T.140. - Limit the maximum rate of characters transmitted. - Increase the shortest time between transmissions to a higher value, not higher than 5 seconds. This will cause unpleasant delays in transmission, beyond what is allowed according to T.140, but text will still be conveyed in the session with some usability. - Exclude participants from the session. Please note that if the reduction in bit-rate achieved through the above measures is not sufficient, the only remaining action is to terminate the session. As guidance, some load figures are provided here as examples based on use of IPv4, including the load from IP, UDP, and RTP headers without compression . - Experience tells that a common mean character transmission rate, during a complete PSTN text telephony session, is around two characters per second. - A maximum performance of 20 characters per second is enough even for voice-to-text applications. - With the (unusually high) load of 20 characters per second, in a language that makes use of three octets per UTF-8 character, two redundant levels, and 300 ms between transmissions, the maximum load of this application is 3300 bits/s.
- When the restrictions mentioned above are applied, limiting transmission to 10 characters per second, using 5 s between transmissions, the maximum load of this application, in a language that uses one octet per UTF-8 character, is 300 bits/s. Note that this payload can be used in a congested situation as a last resort to maintain some contact when audio and video media need to be stopped. The availability of one low bit-rate stream for text in such adverse situations may be crucial for maintaining some communication in a critical situation. Section 8 of RFC 4103. Interoperability considerations: This format is the same as specified in RFC2793. For RFC2793 the "cps=" parameter was not defined. Therefore, there may be implementations that do not consider this parameter. Receivers need to take that into account. Published specification: ITU-T T.140 Recommendation. RFC 4103. Applications which use this media type: Text communication terminals and text conferencing tools. Additional information: This type is only defined for transfer via RTP. Magic number(s): None
File extension(s): None Macintosh File Type Code(s): None Person & email address to contact for further information: Gunnar Hellstrom E-mail: email@example.com Intended usage: COMMON Author / Change controller: Gunnar Hellstrom | IETF avt WG firstname.lastname@example.org | 7], which is commonly used to describe RTP sessions. When SDP is used to specify sessions employing the text/t140 format, the mapping is as follows: - The MIME type ("text") goes in SDP "m=" as the media name. - The MIME subtype (payload format name) goes in SDP "a=rtpmap" as the encoding name. The RTP clock rate in "a=rtpmap" MUST be 1000 for text/t140. - The parameter "cps" goes in SDP "a=fmtp" attribute. - When the payload type is used with redundancy according to RFC 2198, the level of redundancy is shown by the number of elements in the slash-separated payload type list in the "fmtp" parameter of the redundancy declaration as defined in RFC 4102  and RFC 2198 . 10], the following consideration should be made: - The "cps" parameter is declarative. Both sides may provide a value, which is independent of the other side.
 ITU-T Recommendation T.140 (1998) - Text conversation protocol for multimedia application, with amendment 1, (2000).  Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", RFC 3550, July 2003.  Perkins, C., Kouvelas, I., Hodson, O., Hardman, V., Handley, M., Bolot, J., Vega-Garcia, A., and S. Fosse-Parisis, "RTP Payload for Redundant Audio Data", RFC 2198, September 1997.  Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.  ISO/IEC 10646-1: (1993), Universal Multiple Octet Coded Character Set.  Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.  Handley, M. and V. Jacobson, "SDP: Session Description Protocol", RFC 2327, April 1998.  Rosenberg, J. and H. Schulzrinne, "An RTP Payload Format for Generic Forward Error Correction", RFC 2733, December 1999.  Jones, P., "Registration of the text/red MIME Sub-Type", RFC 4102, June 2005.  Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with the Session Description Protocol (SDP)", RFC 3264, June 2002.  Schulzrinne, H. and S. Casner, "RTP Profile for Audio and Video Conference with Minimal Control", STD 65, RFC 3551, July 2003.  Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.
 Floyd, S. and J. Kempf, "IAB Concerns Regarding Congestion Control for Voice Traffic in the Internet", RFC 3714, March 2004.  Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, "The Secure Real-time Transport Protocol (SRTP)", RFC 3711, March 2004.  Schulzrinne, H. and S. Petrack, "RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals", RFC 2833, May 2000.  Hellstrom, G., "RTP Payload for Text Conversation", RFC 2793, May 2000.  ITU-T Recommendation F.703, Multimedia Conversational Services, November 2000.
Full Copyright Statement Copyright (C) The Internet Society (2005). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf- email@example.com. Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society.