RFC 4351 - Real-Time Transport Protocol (RTP) Payload for Te

时间:2006-11-02 来源: 作者: 点击:
NetworkWorkingGroupG.Hellstrom RequestforComments:4351OmnitorAB Category:Historic P.Jones CiscoSystems,Inc. January2006 Real-TimeTransportProtocol(RTP)Payloadfor TextConversationInterleavedinanAudioStream StatusofThisMemo ThismemodefinesaHistoricDocu
  Network Working Group                                       G. Hellstrom
Request for Comments: 4351                                    Omnitor AB
Category: Historic                                                          P. Jones
                                                                      Cisco Systems, Inc.
                                                                              January 2006

             Real-Time Transport Protocol (RTP) Payload for
           Text Conversation Interleaved in an Audio Stream

Status of This Memo

   This memo defines a Historic Document for the Internet community.  It
   does not specify an Internet standard of any kind.  Distribution of
   this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2006).

Abstract

   This memo 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 audio and text data
   within a single RTP session.

   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.

Table of Contents

   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 audio/t140c Data ........4
      3.3. The "T140block" ............................................5
      3.4. Synchronization of Text with Other Media ...................5
      3.5. Synchronization Considerations for the audio/t140c Format ..5
      3.6. RTP Packet Header ..........................................6
   4. Protection against Loss of Data .................................7
      4.1. Payload Format When Using Redundancy .......................7
      4.2. Using Redundancy with the audio/t140c Format ...............8
   5. Recommended Procedure ...........................................8
      5.1. Recommended Basic Procedure ................................8
      5.2. Transmission before and after "Idle Periods" ...............9
      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 audio/t140c Format .....11
      7.2. SDP Examples ..............................................12
   8. Security Considerations ........................................13
      8.1. Confidentiality ...........................................13
      8.2. Integrity .................................................13
      8.3. Source Authentication .....................................13
   9. Congestion Considerations ......................................14
   10. IANA Considerations ...........................................15
      10.1. Registration of MIME Media Type audio/t140c ..............15
      10.2. SDP Mapping of MIME Parameters ...........................16
      10.3. Offer/Answer Consideration ...............................17
   11. Acknowledgements ..............................................17
   12. Normative References ..........................................17
   13. Informative References ........................................18

1.  Introduction

   This document defines a payload type for carrying text conversation
   session contents in RTP [2] packets.  Text conversation session
   contents are specified in ITU-T Recommendation T.140 [1].  Text
   conversation is used alone or in connection to 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[5] code with UTF-8 [6] transformation.
   That makes it easy to implement internationally useful applications
   and to handle the text in modern information technology environments.
   The payload of an RTP packet following 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 to lower the risk of loss.  Since 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, as examples, 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 introduces a method of transporting text interleaved
   with voice within the same RTP session.

2.  Conventions Used in This Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [4].

3.  Usage of RTP

   The payload format for real-time text transmission with RTP [2]
   described in this memo is intended for use between Public Switched
   Telephone Network (PSTN) gateways and is called audio/t140c.

3.1.  Motivations and Rationale

   The audio/t140c payload specification is intended to allow gateways
   that are interconnecting two PSTN networks to interleave, through a
   single RTP session, audio and text data received on the PSTN circuit.
   This is comparable to the way in which dual-tone multifrequency
   (DTMF) is extracted and transmitted within an RTP session [14].

   The audio/t140c format SHALL NOT be used for applications other than
   PSTN gateway applications.  In such applications, a specific
   profiling document MAY make it REQUIRED for a specific application.
   The reason to prefer to use audio/t140c could be for gateway
   application where the ports are a limited and scarce resource.
   Applications SHOULD use RFC 4103 [15] for real-time text
   communication that falls outside the limited scope of this
   specification.

3.2.  Payload Format for Transmission of audio/t140c Data

   An audio/t140c conversation RTP payload format consists of a 16-bit
   "T140block counter" carried in network byte order (see RFC 791 [11]
   Annex B), followed by one and only one "T140block" (see section 3.3).
   The fields in the RTP header are set as defined in section 3.6.

   The T140block counter MUST be initialized to zero the first time that
   a packet containing a T140block is transmitted and MUST be
   incremented by 1 each time that a new block is transmitted.  Once the
   counter reaches the value 0xFFFF, the counter is reset to 0 the next
   time the counter is incremented.  This T140block counter is used to
   detect lost blocks and to avoid duplication of blocks.

   For the purposes of readability, the remainder of this document
   refers only to the T140block without making explicit reference to the
   T140block counter.  Readers should understand that when using the
   audio/t140c format, the T140block counter MUST always precede the
   actual T140block, including redundant data transmissions.

3.3.  The "T140block"

   T.140 text is UTF-8 coded as specified in T.140 with no extra
   framing.  The T140block contains one or more T.140 code elements as
   specified in [1].  Most T.140 code elements are single ISO 10646 [5]
   characters, but some are multiple-character sequences.  Each
   character is UTF-8 encoded [6] 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.

3.4.  Synchronization of Text with Other Media

   Usually, each medium in a session utilizes a separate RTP stream.  As
   such, if synchronization of the text and other media packets is
   important, the streams MUST be associated when the sessions are
   established and the streams MUST share the same reference clock
   (refer to the description of the timestamp field as it relates to
   synchronization in section 5.1 of RFC 3550).  Association of RTP
   streams can be done through the CNAME field of RTP Control Protocol
   (RTCP) SDES function.  It is dependent on the particular application
   and is outside the scope of this document.

3.5.  Synchronization Considerations for the audio/t140c Format

   The audio/t140c packets are generally transmitted as interleaved
   packets between voice packets or other kinds of audio packets with
   the intention to create one common audio signal in the receiving
   equipment to be used for alternating between text and voice.  The
   audio/t140c payload is then used to play out audio signals according
   to a PSTN textphone coding method (usually a modem).

   One should observe the RTP timestamps of the voice, text, or other
   audio packets in order to reproduce the stream correctly when playing
   out the audio.  Also, note that incoming text from a PSTN circuit
   might be at a higher bit-rate than can be played out on an egress
   PSTN circuit.  As such, it is possible that, on the egress side, a
   gateway may not complete the play out of the text packets before it
   is time to play the next voice packet.  Given that this application
   is primarily for the benefit of users of PSTN textphone devices, it
   is strongly RECOMMENDED that all received text packets be properly
   reproduced on the egress gateway before considering any other
   subsequent audio packets.

   If necessary, voice and other audio packets should be discarded in
   order to properly reproduce the text signals on the PSTN circuit,
   even if the text packets arrive late.

   The PSTN textphone users commonly use turn-taking indicators in the
   text stream, so it can be expected that as long as text is
   transmitted, it is valid text and should be given priority over
   voice.

   Note that the usual RTP semantics apply with regards to switching
   payload formats within an RTP session.  A sender MAY switch between
   "audio/t140c" and some other format within an RTP session, but MUST
   NOT send overlapping data using two different audio formats within an
   RTP session.  This does not prohibit an implementation from being
   split into two logical parts to send overlapping data, each part
   using a different synchronization source (SSRC) and sending its own
   RTP and RTCP (such an endpoint will appear to others in the session
   as two participants with different SSRCs, but the same RTCP SDES
   CNAME).  Further details around using multiple payloads in an RTP
   session can be found in RFC 3550 [2].

3.6.  RTP Packet Header

   Each RTP packet starts with a fixed RTP header.  The following fields
   of the RTP fixed header are specified for T.140 text streams:

   Payload Type (PT): The assignment of an RTP payload type is specific
      to the RTP profile under which this payload format is used.  For
      profiles that use dynamic payload type number assignment, this
      payload format can be identified by the MIME type "audio/t140c"
      (see 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 3555 [17].

   Sequence number: The definition of sequence numbers is available in
      RFC 3550 [2].  Character loss is detected through the T140block
      counter when using the audio/t140c payload format.

   Timestamp: The RTP Timestamp encodes the approximate instance of
      entry of the primary text in the packet.  For audio/t140c, the
      clock frequency MAY be set to any value, and SHOULD be set to the
      same value as for any audio packets in the same RTP stream in
      order to avoid RTP timestamp rate switching.  The value SHOULD be
      set by out of band mechanisms.  Sequential packets MUST NOT use
      the same timestamp.  Since 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.

4.  Protection against Loss of Data

   Consideration must be devoted to keeping loss of text caused by
   packet loss within acceptable limits. (See ITU-T F.703 [16].)

   The default method that MUST be used when no other method is
   explicitly selected is redundancy in accordance with RFC 2198 [3].
   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.

   Other protection methods MAY be used.  Forward Error Correction
   mechanisms as per RFC 2733 [8] 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 [16] to
   be met in all anticipated load conditions.

4.1.  Payload Format When Using Redundancy

   When using the format with redundant data, the transmitter may select
   a number of T140block generations to retransmit in each packet.  A
   higher number introduces better protection against loss of text but
   marginally increases the data rate.

   The RTP header is followed by one or more redundant data block
   headers, one for each redundant data block to be included.  Each of
   these headers provides the timestamp offset and length of the
   corresponding data block plus a payload type number indicating the
   payload format audio/t140c.

   After the redundant data block headers follows the redundant data
   fields carrying T140blocks from previous packets, and finally the new
   (primary) T140block for this packet.

   Redundant data that would need a timestamp offset higher than 16383
   due to its age at transmission MUST NOT be included in transmitted
   packets.

4.2.  Using Redundancy with the audio/t140c Format

   Since sequence numbers are not provided in the redundant header and
   since the sequence number space is shared by all audio payload types
   within an RTP session, a sequence number in the form of a T140block
   counter is added to the T140block for transmission.  This allows the
   redundant T140block data corresponding to missing primary data to be
   retrieved and used properly into the stream of received T140block
   data when using the audio/t140c payload format.

   All non-empty redundant data blocks MUST contain the same data as a
   T140block previously transmitted as primary data, and be identified
   with a T140block counter equating to the original T140block counter
   for that T140block.

   The T140block counters preceding the text in the T140block enables
   the ordering by the receiver.  If there is a gap in the T140block
   counter value of received audio/t140c packets, and if there are
   redundant T140blocks with T140block counters matching those that are
   missing, the redundant T140blocks may be substituted for the missing
   T140blocks.

   The value of the length field in the redundant header indicates the
   length of the concatenated T140block counter and the T140block.

5.  Recommended Procedure

   This section contains RECOMMENDED procedures for usage of the payload
   format.  Based on the information in the received packets, the
   receiver can:

      - reorder text received out of order.
      - mark where text is missing because of packet loss.
      - compensate for lost packets by using redundant data.

5.1.  Recommended Basic Procedure

   Packets are transmitted when there is valid T.140 data to transmit.

   T.140 specifies that T.140 data MAY be buffered for transmission with
   a maximum buffering time of 500 ms.  A buffering time of 300 ms is
   RECOMMENDED when the application or end-to-end network conditions are
   not known to require another value.

   If no new data is available for a longer period than the buffering
   time, the transmission process is in an idle period.

   When new text is available for transmission after an idle period, it
   is RECOMMENDED to send it as soon as possible.  After this
   transmission, it is RECOMMENDED to buffer T.140 data in buffering
   time intervals until next idle period.  This is done in order to keep
   the maximum bit-rate usage for text at a reasonable level.  The
   buffering time MUST be selected so that text users will perceive a
   real-time text flow.

5.2.  Transmission before and after "Idle Periods"

   When valid T.140 data has been sent and no new T.140 data is
   available for transmission after the selected buffering time, an
   empty T140block SHOULD be transmitted.  This situation is regarded to
   be the beginning of an idle period.  The procedure is recommended in
   order to more rapidly detect potentially missing text before an idle
   period or when the audio stream switches from the transmission of
   audio/t140c to some other form of audio.

   An empty T140block contains no data, neither T.140 data nor a
   T140block counter.

   When redundancy is used, transmission continues with a packet at
   every transmission timer expiration and insertion of an empty
   T.140block as primary, until the last non-empty T140block has been
   transmitted as primary and as redundant data with all intended
   generations of redundancy.  The last packet before an idle period
   will contain only one non-empty T140block as redundant data, and the
   empty primary T140block.

   When using the audio/t140c payload format, empty T140blocks sent as
   primary data SHOULD NOT be included as redundant T140blocks, as it
   would simply be a waste of bandwidth to send them and it would
   introduce a risk of false detection of loss.

   After an idle period, the transmitter SHOULD set the M-bit to one in
   the first packet with new text.

5.3.  Detection of Lost Text Packets

   Receivers detect the loss of an audio/t140c packet by observing the
   value of the T140block counter in a subsequent audio/t140c packet.

   Missing data SHOULD be marked by insertion of a missing text marker
   in the received stream for each missing T140block, as specified in
   ITU-T T.140 Addendum 1 [1].

   Procedures based on detection of the packet with the M-bit set to one
   MAY be used to reduce the risk for introducing false markers of loss.

   False detection will also be avoided when using audio/t140c by
   observing the value of the T140block counter value.

   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.

5.4.  Compensation for Packets Out of Order

   For protection against packets arriving out of order, the following
   procedure MAY be implemented in the receiver.  If analysis of a
   received packet reveals a gap in the sequence and no redundant data
   is available to fill that gap, the received packet SHOULD be kept in
   a buffer to allow time for the missing packet(s) to arrive.  It is
   RECOMMENDED that the waiting time be limited to 1 second.

   If a packet with a T140block belonging to the gap arrives before the
   waiting time expires, this T140block is inserted into the gap and
   then consecutive T140blocks from the leading edge of the gap may be
   consumed.  Any T140block that does not arrive before the time limit
   expires should be treated as lost and a missing text marker inserted
   (see section 5.3).

6.  Parameter for Character Transmission Rate

   In some cases, it is necessary to limit the rate at which characters
   are transmitted.  For example, when a PSTN gateway is interworking
   between an IP device and a PSTN textphone, it may be necessary to
   limit the character rate from the IP device in order to avoid
   throwing away characters in case of buffer overflow at the PSTN
   gateway.

   To control the character transmission rate, the MIME parameter "cps"
   in the "fmtp" attribute [7] is defined (see section 10).  It is used
   in Session Description Protocol (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.

   In receipt of this parameter, devices MUST adhere to the request by
   transmitting characters at a rate at or below the specified <integer>
   value.  Examples of use in SDP are found in section 7.2.

7.  Examples

7.1.  RTP Packetization Examples for the audio/t140c Format

   Below is an example of an audio/t140c RTP packet without redundancy.

    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|   T140c PT  |       sequence number         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      timestamp (8000Hz)                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           synchronization source (SSRC) identifier            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     T140block counter         | T.140 encoded data            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +---------------+
   |                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Below is an example of an RTP packet with one redundant T140block
   using audio/t140c 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.  Note that since this is the audio/t140c payload format,
   the redundant block of T.140 data is immediately preceded with a
   T140block counter.

    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  |
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容