RFC 9071
RTP-Mixer Formatting of Multiparty Real-Time Text
Hey bestie ๐ okay so this is RFC 9071, titled RTP-Mixer Formatting of Multiparty Real-Time Text ๐ฆ It's an IETF doc by G. Hellstrรถm from GHAccess, dated July 2021, and it's on the Standards Track (ISSN 2070-1721) โจ It updates RFC 4103 ("RTP Payload for Text Conversation"), and the header doesn't list anything it obsoletes ๐
Abstract โจ
okay so this doc makes real-time text (the RFC 4103 stuff ๐ฌ) work for group chats in a centralized conference model ๐ซถ The big goal is source identification and rapidly interleaved transmission of text from different sources, so everyone can tell who typed what ๐ง It's for real-time text mixers and participant endpoints that can give a multiparty RTT session an efficient presentation or other good treatment ๐
The trick builds on the normal use of the Contributing Source (CSRC) list in the Real-time Transport Protocol (RTP) packet for source identification ๐ธ It uses the same text/t140 and text/red formats as two-party sessions, no cap ๐
Solutions that use multiple RTP streams in the same RTP session get a brief shoutout, since they could have some benefits over the RTP-mixer model ๐ The RTP-mixer model got picked for the fully specified solution because it works with a wide range of existing RTP implementations ๐
There's a capability exchange so you can verify that a mixer and a participant can handle the multiparty-coded real-time text stream using the RTP-mixer method โจ It's indicated by the Session Description Protocol (SDP) (RFC 8866) media attribute rtt-mixer ๐ฆ
This document updates RFC 4103 ("RTP Payload for Text Conversation") ๐
And there's a spec for how a mixer formats text when the endpoint is not multiparty aware ๐
Status of This Memo ๐
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9071.
Copyright Notice โ๏ธ
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Table of Contents ๐๏ธ
1. Introduction
1.1. Terminology
1.2. Main Method, Fallback Method, and Considered Alternatives
1.3. Intended Application
2. Overview of the Two Specified Solutions and Selection of Method
2.1. The RTP-Mixer-Based Solution for Multiparty-Aware Endpoints
2.2. Mixing for Multiparty-Unaware Endpoints
2.3. Offer/Answer Considerations
2.4. Actions Depending on Capability Negotiation Result
3. Details for the RTP-Mixer-Based Mixing Method for
Multiparty-Aware Endpoints
3.1. Use of Fields in the RTP Packets
3.2. Initial Transmission of a BOM Character
3.3. Keep-Alive
3.4. Transmission Interval
3.5. Only One Source per Packet
3.6. Do Not Send Received Text to the Originating Source
3.7. Clean Incoming Text
3.8. Principles of Redundant Transmission
3.9. Text Placement in Packets
3.10. Empty T140blocks
3.11. Creation of the Redundancy
3.12. Timer Offset Fields
3.13. Other RTP Header Fields
3.14. Pause in Transmission
3.15. RTCP Considerations
3.16. Reception of Multiparty Contents
3.17. Performance Considerations
3.18. Security for Session Control and Media
3.19. SDP Offer/Answer Examples
3.20. Packet Sequence Example from Interleaved Transmission
3.21. Maximum Character Rate "cps" Setting
4. Presentation-Level Considerations
4.1. Presentation by Multiparty-Aware Endpoints
4.2. Multiparty Mixing for Multiparty-Unaware Endpoints
5. Relationship to Conference Control
5.1. Use with SIP Centralized Conferencing Framework
5.2. Conference Control
6. Gateway Considerations
6.1. Gateway Considerations with Textphones
6.2. Gateway Considerations with WebRTC
7. Updates to RFC 4103
8. Congestion Considerations
9. IANA Considerations
9.1. Registration of the "rtt-mixer" SDP Media Attribute
10. Security Considerations
11. References
11.1. Normative References
11.2. Informative References
Acknowledgements
Author's Address
1. Introduction ๐ธ
okay so [RFC4103] is the spec for sending real-time text over the Real-time Transport Protocol (RTP) [RFC3550] ๐ It's often called RTT and uses the text/t140 format. It also has a redundancy format, text/red, for extra robustness, and that one is registered in [RFC4102] ๐ง
Real-time text usually comes together with audio, and sometimes video too ๐ง๐น
There's a requirement related to multiparty sessions from the presentation-level standard T.140 [T140] for real-time text, and it goes like this:
The display of text from the members of the conversation should be arranged so that the text from each participant is clearly readable, and its source and the relative timing of entered text is visualized in the display.
Another requirement is that the mixing procedure must not introduce delays in the text streams that could be perceived as disruptive to the real-time experience of the receiving users โฑ๏ธ
Real-time text use is growing, and specifically, use in emergency calls is growing ๐จ Emergency calls need multiparty mixing, because it's common for one agent to transfer the call to another specialized agent but still be obliged to stay on the call to at least verify that the transfer was successful ๐ซก Mixer implementations for RFC 4103 ("RTP Payload for Text Conversation") can use traditional RTP functions (RFC 3550) for mixing and source identification ๐ But the performance of the mixer, when giving turns to the different sources to transmit, is limited when using the default transmission characteristics with redundancy ๐ญ
The redundancy scheme described in [RFC4103] lets earlier transmitted redundant text ride along in packets together with new text, which is super efficient โจ BUT the redundancy header format has no source indicators for the redundant transmissions ๐ So the redundant parts in a packet must therefore be from the same source as the new text ๐ The recommended transmission is one new and two redundant generations of text (T140blocks) in each packet, and the recommended transmission interval for two-party use is 300 ms โฐ
Real-time text mixers for multiparty sessions need to include the source with each transmitted group of text from a conference participant, so the text can be sent interleaved with text groups from different sources at the rate they're created ๐ฆ That lets endpoints present the text groups in a suitable grouping with other text from the same source ๐
The presentation can then be arranged so that text from different sources is presented in real time and is easy to read ๐ At the same time, a reading user can perceive approximately when the text was created in real time by the different parties โญ The transmission and mixing are meant to be done in a general way, so that the presentation can be arranged in a layout decided upon by the receiving endpoint ๐
Existing implementations of RFC 4103 in endpoints that do not implement the updates specified in this document cannot be expected to properly present real-time text mixed for multiparty-aware endpoints ๐ฌ
So a negotiation mechanism is needed to verify whether the parties (1) are able to handle a common method for multiparty transmissions and (2) can agree on using that method ๐ค
A fallback mixing procedure is also needed for cases when the negotiation result shows that a receiving endpoint can't handle the mixed format ๐ Otherwise, multiparty-unaware endpoints would possibly present all received multiparty mixed text as if it came from the same source, no matter any source indication coded in fields in the packet ๐ป Or they may have other undesirable ways of acting on the multiparty content ๐ The fallback method is called the mixing procedure for multiparty-unaware endpoints. It's naturally not expected to meet all the performance requirements placed on the mixing procedure for multiparty-aware endpoints ๐ค
This document updates [RFC4103] by introducing an attribute for declaring support of the RTP-mixer-based multiparty-mixing case, plus rules for source indications and interleaving of text from different sources ๐
1.1. Terminology ๐
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 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
The terms "Source Description" (SDES), "Canonical Name" (CNAME), "Name" (NAME), "Synchronization Source" (SSRC), "Contributing Source" (CSRC), "CSRC list", "CSRC count" (CC), "RTP Control Protocol" (RTCP), and "RTP mixer" are defined in [RFC3550] ๐
"real-time text" (RTT) is text transmitted instantly as it is typed or created ๐ฌ Recipients can read the message immediately while it's still being written, without waiting ๐
The term "T140block" is defined in [RFC4103] to contain one or more T.140 code elements ๐งฉ
"TTY" stands for a textphone type used in North America ๐
Web Real-Time Communication (WebRTC) is specified by the World Wide Web Consortium (W3C) and the IETF. See [RFC8825] ๐
"DTLS-SRTP" is a Datagram Transport Layer Security (DTLS) extension for use with the Secure Real-time Transport Protocol / Secure Real-time Transport Control Protocol (SRTP/SRTCP), as specified in [RFC5764] ๐
The term "multiparty aware" describes an endpoint that (1) receives real-time text from multiple sources through a common conference mixer, (2) is able to present the text in real time, separated by source, and (3) presents the text so that a user can get an impression of the approximate relative timing of text from different parties ๐
The term "multiparty unaware" describes an endpoint that cannot itself separate text from different sources when the text is received through a common conference mixer ๐
1.2. Main Method, Fallback Method, and Considered Alternatives โจ
okay so before we landed on the final plan, the group explored a bunch of other options for multiparty real-time text. ๐ง this section walks through a few of them, bestie ๐
Multiple RTP streams, one per participant:
One RTP stream per source would be sent in the same RTP session with the text/red format. from some points of view, that's efficient, and it would use exactly the same packet format as [RFC4103] and the same payload type ๐ a couple of relevant scenarios using multiple RTP streams are specified in "RTP Topologies" [RFC7667]. one possibility that's especially giving is the Selective Forwarding Middlebox (SFM) topology in Section 3.7 of [RFC7667], which could enable end-to-end encryption ๐ in contrast to audio and video, real-time text is only transmitted when the users actually transmit information. so an SFM solution would not need to exclude any party from transmission under normal conditions ๐
to let the mixer pass the packets along with the payload preserved and encrypted, an SFM solution would need to act on some specific characteristics of the text/red format. the redundancy headers are part of the payload, so the receiver would need to just assume that the payload type number in the redundancy header is for text/t140 ๐ซถ the characters per second (cps) parameter would need to act per stream. the relationship between the SSRC and the source would need to be conveyed in some specified way, e.g., in the CSRC. recovery and loss detection would preferably be based on RTP sequence number gap detection, so sequence number gaps in the incoming stream to the mixer would need to be reflected in the stream to the participant, with no new gaps created by the mixer ๐ญ
however, the RTP implementation in both mixers and endpoints needs to support multiple streams in the same RTP session in order to use this mechanism. to give it the best shot at deployment, it should be possible to upgrade existing endpoint solutions to be multiparty aware with a reasonable amount of effort. there is currently a lack of support for multi-stream RTP in certain implementations, and that's the reason this solution only gets a brief mention here as an option for further study ๐
RTP-mixer-based method for multiparty-aware endpoints:
the text/red format as defined in RFC 4102 and applied in RFC 4103 is sent with the RTP-mixer method, indicating the source in the CSRC field ๐ธ a text/red format with a text/t140 payload in a single RTP stream can be sent when text is available from the call participants, instead of at the regular 300 ms intervals. transmission of packets with text from different sources can then be done smoothly, and simultaneous transmission happens as long as it isn't limited by the maximum character rate cps value ๐ฆ with ten participants sending text simultaneously, the switching and transmission performance is good. with more simultaneously sending participants and with receivers at default capacity, there will be a noticeable jerkiness and delay in text presentation, and the more participants who send text at once, the more jerkiness there will be ๐ two seconds of jerkiness will be noticeable and slightly unpleasant, BUT it lines up with what typing humans often cause by hesitating or changing position while typing. honestly, relatable ๐
a big win for this method is that no new packet format needs to be introduced and implemented โจ since simultaneous typing by more than two parties is expected to be very rare (as described in Section 1.3), this method can be used successfully with good performance ๐ recovery of text after packet loss is based on analysis of timestamps of received redundancy versus earlier received text. negotiation is based on a new SDP media attribute, rtt-mixer. this method was selected to be the main method specified in this document ๐
Multiple sources per packet:
a new text media subtype would be specified with up to 15 sources in each packet ๐ง the mechanism would make use of the RTP-mixer model specified in RTP [RFC3550]. the sources would be indicated in strict order in the CSRC list of the RTP packets. the CSRC list can have up to 15 members, so text from up to 15 sources can be included in each packet. packets are normally sent at 300 ms intervals, and the mean delay would be 150 ms. a new redundancy packet format would be specified too ๐ this method would result in good performance, but it would require standardization and implementation of new releases in the target technologies, and those would take more time than desirable to complete. so it was not selected to be included in this document ๐ฅฒ
Mixing for multiparty-unaware endpoints:
the presentation of text from multiple parties is prepared by the mixer in one single stream. it's desirable to have a method that doesn't require any modifications in existing user devices implementing RFC 4103 for real-time text without explicit support for multiparty sessions ๐ this is made possible by having the mixer insert a new line and a text-formatted source label before each switch of text source in the stream. switching the source can only be done in places in the text where it doesn't disturb the perception of the contents. text from only one source at a time can be presented in real time, so the delay will vary. in calls where parties take turns properly by ending their entries with a new line, the limitations will have limited influence on the user experience ๐ when only two parties send text, those two will see the text in real time with no delay. although this method has other limitations too, it's included in this document as a fallback method ๐ซถ
Real-time text transport in WebRTC:
[RFC8865] specifies how the WebRTC data channel can be used to transport real-time text ๐ป that specification has a section briefly describing its use in multiparty sessions. the focus of this document is RTP transport, so even though the WebRTC transport provides good multiparty performance, it's only mentioned here in relation to providing gateways with multiparty capabilities between RTP and WebRTC technologies ๐ฆ
1.3. Intended Application ๐
the method for multiparty real-time text specified in this document is primarily intended for use in transmissions between mixers and endpoints in centralized mixing configurations. it's also applicable between mixers ๐ง an often-mentioned application is emergency service calls with real-time text and voice, where a call taker wants to make an attended handover of a call to another agent and stay on the call to observe the session ๐จ multimedia conference sessions with support for participants to contribute with text are another example, and conferences with central support for speech-to-text conversion are yet another โจ
in all these applications, normally only one participant at a time will send long text comments. in some cases, one other participant will occasionally contribute a longer comment at the same time ๐ that may also happen in some rare cases when text is translated into another language in a conference. apart from these cases, other participants are only expected to contribute very brief comments while others are sending text ๐
users expect the text they send to be presented in real time, in a readable way, to the other participants. that's true even if they send simultaneously with other users, and even when they make brief edit operations on their text by backspacing and correcting it ๐ธ
text is supposed to be human generated, by some means of text input, such as typing on a keyboard or using speech-to-text technology ๐น occasional small cut-and-paste operations may appear, even if that isn't the initial purpose of real-time text ๐
the real-time characteristics of real-time text are essential for participants to be able to contribute to a conversation. if the text is delayed too much between the typing of a character and its presentation, then in some conference situations the opportunity to comment will be gone, and someone else will grab the turn ๐ญ a delay of more than one second in such situations is an obstacle to good conversation ๐
2. Overview of the Two Specified Solutions and Selection of Method ๐ท
this section contains a brief introduction of the two methods specified in this document ๐ซถ
2.1. The RTP-Mixer-Based Solution for Multiparty-Aware Endpoints ๐
this method specifies the negotiated use of the formats described in RFC 4103 for multiparty transmissions in a single RTP stream. the main purpose of this document is to specify a method for true multiparty real-time text mixing for multiparty-aware endpoints that can be widely deployed ๐ the RTP-mixer-based method makes use of the current format for real-time text as provided in [RFC4103]. this method updates RFC 4103 by clarifying one way to use it in the multiparty situation ๐ that's done by completing a negotiation for this kind of multiparty capability and by interleaving packets from different sources. the source is indicated in the CSRC element in the RTP packets, and specific considerations are made regarding the ability to recover text after packet loss ๐งฉ
the detailed procedures for the RTP-mixer-based multiparty-aware case are specified in Section 3 ๐
please refer to [RFC4103] when reading this document ๐
2.2. Mixing for Multiparty-Unaware Endpoints ๐ฆ
this document also specifies a method to be used when the endpoint participating in a multiparty call doesn't itself implement any solution, or doesn't implement the same solution as the mixer ๐ this method requires the mixer to insert text dividers and readable labels, and to only send text from one source at a time until a suitable point appears for changing the source. this solution is a fallback method with functional limitations, and it operates at the presentation level ๐
A mixer SHOULD by default format and transmit text to a call participant so that the text is suitable for presentation on a multiparty-unaware endpoint that has not negotiated any method for true multiparty real-time text handling but has negotiated a "text/red" or "text/t140" format in a session ๐ง this SHOULD be done if nothing else is specified for the application, in order to maintain interoperability ๐ซถ Section 4.2 specifies how this mixing is done โจ
2.3. Offer/Answer Considerations โจ
Okay so bestie, "RTP Payload for Text Conversation" [RFC4103] is the spec that uses RTP [RFC3550] plus a redundancy format (text/red, from [RFC4102]) to make real-time text way more robust ๐. This document updates [RFC4103] ๐ฆ by adding a capability negotiation for multiparty real-time text, a way to show where the text came from, and rules for timing transmissions that are interleaved from different sources ๐ซถ.
The capability negotiation for the RTP-mixer-based multiparty method is built on the SDP media attribute rtt-mixer ๐. The syntax is as follows:
a=rtt-mixer
If some other method for RTP-based multiparty real-time text gets specified later, it's assumed it'll be recognized through a specific SDP feature exchange ๐ฎ.
2.3.1. Initial Offer ๐ธ
A party that wants to set up a session and is willing to use the RTP-mixer-based method from this spec, for sending, receiving, or both ๐
, SHALL include the rtt-mixer SDP attribute in the corresponding "text" media section of the initial offer.
The party MAY indicate its capability for both the RTP-mixer-based method in this spec and other methods โจ.
When the offerer has sent an offer that includes the rtt-mixer attribute, it MUST be ready to receive and handle real-time text formatted for both the multiparty-aware method in Section 3 and two-party formatted real-time text ๐.
2.3.2. Answering the Offer ๐
A party that gets an offer containing the rtt-mixer SDP attribute, and is willing to use the RTP-mixer-based method from this spec for sending, receiving, or both ๐ฅ, SHALL include the rtt-mixer SDP attribute in the corresponding "text" media section of the answer.
If the offer didn't contain the rtt-mixer attribute, the answer MUST NOT contain the rtt-mixer attribute ๐.
Even when rtt-mixer is successfully negotiated, the parties MAY send and receive two-party coded real-time text ๐.
An answer MUST NOT include acceptance of more than one method for multiparty real-time text in the same RTP session ๐ซ.
When the answer, which includes acceptance, is transmitted, the answerer MUST be ready to act on received text in the negotiated session according to the multiparty-aware method in Section 3. Reception of text for a two-party session SHALL also be supported ๐.
2.3.3. Offerer Processing the Answer ๐
When the offerer processes the answer, it MUST follow the requirements listed in Section 2.4 โจ.
2.3.4. Modifying a Session ๐ง
A session MAY be modified at any time by any party offering a modified SDP, with or without the rtt-mixer SDP attribute, to express a desired change in support for multiparty real-time text.
If the modified offer adds the indication of support for multiparty real-time text by including the rtt-mixer SDP attribute, the procedures in the previous subsections SHALL be applied.
If the modified offer deletes the indication of support for multiparty real-time text by leaving out the rtt-mixer SDP attribute, the answer MUST NOT contain the rtt-mixer attribute. After processing this SDP exchange, the parties MUST NOT send real-time text formatted for multiparty-aware parties according to this specification ๐
.
2.4. Actions Depending on Capability Negotiation Result ๐
A transmitting party SHALL send text according to the RTP-mixer-based multiparty method only when the negotiation for that method was successful and when it conveys text for another source. In all other cases, the packets SHALL be populated and interpreted as for a two-party session.
A party that has negotiated the rtt-mixer SDP media attribute and acts as an RTP mixer sending multiparty text MUST (1) populate the CSRC list and (2) format the packets according to Section 3.
A party that has negotiated the rtt-mixer SDP media attribute MUST interpret the contents of the CC field, the CSRC list, and the packets according to Section 3 in received RTP packets in the corresponding RTP stream.
A party that has not successfully completed the negotiation of the rtt-mixer SDP media attribute MUST NOT transmit packets interleaved from different sources in the same RTP stream, as specified in Section 3. If the party is a mixer and did declare the rtt-mixer SDP media attribute, it SHOULD perform the procedure for multiparty-unaware endpoints. If the party is not a mixer, it SHOULD transmit as in a two-party session according to [RFC4103].
3. Details for the RTP-Mixer-Based Mixing Method for Multiparty-Aware Endpoints โจ
3.1. Use of Fields in the RTP Packets ๐
The CC field SHALL show the number of members in the CSRC list, which SHALL be one (1) in transmissions from a mixer when conveying text from other sources in a multiparty session, and otherwise 0.
When a mixer conveys text during a multiparty session, a CSRC list SHALL be included in the packet. The single member in the CSRC list SHALL contain the SSRC of the source of the T140blocks in the packet.
When redundancy is used, the RECOMMENDED level of redundancy is one primary and two redundant generations of T140blocks. In some cases, a primary or redundant T140block is empty but is still represented by a member in the redundancy header.
In other respects, the contents of the RTP packets will be as specified in [RFC4103].
3.2. Initial Transmission of a BOM Character ๐ฆ
As soon as a participant is known to be in a session with another entity and is available for text reception, a Unicode byte order mark (BOM) character SHALL be sent to it by the other entity according to the procedures in this section. This is handy in many setups for opening ports and firewalls and for setting up the connection between the application and the network. If the transmitter is a mixer, then the source of this character SHALL be indicated to be the mixer itself.
Heads up that the BOM character SHALL be transmitted with the same redundancy procedures as any other text ๐ซถ.
3.3. Keep-Alive ๐
After that, the transmitter SHALL send keep-alive traffic to the receiver(s) at regular intervals when no other traffic has occurred during that interval, if that is decided upon for the actual connection. It is RECOMMENDED to use the keep-alive solution provided in [RFC6263]. The consent check [RFC7675] is a possible alternative if it is used anyway for other reasons.
3.4. Transmission Interval โญ
A text/red or text/t140 transmitter in a mixer SHALL send packets distributed over time as long as there is something (new or redundant T140blocks) to transmit. The maximum transmission interval between text transmissions from the same source SHALL then be 330 ms, when no other limitations cause a longer interval to be temporarily used. It is RECOMMENDED to send the next packet to a receiver as soon as new text to that receiver is available, as long as the mean character rate of new text to the receiver, calculated over the last 10 one-second intervals, does not exceed the cps value of the receiver. The intention is to keep latency low and network load limited while keeping good protection against text loss in bursty packet loss conditions. The main purpose of the 330 ms interval is for the timing of redundant transmissions, when no new text from the same source is available.
The value of 330 ms is used because many sources of text will transmit new text at 300 ms intervals during periods of continuous user typing ๐ง. Then reception in the mixer of such new text will cause a combined transmission of the new text and the unsent redundancy from the previous transmission. Only when the user stops typing will the 330 ms interval be applied to send the redundancy ๐.
If the characters per second (cps) value is reached, a longer transmission interval SHALL be applied for text from all sources as specified in [RFC4103], and only as much of the text queued for transmission SHALL be sent at the end of each transmission interval as can be allowed without exceeding the cps value. Division of text for partial transmission MUST then be made at T140block borders. When the transmission rate falls below the cps value again, the transmission intervals SHALL be reset to 330 ms, and transmission of new text SHALL again be made as soon as new text is available ๐ธ.
| NOTE: Extending the transmission intervals during periods of |
|---|
| high load does not change the number of characters to be |
| conveyed. It just evens out the load over time and reduces the |
| number of packets per second. With human-created |
| conversational text, the sending user will eventually take a |
| pause, letting transmission catch up. |
See also Section 8.
For a transmitter not acting as a mixer, the transmission interval principles provided in [RFC4103] apply, and the normal transmission interval SHALL be 300 ms.
3.5. Only One Source per Packet ๐ง
New text and redundant copies of earlier text from one source SHALL be transmitted in the same packet if they're available for transmission at the same time. Text from different sources MUST NOT be transmitted in the same packet ๐ซ.
3.6. Do Not Send Received Text to the Originating Source ๐
Text that a mixer receives from a participant SHOULD NOT be included in transmissions from the mixer to that participant, because for text produced locally, the normal behavior of the endpoint is to present that text directly when it's produced ๐ .
3.7. Clean Incoming Text ๐งน
A mixer SHALL handle reception, recovery from packet loss, deletion of superfluous redundancy, marking of possible text loss, and deletion of BOM characters from each participant before queueing received text for transmission to receiving participants. This works as specified in [RFC4103] for single-party sources and Section 3.16 for multiparty sources (chained mixers) ๐.
3.8. Principles of Redundant Transmission ๐
A transmitting party using redundancy SHALL send redundant repetitions of T140blocks already transmitted in earlier packets.
The number of redundant generations of T140blocks to include in transmitted packets SHALL be deduced from the SDP negotiation. It SHALL be set to the minimum of the number declared by the two parties negotiating a connection. It is RECOMMENDED to declare and transmit one original and two redundant generations of the T140blocks, because this provides good protection against text loss in the case of packet loss and also provides low overhead ๐.
3.9. Text Placement in Packets โจ
okay so the mixer SHALL compose and transmit an RTP packet to a receiver when one or more of these things happen ๐:
- the transmission interval is the normal 330 ms (no matter whether it has passed or not), and there's newly received unsent text ready to go to that receiver ๐ฆ
- the current transmission interval has passed and is longer than the normal 330 ms, and there's newly received unsent text ready to go to that receiver ๐ธ
- the current transmission interval (normally 330 ms) has passed since already-transmitted text was queued for transmission as redundant text ๐
the principles in [RFC4103] apply for filling in the header, the redundancy header, and the data in the packet, as detailed here and in the following sections ๐
at transmission time, the mixer SHALL fill the RTP packet with all T140blocks queued for transmission that came from the source picked for transmission, as long as that doesn't clash with the allowed number of characters per second ("cps") or the maximum packet size. this is how the latency of the latest received text stays low, even when a bunch of sources are typing at the same time ๐โโ๏ธ๐จ
redundant text SHALL also be included, and when you're checking how much new text fits inside the maximum packet size, you MUST account for the fact that the redundancy gets priority to be sent in its entirety. see Section 3.4. ๐
the SSRC of the source SHALL be placed as the only member in the CSRC list ๐
Note: the CSRC list in an RTP packet only includes the participant whose text is in the text blocks. it is NOT the same as the full list of people in a conference. with audio and video, the CSRC list would usually have everyone who isn't muted, but text participants who don't type are totally silent, so they just don't show up in RTP packet CSRC lists ๐คซ
3.10. Empty T140blocks ๐ซง
if no unsent T140blocks were available for a source when the packet was being filled, but already-transmitted T140blocks exist that haven't yet been sent the full intended number of redundant transmissions, then the primary area of the packet holds an empty T140block. it gets included in the packet for transmission without taking up any length. the matching SSRC SHALL be placed as usual in its spot in the CSRC list ๐ง
the first packet in the session, the first one after a source switch, and the first one after a pause SHALL be filled with the available T140blocks for the source chosen to be sent as the primary, plus empty T140blocks for the agreed-upon number of redundancy generations ๐
3.11. Creation of the Redundancy ๐๐
the primary T140block from a source in the latest transmitted packet is saved so it can fill the first redundant T140block for that source in the next transmission of text from that source. the first redundant T140block for that source from the latest transmission is saved so it can fill the second redundant T140block in the next transmission of text from that source ๐
usually, this is the level of redundancy that gets used. if a higher level of redundancy is negotiated, then the procedure SHALL keep going until all the available redundant levels of T140blocks are in the packet. if a receiver has negotiated a lower number of "text/red" generations, then that level SHALL be the maximum the transmitter uses ๐ โโ๏ธ
the T140blocks saved for transmission as redundant data get a planned transmission time of 330 ms after the current time, but they SHOULD be sent earlier if new text for the same source gets picked for transmission before then โฐโจ
3.12. Timer Offset Fields โฑ๏ธ
the timestamp offset values SHALL be inserted in the redundancy header, showing the time offset from the RTP timestamp in the packet when the matching T140block was sent as the primary ๐ฏ
the timestamp offsets are written in the same clock tick units as the RTP timestamp ๐ข
the timestamp offset values for empty T140blocks don't matter, but they SHOULD be given realistic values ๐
3.13. Other RTP Header Fields ๐ฆ
the number of members in the CSRC list (0 or 1) SHALL be placed in the CC header field. only mixers put the value 1 in the CC field. a value of 0 means the source is the transmitting device itself, and that source is shown by the SSRC field. endpoints use this value, and so do mixers sending self-sourced data ๐โโ๏ธ
the current time SHALL be inserted in the timestamp ๐ฐ๏ธ
the SSRC header field SHALL contain the SSRC of the RTP session the packet will be sent in ๐ชช
the M-bit SHALL be handled as specified in [RFC4103] ๐ฉท
3.14. Pause in Transmission ๐ด
when there's no new T140block to send and no redundant T140block that hasn't been retransmitted the intended number of times from any source, the transmission process SHALL stop until either new T140blocks show up or a keep-alive method calls for keep-alive packets to be sent ๐ค
3.15. RTCP Considerations ๐ก
a mixer SHALL send RTCP reports with SDES, CNAME, and NAME information about the sources in the multiparty call. this lets participants make a nice label for text from each source ๐ท๏ธ๐
privacy considerations SHALL be taken into account when composing these fields. they hold name and address info that could be sensitive if it's sent in full, for example to unauthenticated participants. ๐๐ โโ๏ธ
3.16. Reception of Multiparty Contents ๐ฅ
the "text/red" receiver inside an endpoint with presentation functions gets RTP packets as one stream from the mixer, and it SHALL distribute the T140blocks for presentation in the presentation areas for each source ๐ฅ๏ธโจ. other receiver roles, like gateways or chained mixers, are also doable. whether the stream just gets forwarded or gets split up by source is something that must be thought through ๐ง
3.16.1. Acting on the Source of the Packet Contents ๐ฌ
if the CC field value of a received packet is 1, the text is coming from the source named by the single member in the CSRC list, and the receiver MUST act on that source according to its role. if the CC value is 0, the source is in the SSRC field ๐ญ
3.16.2. Detection and Indication of Possible Text Loss ๐ต๏ธโโ๏ธ
the receiver SHALL watch the RTP sequence numbers of received packets for gaps and for packets that arrive out of order. if a sequence number gap shows up and is still there after some set short time for jitter and reordering to sort itself out, the packets in the gap SHALL be treated as lost ๐
if it's known that only one source is active in the RTP session, then a gap equal to or bigger than the agreed-upon number of redundancy generations (counting the primary) probably causes text loss. in that case, the receiver SHALL create a T140block with a marker for possible text loss [T140ad1], link it to the source, and put it in the reception buffer for that source ๐จ
if it's known that more than one source is active in the RTP session, then it's generally not possible to figure out whether text was lost when packets were lost. with two active sources and the recommended number of redundancy generations (one original and two redundant), it can take a gap of five consecutive lost packets before any text may be lost. but text loss can also show up if three non-consecutive packets are lost when they held consecutive data from the same source. a simple way to decide when there's a risk of text loss is to check whether three or more packets were lost within one second. if you use this simple method, a T140block SHOULD be created with a marker for possible text loss [T140ad1] and associated with the SSRC of the RTP session as a general input from the mixer ๐ข
implementations MAY use more refined methods to detect more reliably whether text was lost. any refined method SHOULD prefer marking possible loss over not marking it when it's unsure whether there was loss ๐ก๏ธ๐
3.16.3. Extracting Text and Handling Recovery ๐งฉ
when you apply the following procedures, the effects of possible timestamp wraparound and of the RTP session possibly changing the SSRC MUST be considered ๐
when a packet arrives in an RTP session that uses the packetization for multiparty-aware endpoints, its T140blocks SHALL be extracted as described below ๐ฌ
the source SHALL be taken from the CSRC list if it's there, and otherwise from the SSRC ๐ฏ
if the received packet is the first packet from that source, then all T140blocks in the packet SHALL be retrieved and assigned to a receive buffer for that source. they go in starting with the oldest available redundant generation, then the younger redundant generations in age order, and finally the primary ๐ฅ
Note: the normal case is that in the first packet, only the primary data has contents. the redundant data only has contents in the first received packet from a source after some initial packet loss.
if the packet is NOT the first packet from a source, then, if redundant data is available, the process SHALL start with the oldest generation. the timestamp of that redundant data SHALL be created by subtracting its timestamp offset from the RTP timestamp. if the resulting timestamp is later than the latest retrieved data from the same source, then the redundant data SHALL be retrieved and appended to the receive buffer. the process SHALL keep going the same way for all the younger generations of redundant data. after that, the timestamp of the packet SHALL be compared with the timestamp of the latest retrieved data from the same source, and if it's later, then the primary data SHALL be retrieved from the packet and appended to the receive buffer for that source ๐ฐ
Correction for the record: the procedure above has "NOT" in capitals, but in the original RFC that word is written as "not" in the prose, so the emphasis is only mine ๐
3.16.4. Delete BOM ๐งน
the Unicode BOM character is used as a start indication, and it's sometimes used as a filler or keep-alive by transmission implementations. any BOM characters SHALL be deleted after extraction from received packets ๐ซง
3.17. Performance Considerations ๐๏ธ
this solution has good performance with low text delays, as long as the mean number of characters per second sent during any 10-second interval from a bunch of participants sending at once to one receiving participant doesn't reach the "cps" value. at higher numbers of characters per second, the presentation of text gets jerky ๐ญ. so it's a good fit for emergency service use, relay service use, and small or well-managed bigger multimedia conferences ๐๐. in large unmanaged conferences with lots of participants, situations where many people happen to send text at the same moment can come up, but only very rarely. when that happens, the presentation of text from each sending participant can get unpleasantly jerky ๐ฅด. it should be noted that only the number of users sending text at the same moment causes jerkiness, not the total number of users with real-time text capability ๐โจ
3.18. Security for Session Control and Media โจ
okay bestie, security is a whole vibe ๐๐ Security mechanisms for confidentiality, integrity protection, and peer authentication SHOULD be applied when possible, depending on what the participating devices can handle. The default is SIP over TLS on the session control level, per Section 3.1.3 of [RFC5630], and DTLS-SRTP [RFC5764] at the media level. If legacy endpoints without security are allowed in your app, a negotiation SHOULD happen to decide whether media-level encryption gets applied ๐ If no other security solution is mandated for the app, then the Opportunistic Secure Real-time Transport Protocol (OSRTP) [RFC8643] is a super suitable way to negotiate SRTP media security with DTLS ๐ฆ Most of the SDP examples below leave out the security stuff to keep things simple, but a couple of them show the main ideas for DTLS-SRTP security [RFC5764] (not every detail, sorry bestie).
More general security considerations are in Section 10 ๐ซถ
End-to-end encryption would need more work ๐ญ It could be based on WebRTC, as specified in Section 1.2, or on double encryption, as specified in [RFC8723]. Literally a whole other chapter.
3.19. SDP Offer/Answer Examples ๐
this section shows some SDP examples for negotiating real-time text media in SIP sessions ๐ Audio is usually in the same session, and sometimes video too. The examples only show the bits that matter for real-time text, and they cover single RTP stream mixing for both multiparty-aware and multiparty-unaware endpoints.
๐ Note: Multiparty real-time text MAY also be provided through other methods, e.g., by a Selective Forwarding Middlebox (SFM). In that case, the SDP of the offer will include something specific for that method, e.g., an SDP attribute or another media format. An answer selecting the use of that method would accept it via a corresponding acknowledgement included in the SDP. The offer may also contain the "rtt-mixer" SDP media attribute for the main real-time text media when the offerer has this capability for both multiparty methods, while an answer, choosing to use SFM, will not include the "rtt-mixer" SDP media attribute.
Offer example for the "text/red" format, multiparty support, and capability for 90 characters per second ๐
m=text 11000 RTP/AVP 100 98
a=rtpmap:98 t140/1000
a=fmtp:98 cps=90
a=rtpmap:100 red/1000
a=fmtp:100 98/98/98
a=rtt-mixer
Answer example from a multiparty-aware device ๐ง
m=text 14000 RTP/AVP 100 98
a=rtpmap:98 t140/1000
a=fmtp:98 cps=90
a=rtpmap:100 red/1000
a=fmtp:100 98/98/98
a=rtt-mixer
Offer example for the "text/red" format, including multiparty and security ๐ฅ
a=fingerprint: (fingerprint1)
m=text 11000 RTP/AVP 100 98
a=rtpmap:98 t140/1000
a=rtpmap:100 red/1000
a=fmtp:100 98/98/98
a=rtt-mixer
The "fingerprint" is enough to offer DTLS-SRTP, and the media line still says RTP/AVP โจ
๐ Note: For brevity, the entire value of the SDP "fingerprint" attribute is not shown in this and the following example.
Answer example from a multiparty-aware device with security ๐
a=fingerprint: (fingerprint2)
m=text 16000 RTP/AVP 100 98
a=rtpmap:98 t140/1000
a=rtpmap:100 red/1000
a=fmtp:100 98/98/98
a=rtt-mixer
With the "fingerprint", the device acknowledges that it's using DTLS-SRTP ๐ฆ
Answer example from a multiparty-unaware device that also does not support security ๐ธ
m=text 12000 RTP/AVP 100 98
a=rtpmap:98 t140/1000
a=rtpmap:100 red/1000
a=fmtp:100 98/98/98
3.20. Packet Sequence Example from Interleaved Transmission ๐
this example is a symbolic flow of packets from a mixer, with loss and recovery ๐ญ It's interleaved transmission of text from two real-time text sources, A and B. P means primary data. R1 is the first redundant generation of data, and R2 is the second. A1, B1, A2, etc. are text chunks (T140blocks) that come in from the respective sources and get sent on to the receiver by the mixer. X means a dropped packet between the mixer and a receiver. The session is assumed to use the original data and two redundant generations of real-time text โจ
|-----------------------|
|Seq no 101, Time=20400 |
|CC=1 |
|CSRC list A |
|R2: A1, Offset=600 |
|R1: A2, Offset=300 |
|P: A3 |
|-----------------------|
Okay so, assuming the earlier packets (with text A1 and A2) came in in order, text A3 is received from packet 101 and goes into reception buffer A ๐ The mixer is now assumed to have gotten initial text from source B 100 ms after packet 101, and it'll send that text. Sending A2 and A3 as redundancy is planned for 330 ms after packet 101, if no new text from A is ready before that.
|-----------------------|
|Seq no 102, Time=20500 |
|CC=1 |
|CSRC list B |
|R2 Empty, Offset=600 |
|R1: Empty, Offset=300 |
|P: B1 |
|-----------------------|
Packet 102 is received ๐ซถ
B1 is pulled out of this packet. Redundant transmission of B1 is planned for 330 ms after packet 102.
X------------------------|
X Seq no 103, Timer=20730|
X CC=1 |
X CSRC list A |
X R2: A2, Offset=630 |
X R1: A3, Offset=330 |
X P: Empty |
X------------------------|
Packet 103 is assumed lost because of network problems ๐ It has redundancy for A. Sending A3 as second-level redundancy is planned for 330 ms after packet 103.
X------------------------|
X Seq no 104, Timer=20800|
X CC=1 |
X CSRC list B |
X R2: Empty, Offset=600 |
X R1: B1, Offset=300 |
X P: B2 |
X------------------------|
Packet 104 has text from B, including the new B2 and redundant B1. It's assumed dropped because of network problems too ๐ญ
The mixer still has A3 redundancy to send, but no new text shows up from A, so the redundancy goes out 330 ms after the previous packet that had text from A.
|------------------------|
| Seq no 105, Timer=21060|
| CC=1 |
| CSRC list A |
| R2: A3, Offset=660 |
| R1: Empty, Offset=330 |
| P: Empty |
|------------------------|
Packet 105 is received ๐ฆ
A gap for lost packets 103 and 104 is detected. Assume no other loss was detected during the last second. Then it can be concluded that nothing was totally lost.
R2 gets checked. Its original time was 21060-660=20400. A packet with text from A was received with that timestamp, so nothing needs to be recovered โจ
B1 and B2 still need to go out as redundancy. This is planned for 330 ms after packet 104, which would be at 21130.
|-----------------------|
|Seq no 106, Timer=21130|
|CC=1 |
|CSRC list B |
| R2: B1, Offset=630 |
| R1: B2, Offset=330 |
| P: Empty |
|-----------------------|
Packet 106 is received ๐
The second-level redundancy in packet 106 is B1, with a timestamp offset of 630 ms. The timestamp of packet 106 minus 630 is 20500, which is the timestamp of packet 102 that was received. So B1 does not need to be retrieved. The first-level redundancy in packet 106 has an offset of 330. The timestamp of packet 106 minus 330 is 20800, which is later than the latest received packet with source B. So B2 gets retrieved and assigned to the input buffer for source B. There's no primary in packet 106.
After all that, A3, B1, and B2 have been received, and no text was lost ๐
3.21. Maximum Character Rate "cps" Setting ๐
the default max rate for receiving "text/t140" real-time text, as set out in [RFC4103], is 30 characters per second. The actual rate is worked out without counting any redundant text transmission. In the multiparty case, it's evaluated across all sources sending to a receiver ๐งฎ The value MAY be changed with the "cps" parameter of the "fmtp" attribute for the "text/t140" format of the "text" media section.
A mixer that combines real-time text from a bunch of sources may sometimes get a higher combined flow of text ๐ณ So endpoints SHOULD include a suitable higher value for the "cps" parameter, matching what they can actually receive. The default of 30 is fine for small meetings and well-managed bigger conferences where users only type by hand. A "cps" value of 90 can work even for large unmanaged conferences and for cases where speech-to-text is used for entry. Modern receivers can hit that rate too, so 90 is the RECOMMENDED "cps" value ๐ See [RFC4103] for the format and use of the "cps" parameter. The same rules apply in the multiparty case.
4. Presentation-Level Considerations โจ
"Protocol for multimedia application text conversation" [T140] lays out the presentation-level requirements for RTP transport, as described in [RFC4103] ๐ Functions for erasure and other formatting are specified in [T140], which has this general statement about presentation:
"The display of text from the members of the conversation should be arranged so that the text from each participant is clearly readable, and its source and the relative timing of entered text is visualized in the display. Mechanisms for looking back in the contents from the current session should be provided. The text should be displayed as soon as it is received."
Strictly applying [T140] is essential for real-time text implementations to interoperate ๐ซถ It's also how session participants end up with the same information in the conversation text, even if their layouts look different.
[T140] specifies a set of presentation control codes (Section 4.2.4) to include in the stream. Some of them are optional. Implementations MUST ignore optional control codes they don't support ๐
Real-time text has no strict "message" concept ๐ The Unicode Line Separator character SHALL be used as a separator, so a part of received text can be grouped into a presentation. Other implementations may use the character combination "CRLF" as a replacement for the Line Separator. The "CRLF" combination SHALL be erased by just one erasing action, same as the Line Separator. Presentation functions can group text into smaller groups than the Line Separators imply, and show those groups with a source indication next to text groups from other sources (see the presentation examples that follow). Erasure isn't limited by any delimiter in the text stream ๐ธ
4.1. Presentation by Multiparty-Aware Endpoints โจ
okay bestie, a receiving party that's multiparty-aware ๐ MUST separate text from each source and put it in its own presentation field. no mixing the tea ๐ต. It MAY also split a source's text into readable groups using things other than a Line Separator, then merge those groups in the presentation area when that helps the user find and read each person's text ๐ง. The criteria MAY be a received comma, a full stop, some other kind of phrase delimiter, or a long pause โญ.
When text comes in from multiple original sources, the presentation SHALL provide a view where text gets added across multiple presentation fields ๐ฆ.
If everything lands in one shared area, the presenting endpoint SHOULD insert the local user's text at suitable points, so it merges properly with the received text and shows roughly when each group was finished ๐ฐ๏ธ. In this mode, the receiving endpoint SHALL present the source of each group of text. This is the "chat" style here. It lets you follow text from several people and get the approximate relative timing of what arrived compared to your own text ๐ฌ.
Here's a three-party real-time text call in chat style ๐:
_________________________________________________
| |^|
|[Alice] Hi, Alice here. |-|
| | |
|[Bob] Bob as well. | |
| | |
|[Eve] Hi, this is Eve, calling from Paris. | |
| I thought you should be here. | |
| | |
|[Alice] I am coming on Thursday, my | |
| performance is not until Friday morning.| |
| | |
|[Bob] And I on Wednesday evening. | |
| | |
|[Alice] Can we meet on Thursday evening? | |
| | |
|[Eve] Yes, definitely. How about 7pm. | |
| at the entrance of the restaurant | |
| Le Lion Blanc? | |
|[Eve] we can have dinner and then take a walk |-|
|______________________________________________|v|
| <Eve-typing> But I need to be back to |^|
| the hotel by 11 because I need |-|
| | |
| <Bob-typing> I wou |-|
|______________________________________________|v|
| of course, I underst |
|________________________________________________|
Figure 1: Example of a Three-Party Real-Time Text Call Presented in Chat Style Seen at Participant Alice's Endpoint
Presentation styles other than the chat style MAY be arranged. ๐ธ
Figure 2 shows how a coordinated column view MAY be presented. ๐
_____________________________________________________________________
| Bob | Eve | Alice |
|____________________|______________________|_______________________|
| | |I will arrive by TGV. |
|My flight is to Orly| |Convenient to the main |
| |Hi all, can we plan |station. |
| |for the seminar? | |
|Eve, will you do | | |
|your presentation on| | |
|Friday? |Yes, Friday at 10. | |
|Fine, wo | |We need to meet befo |
|___________________________________________________________________|
Figure 2: An Example of a Coordinated Column View of a Three-Party Session with Entries Ordered Vertically in Approximate Time Order
4.2. Multiparty Mixing for Multiparty-Unaware Endpoints ๐
okay this one's for the endpoints that don't speak multiparty yet ๐ฅบ. When the mixer has indicated multiparty real-time text capability in an SDP negotiation, but the multiparty capability negotiation fails with an endpoint, the agreed-upon text/red or text/t140 format SHALL be used. The mixer SHOULD compose a best-effort presentation of multiparty real-time text in one stream, meant to be presented by an endpoint with no multiparty awareness, when that's what the actual implementation wants. The following specifies a procedure that MAY be applied in that situation. ๐
This presentation format has functional limitations ๐ญ and SHOULD be used only to let legacy deployed endpoints join multiparty calls. Those endpoints only implement RFC 4103, without any multiparty extensions specified in this document.
The principles and procedures below don't specify any new protocol elements ๐. They're composed from information in [T140] plus a big ambition to give a best-effort presentation on an endpoint that was originally built only for two-party calls.
The mixer doing the mixing for multiparty-unaware endpoints SHALL compose a simulated, limited multiparty real-time text view that's suitable for presentation in one presentation area. It SHALL group text into suitable groups and prepare them for presentation by inserting a Line Separator between them, if the transmitted text didn't already end with a new line (Line Separator or CRLF). A presentable label SHALL be composed and sent for the source initially in the session and after each source switch. With this procedure, how long it takes to switch from one source's text to another's depends on what the users do ๐ฐ๏ธ. To speed up source switching, a user can, for example, end their turn with a new line ๐.
4.2.1. Actions by the Mixer at Reception from the Call Participants
When the mixer receives text from the different participants, the mixer SHALL recover text from redundancy if any packets are lost ๐. The marker for lost text [T140ad1] SHALL be inserted in the stream if unrecoverable loss appears ๐จ. Any Unicode BOM characters, possibly used for keep-alives, SHALL be deleted ๐งน. The time of creation of text (retrieved from the RTP timestamp) SHALL be stored together with the received text from each source in queues for transmission to the recipients, so text loss can be evaluated โฑ๏ธ.
4.2.2. Actions by the Mixer for Transmission to the Recipients
The following procedure SHALL be applied for each multiparty-unaware recipient of multiparty text from the mixer ๐.
The text for transmission SHALL be formatted by the mixer for each receiving user, for presentation in one single presentation area. Text received from a participant SHOULD NOT be included in transmissions to that participant, because it's usually presented locally at transmission time ๐. When there's text available for transmission to a receiving party from more than one participant, the mixer SHALL switch between transmitting text from the different sources at suitable points in the transmitted stream ๐.
When switching the source, the mixer SHALL insert a Line Separator if the already-transmitted text didn't end with a new line (Line Separator or CRLF) ๐ช. A label SHALL be composed from information in the CNAME and NAME fields in RTCP reports from the participant whose text is being transmitted, or from other session information for that user. The label SHALL be delimited by suitable characters (e.g., "[ ]") and transmitted. The CSRC SHALL indicate the selected source ๐ท๏ธ. Then, text from that selected participant SHALL be transmitted until a new suitable point for switching the source is reached ๐.
Heads up: the information the mixer can use for the label may contain sensitive personal information. That info SHOULD NOT be revealed in sessions that aren't securely authenticated and confidentiality protected ๐. Privacy considerations about how much personal information goes into the label SHOULD therefore be taken when composing it ๐ซถ.
Seeking a suitable point for switching the source SHALL be done when there's older text waiting for transmission from any party than the age of the last transmitted text โณ. Suitable points for switching are:
- A completed phrase ending with a comma.
- A completed sentence.
- A new line (Line Separator or CRLF).
- A long pause (e.g., > 10 seconds) in received text from the currently transmitted source.
- If text from one participant has been transmitted while text from other sources has been waiting for transmission for a long time (e.g., > 1 minute), and none of the other suitable points for switching has occurred, a source switch MAY be forced by the mixer at the next word delimiter. This also applies even if a word delimiter doesn't occur within some period of time (e.g., 15 seconds) after the scan for a word delimiter started ๐โโ๏ธ.
When switching the source, the source that has the oldest text in queue SHALL be selected to be transmitted ๐. A character display count SHALL be maintained for the currently transmitted source, starting at zero after the label is transmitted for that source ๐ข.
The status SHALL be maintained for the latest control code for Select Graphic Rendition (SGR) from each source ๐จ. If there's an SGR code stored as the status for the current source before the source switch is done, a reset of SGR SHALL be sent by the sequence SGR 0 [U+009B U+0000 U+006D] after the new line and before the new label during a source switch. See Section 4.2.4 for an explanation. This transmission doesn't influence the display count โจ.
If there's an SGR code stored for the new source after the source switch, that SGR code SHALL be transmitted to the recipient before the label. This transmission doesn't influence the display count ๐.
4.2.3. Actions on Transmission of Text
Text from a source sent to the recipient SHALL increase the display count by one per transmitted character ๐ข๐.
4.2.4. Actions on Transmission of Control Codes โจ
Okay, bestie, these control codes come from T.140 [T140] and they're picky. Each one SHALL trigger specific stuff in the mixer ๐ . Heads up: the codes are written in UTF-16 here, but what actually goes over the wire is the UTF-8 encoding of them ๐ซถ.
- BEL (
U+0007): Bell. Alert in session ๐. It's for getting someone's attention during an active session. The display count SHALL NOT be altered. - NEW LINE (
U+2028): Line Separator ๐ธ. Check and perform a source switch if appropriate, then increase the display count by 1. - CR LF (
U+000D U+000A): Supported, but not preferred, way of requesting a new line ๐. Check and perform a source switch if appropriate, then increase the display count by 1. - INT (
ESC U+0061): Interrupt, used to start the mode negotiation procedure ๐ง. The display count SHALL NOT be altered. - SGR (
U+009B Ps U+006D): Select Graphic Rendition ๐.Psstands for the rendition parameters defined in [ISO6429]. (For freely available equivalent info, check out [ECMA-48].) The display count SHALL NOT be altered. The SGR code SHOULD be stored for the current source. - SOS (
U+0098): Start of String. It's a general protocol element introducer ๐, followed by a maximum 256-byte string and then the ST. The display count SHALL NOT be altered. - ST (
U+009C): String Terminator. This is the end of an SOS string ๐ฆ. The display count SHALL NOT be altered. - ESC (
U+001B): Escape, used in control strings ๐. The display count SHALL NOT be altered for the complete escape code. - Byte order mark (BOM) (
U+FEFF): "Zero width no-break space" ๐ซง. It's used for synchronization and keep-alive. It SHALL be deleted from incoming streams. It SHALL also be sent first to the recipient after session establishment. The display count SHALL NOT be altered. - Missing text mark (
U+FFFD): "Replacement character" โ. It's shown as a question mark in a rhombus or, if that's not feasible, replaced by an apostrophe ('). It marks the spot in the stream where text might have been lost. This mark SHALL be inserted by the reception procedure when packets are unrecoverably lost. The display count SHALL be increased by one when sent, just like any other character. - SGR (again, the status part) ๐งพ: If an SGR control code other than a reset of the graphic rendition (SGR 0) is sent to a recipient, that control code SHALL also be stored as the status for the source in the SGR status storage. If a reset graphic rendition (SGR 0) originating from a source is sent, then the SGR status storage for that source SHALL be cleared. The display count SHALL NOT be increased.
- BS (
U+0008): "Back Space" ๐ญ. It's meant to erase the last character a source entered, but erasing with backspace doesn't always go the way the eraser intended. If an erasing action wipes out all text up to the end of the leading label after a source switch, then the mixer MUST NOT transmit more backspaces. Instead, it is RECOMMENDED that a letter "X" be inserted in the text stream for each backspace, as a way of saying "I want to erase more" ๐. A new line is usually coded by a Line Separator, but the character combination "CRLF" MAY be used instead. Erasing a new line takes just one erasing action (backspace) either way. If the display count has a positive value, it SHALL be decreased by one when the BS is sent. If the display count is at zero, it SHALL NOT be altered.
4.2.5. Packet Transmission ๐ฆ
Okay, this one's simple but important ๐. A mixer sending to a multiparty-unaware endpoint SHALL send primary data from only one source per packet. The SSRC SHALL be the SSRC of the mixer. The CSRC list MAY contain one member, and that member can be the SSRC of the source of the primary data.
4.2.6. Functional Limitations ๐ฅฒ
Real talk, this section is kind of the "ugh, here's what goes wrong" part. When a multiparty-unaware endpoint shows a conversation in one display area in chat style, it adds source indications for remote text and local user text as they get merged into completed text groups. When an endpoint using this layout receives and shows text that was mixed for multiparty-unaware endpoints, there are two levels of source indicators for the received text. One is generated by the mixer and inserted in a label after each source switch. The other is generated by the receiving endpoint and inserted after each switch between the local source and the remote source in the presentation area. This wastes display space and looks inconsistent to the reader ๐ค.
New text can be presented from only one source at a time ๐. Switching the source being presented happens at suitable places in the text, like the end of a phrase, the end of a sentence, a Line Separator, or when inactivity is detected. So the time to switch to present waiting text from other sources may get long, and it varies depending on what the currently presented source is doing.
Erasure can only be done up to the latest source switch. If a user tries to erase more text, the erasing actions will show up as a letter "X" after the label ๐ซ . Also, text loss from network errors may hit the label between entries from different parties, which risks a misunderstanding about which source provided a piece of text.
Because of all this, it is strongly RECOMMENDED that multiparty awareness be implemented in real-time text endpoints ๐. Using the mixing method for multiparty-unaware endpoints should be left for endpoints that are impossible to upgrade to become multiparty aware.
4.2.7. Example Views of Presentation on Multiparty-Unaware Endpoints ๐ผ๏ธ
These pictures show what a participant's display looks like in the multiparty-unaware case. Ready? Let's go ๐.
Figure 3 shows how a coordinated column view MAY be presented on Alice's device, in a view with two columns. The mixer inserts labels to show how the sources alternate in the column with received text. The mixer alternates between the sources at suitable points in the text exchange, so text entries from each party can be read comfortably ๐.
___________________________________________________
| Conference | Alice |
|_________________________|_________________________|
| |I will arrive by TGV. |
|[Bob]: My flight is to |Convenient to the main |
|Orly. |station. |
|[Eve]: Hi all, can we | |
|plan for the seminar. | |
| | |
|[Bob]: Eve, will you do | |
|your presentation on | |
|Friday? | |
|[Eve]: Yes, Friday at 10.| |
|[Bob]: Fine, wo |We need to meet befo |
|_________________________|_________________________|
Figure 3: Alice, Who Has a Conference-Unaware Client, Is Receiving the Multiparty Real-Time Text in a Single Stream
In Figure 4, receiving applications traditionally include a label showing the source of the text, shown here with parentheses "()". The mixer also inserts source labels for the multiparty call participants, shown here with brackets "[]" ๐.
_________________________________________________
| |^|
|(Alice) Hi, Alice here. |-|
| | |
|(mix)[Bob] Bob as well. | |
| | |
|[Eve] Hi, this is Eve, calling from Paris | |
| I thought you should be here. | |
| | |
|(Alice) I am coming on Thursday, my | |
| performance is not until Friday morning.| |
| | |
|(mix)[Bob] And I on Wednesday evening. | |
| | |
|[Eve] we can have dinner and then walk | |
| | |
|[Eve] But I need to be back to | |
| the hotel by 11 because I need | |
| |-|
|______________________________________________|v|
| of course, I underst |
|________________________________________________|
Figure 4: An Example of a View of the Multiparty-Unaware Presentation in Chat Style, Where Alice Is the Local User
5. Relationship to Conference Control ๐ค
5.1. Use with SIP Centralized Conferencing Framework ๐
The Session Initiation Protocol (SIP) conferencing framework, mainly specified in [RFC4353], [RFC4579], and [RFC4575], is a good fit for coordinating sessions, including multiparty real-time text ๐. The real-time text stream between the mixer and a participant stays the same throughout the conference. Participants get announced by notifications when they join or leave, and more user info may be provided too. The SSRC of the text to expect from joined users MAY be included in a notification. Notifications MAY be used for security purposes and for translating into a label for other users to see ๐.
5.2. Conference Control ๐๏ธ
In managed conferences, control of the real-time text media SHOULD be provided in the same way as for other media, e.g., for muting and unmuting by the direction attributes in SDP [RFC8866].
Floor control functions may be valuable for real-time text users as well as for users of other media in a conference ๐.
6. Gateway Considerations ๐
Multiparty real-time text sessions may involve different kinds of gateways. Gateways involved in setting up sessions SHALL correctly reflect the multiparty capability or unawareness of the combination of the gateway and the remote endpoint beyond the gateway โจ.
6.1. Gateway Considerations with Textphones ๐
One case that may come up is a gateway to the Public Switched Telephone Network (PSTN) for communicating with textphones (e.g., TTYs). Textphones are limited devices with no multiparty awareness, so it SHOULD therefore be appropriate for the gateway to not indicate multiparty awareness in that case. Another option is for the gateway to indicate multiparty capability toward the mixer and include the multiparty mixer function for multiparty-unaware endpoints itself. This option makes it possible to adapt to the functional limitations of the textphone ๐ง.
More information on gateways to textphones is found in [RFC5194] ๐ .
6.2. Gateway Considerations with WebRTC
okay bestie, gateways between RTP-mixer real-time text and WebRTC real-time text might be needed too ๐ WebRTC's real-time text transport is specified in [RFC8865] โจ
A multiparty bridge can handle real-time text in both (1) RTP streams with real-time text and (2) WebRTC T.140 data channels ๐ฆ Other setups are a bridge that only does one of the two technologies, plus a separate gateway that converts the text streams between RTP and T.140 data channels ๐ง
In WebRTC, a multiparty session assumes one T.140 data channel for each source, going from a gateway or bridge to each participant ๐ธ Each participant also has a data channel with a two-way connection to the gateway or bridge ๐ซถ
The two-way T.140 data channel carries text from the WebRTC user, and also text from the bridge or gateway itself to that user ๐ The label parameter of this channel is used as the NAME field in RTCP for participants on the RTP side ๐ The other T.140 data channels only carry text from other participants to the WebRTC user ๐
When a new participant joins with RTP transport of real-time text, a new T.140 data channel SHOULD be set up for WebRTC users. Its label parameter gets built from information in the NAME field of the RTCP on the RTP side ๐
When a new participant joins the multiparty session with real-time text over a WebRTC T.140 data channel, the new participant SHOULD be announced to RTP users with a notification ๐ฃ The label parameter from the WebRTC side, or other suitable information from the session or stream establishment procedure, SHOULD be used to build the NAME RTCP field on the RTP side โจ
When a participant on the RTP side leaves the multiparty session, the matching T.140 data channel(s) SHOULD be closed ๐ช
When a WebRTC user of T.140 data channels disconnects from the mixer, the matching RTP streams or sources in an RTP-mixed stream SHOULD be closed ๐
T.140 data channels MAY be opened and closed by negotiation or renegotiation of the session, or by any other valid means, as specified in Section 1 of [RFC8865] ๐ฆ
7. Updates to RFC 4103
This document updates [RFC4103] ๐ It introduces an SDP media attribute called "rtt-mixer" so endpoints can negotiate multiparty-mixing capability, using the format described in [RFC4103]. It also spells out the rules for packets when multiparty capability is negotiated and in use ๐
8. Congestion Considerations
The congestion considerations and recommended actions in [RFC4103] are also valid in multiparty situations โจ
The time values SHALL then be applied per source of text sent to a receiver ๐ง
Okay so, in the very unlikely event that lots of participants send text at the same time for a long stretch, a delay can build up before the text shows on the receivers' screens, if the limit in characters per second ("cps") sent to participants gets exceeded ๐ญ A delay of more than 15 seconds can cause confusion in the session ๐ So it is RECOMMENDED that an RTP mixer discard the text causing those excessive delays, and insert a general indication of possible text loss [T140ad1] in the session ๐ If the main text contributor is indicated in any way, the mixer MAY avoid deleting text from that participant ๐ซถ Still, human text creation usually has pauses where the transmission can catch up, so transmission-overload situations are expected to be very rare ๐ธ
9. IANA Considerations
9.1. Registration of the "rtt-mixer" SDP Media Attribute
IANA has registered the new SDP attribute "rtt-mixer" ๐ Here are the registration details:
Contact name: IESG
Contact email: iesg@ietf.org
Attribute name: rtt-mixer
Attribute semantics: See RFC 9071, Section 2.3
Attribute value: none
Usage level: media
Purpose: To indicate mixer and endpoint support of multiparty mixing
for real-time text transmission, using a common RTP stream for
transmission of text from a number of sources mixed with one
source at a time and where the source is indicated in a single
CSRC-list member.
Charset Dependent: no
O/A procedures: See RFC 9071, Section 2.3
Mux Category: NORMAL
Reference: RFC 9071
10. Security Considerations
Okay, this part is seriously important, bestie ๐จ The RTP-mixer model requires the mixer to be allowed to decrypt, pack, and encrypt secured text from conference participants ๐ So the mixer needs to be trusted to keep the real-time text data confidential and intact ๐ก๏ธ It's basically the same situation as handling audio and video media in centralized mixers ๐ง
The requirement to send information about the user in RTCP reports (in SDES, CNAME, and NAME fields) and in conference notifications may cause privacy concerns, as RFC 3550 [RFC3550] already said. It may also be restricted for privacy reasons ๐ When it's used to make readable labels in the presentation, the receiving user just gets a more symbolic label for the source ๐ฆ
The services available through the real-time text mixer may be of special interest to deaf and hard-of-hearing individuals ๐ Some users may want to keep those characteristics on the down-low in conferences ๐คซ Conference systems that include the mixer MAY need to be designed with the confidentiality of such characteristics in mind ๐ซถ
Participants with malicious intentions may show up and, for example, disrupt the multiparty session by emitting a continuous flow of text ๐ค They may also send text that appears to come from other participants ๐ Countermeasures should include requiring secure signaling, media, and authentication, and providing higher-layer conference functions, such as blocking, muting, and expelling participants ๐ซ
Participants with malicious intentions may also try to mess up the presentation by sending incomplete or malformed control codes ๐ So handling of text from the different sources by the receivers MUST be well separated, so the effects of such actions only hit text from the source that caused the action ๐งฑ
Care should be taken to avoid attacks by unauthenticated call participants, and even eavesdropping and manipulation of content by non-participants, if the mixer is allowed for users both with and without security procedures ๐จ
As already stated in Section 3.18, security in media SHOULD be applied by using DTLS-SRTP [RFC5764] at the media level ๐
Further security considerations specific to this application are specified in Section 3.18 ๐ง
11. References
11.1. Normative References
Here's the full reference list, exactly as written ๐
[ECMA-48] Ecma International, "ECMA-48: Control functions for coded
character sets", 5th edition, June 1991,
<https://www.ecma-international.org/publications-and-
standards/standards/ecma-48/>.
[ISO6429] ISO/IEC, "Information technology - Control functions for
coded character sets", ISO/IEC ISO/IEC 6429:1992, December
1992, <https://www.iso.org/obp/ui/#iso:std:iso-
iec:6429:ed-3:v1:en>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V.
Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550,
July 2003, <https://www.rfc-editor.org/info/rfc3550>.
[RFC4102] Jones, P., "Registration of the text/red MIME Sub-Type",
RFC 4102, DOI 10.17487/RFC4102, June 2005,
<https://www.rfc-editor.org/info/rfc4102>.
[RFC4103] Hellstrom, G. and P. Jones, "RTP Payload for Text
Conversation", RFC 4103, DOI 10.17487/RFC4103, June 2005,
<https://www.rfc-editor.org/info/rfc4103>.
[RFC5630] Audet, F., "The Use of the SIPS URI Scheme in the Session
Initiation Protocol (SIP)", RFC 5630,
DOI 10.17487/RFC5630, October 2009,
<https://www.rfc-editor.org/info/rfc5630>.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
Security (DTLS) Extension to Establish Keys for the Secure
Real-time Transport Protocol (SRTP)", RFC 5764,
DOI 10.17487/RFC5764, May 2010,
<https://www.rfc-editor.org/info/rfc5764>.
[RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for
Keeping Alive the NAT Mappings Associated with RTP / RTP
Control Protocol (RTCP) Flows", RFC 6263,
DOI 10.17487/RFC6263, June 2011,
<https://www.rfc-editor.org/info/rfc6263>.
[RFC7675] Perumal, M., Wing, D., Ravindranath, R., Reddy, T., and M.
Thomson, "Session Traversal Utilities for NAT (STUN) Usage
for Consent Freshness", RFC 7675, DOI 10.17487/RFC7675,
October 2015, <https://www.rfc-editor.org/info/rfc7675>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8865] Holmberg, C. and G. Hellstrรถm, "T.140 Real-Time Text
Conversation over WebRTC Data Channels", RFC 8865,
DOI 10.17487/RFC8865, January 2021,
<https://www.rfc-editor.org/info/rfc8865>.
[RFC8866] Begen, A., Kyzivat, P., Perkins, C., and M. Handley, "SDP:
Session Description Protocol", RFC 8866,
DOI 10.17487/RFC8866, January 2021,
<https://www.rfc-editor.org/info/rfc8866>.
[T140] ITU-T, "Protocol for multimedia application text
conversation", ITU-T Recommendation T.140, February 1998,
<https://www.itu.int/rec/T-REC-T.140-199802-I/en>.
[T140ad1] ITU-T, "Recommendation T.140 Addendum", February 2000,
<https://www.itu.int/rec/T-REC-T.140-200002-I!Add1/en>.
11.2. Informative References
Okay bestie, these are the extra reads that back everything up ๐โจ
[RFC4353]Rosenberg, J., "A Framework for Conferencing with the Session Initiation Protocol (SIP)", RFC 4353, DOI 10.17487/RFC4353, February 2006, <https://www.rfc-editor.org/info/rfc4353>. ๐[RFC4575]Rosenberg, J., Schulzrinne, H., and O. Levin, Ed., "A Session Initiation Protocol (SIP) Event Package for Conference State", RFC 4575, DOI 10.17487/RFC4575, August 2006, <https://www.rfc-editor.org/info/rfc4575>. ๐ฆ[RFC4579]Johnston, A. and O. Levin, "Session Initiation Protocol (SIP) Call Control - Conferencing for User Agents", BCP 119, RFC 4579, DOI 10.17487/RFC4579, August 2006, <https://www.rfc-editor.org/info/rfc4579>. ๐[RFC5194]van Wijk, A., Ed. and G. Gybels, Ed., "Framework for Real-Time Text over IP Using the Session Initiation Protocol (SIP)", RFC 5194, DOI 10.17487/RFC5194, June 2008, <https://www.rfc-editor.org/info/rfc5194>. ๐ธ[RFC7667]Westerlund, M. and S. Wenger, "RTP Topologies", RFC 7667, DOI 10.17487/RFC7667, November 2015, <https://www.rfc-editor.org/info/rfc7667>. ๐ง[RFC8643]Johnston, A., Aboba, B., Hutton, A., Jesske, R., and T. Stach, "An Opportunistic Approach for Secure Real-time Transport Protocol (OSRTP)", RFC 8643, DOI 10.17487/RFC8643, August 2019, <https://www.rfc-editor.org/info/rfc8643>. ๐ฅ[RFC8723]Jennings, C., Jones, P., Barnes, R., and A.B. Roach, "Double Encryption Procedures for the Secure Real-Time Transport Protocol (SRTP)", RFC 8723, DOI 10.17487/RFC8723, April 2020, <https://www.rfc-editor.org/info/rfc8723>. ๐[RFC8825]Alvestrand, H., "Overview: Real-Time Protocols for Browser-Based Applications", RFC 8825, DOI 10.17487/RFC8825, January 2021, <https://www.rfc-editor.org/info/rfc8825>. ๐
Acknowledgements ๐ซถ
The author is SO grateful to everyone who helped out with support, reviews, and super valuable comments! Huge love to Bernard Aboba, Amanda Baber, Roman Danyliw, Spencer Dawkins, Martin Duke, Lars Eggert, James Hamlin, Benjamin Kaduk, Murray Kucherawy, Paul Kyzivat, Jonathan Lennox, Lorenzo Miniero, Dan Mongrain, Francesca Palombini, Colin Perkins, Brian Rosen, Rich Salz, Jรผrgen Schรถnwรคlder, Robert Wilton, Dale Worley, Yong Xin, and Peter Yee. You all are literally the reason this turned out so good ๐๐ญ
Author's Address ๐
Here's where to find the author, Gunnar Hellstrรถm:
Gunnar Hellstrรถm
Gunnar Hellstrรถm Accessible Communication
SE-13670 Vendelsรถ
Sweden
Email: gunnar.hellstrom@ghaccess.se
๐ฆ where this page comes from
- ietf: rfc9071 2021-07
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms