RTP G.729.1 DTX: G.729.1 RTP Payload Format Update: Discontinuous Transmission (DTX) Support
How G.729.1 voice over RTP can stay quiet during pauses in speech, without breaking older receivers.
Sollaud, A., "G.729.1 RTP Payload Format Update: Discontinuous Transmission (DTX) Support", RFC 5459, DOI 10.17487/RFC5459, January 2009, <https://www.rfc-editor.org/info/rfc5459>.
@misc{rfc5459,
series = {Request for Comments},
number = 5459,
howpublished = {RFC 5459},
publisher = {RFC Editor},
doi = {10.17487/RFC5459},
url = {https://www.rfc-editor.org/info/rfc5459},
author = {A. Sollaud},
title = {{G.729.1 RTP Payload Format Update: Discontinuous Transmission (DTX) Support}},
pagetotal = 7,
year = 2009,
month = jan,
} RFC text
Contents
Network Working Group A. Sollaud
Request for Comments: 5459 France Telecom
Updates: 4749 January 2009
Category: Standards Track
G.729.1 RTP Payload Format Update:
Discontinuous Transmission (DTX) Support
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (c) 2009 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 (http://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.
Abstract
This document updates the Real-time Transport Protocol (RTP) payload
format to be used for the International Telecommunication Union
(ITU-T) Recommendation G.729.1 audio codec. It adds Discontinuous
Transmission (DTX) support to the RFC 4749 specification, in a
backward-compatible way. An updated media type registration is
included for this payload format.
Table of Contents
1. Introduction ....................................................2
2. Background ......................................................2
3. RTP Header Usage ................................................3
4. Payload Format ..................................................3
5. Payload Format Parameters .......................................4
5.1. Media Type Registration Update .............................4
5.2. Mapping to SDP Parameters ..................................5
5.2.1. DTX Offer-Answer Model Considerations ...............5
5.2.2. DTX Declarative SDP Considerations ..................6
6. Congestion Control ..............................................6
7. Security Considerations .........................................6
8. IANA Considerations .............................................6
9. References ......................................................6
9.1. Normative References .......................................6
9.2. Informative References .....................................7
1. Introduction
The International Telecommunication Union (ITU-T) Recommendation
G.729.1 [ITU-G.729.1] is a scalable and wideband extension of the
Recommendation G.729 [ITU-G.729] audio codec. [RFC4749] specifies
the payload format for packetization of G.729.1-encoded audio signals
into the Real-time Transport Protocol (RTP) [RFC3550].
Annex C of G.729.1 [ITU-G.729.1-C] adds Discontinuous Transmission
(DTX) support to G.729.1. This document updates the RTP payload
format to allow usage of this Annex.
Only changes or additions to [RFC4749] will be described in the
following sections.
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 [RFC2119].
2. Background
G.729.1 supports Discontinuous Transmission (DTX), a.k.a. "silence
suppression". It means that the coder includes a Voice Activity
Detection (VAD) algorithm to determine if an audio frame contains
silence or actual audio. During silence periods, the coder may
significantly decrease the transmitted bit rate by sending a small
frame called a Silence Insertion Descriptor (SID) and then stop
transmission. The receiver's decoder will generate comfort noise
(CNG) according to the parameters contained in the SID. This DTX/CNG
scheme is specified in [ITU-G.729.1-C].
The G.729.1 SID has an embedded structure. The core SID is the same
as the legacy G.729 SID [ITU-G.729-B]. The first enhancement layer
adds some parameters for narrowband comfort noise, while a second
enhancement layer adds wideband information. The G.729.1 SID can be
2, 3, or 6 octets long.
3. RTP Header Usage
The fields of the RTP header must be used as described in [RFC4749],
except for the Marker (M) bit.
If DTX is used, the first packet of a talkspurt -- that is, the first
packet after a silence period during which packets have not been
transmitted contiguously -- MUST be distinguished by setting the M
bit in the RTP data header to 1. The M bit in all other packets MUST
be set to 0. The beginning of a talkspurt MAY be used to adjust the
playout delay to reflect changing network delays.
If DTX is not used, the M bit MUST be set to 0 in all packets.
4. Payload Format
The payload format is the same as in [RFC4749], with the option to
add a SID at the end.
So the complete payload consists of a payload header of 1 octet (MBS
(maximum bit rate supported) and FT (frame type) fields), followed by
zero or more consecutive audio frames at the same bit rate, followed
by zero or one SID.
Note that this is consistent with the payload format of G.729
described in section 4.5.6 of [RFC3551].
To be able to transport a SID alone -- that is, without actual audio
frames -- we assign the FT value 14 to the SID. When using FT=14,
only a single SID frame SHALL be included in the payload. The actual
SID size (2, 3, or 6 octets) is inferred from the payload size: it is
the size of what is left after the payload header.
When a SID is appended to actual audio frames, the FT value remains
the one describing the encoding rate of the audio frames. Since the
SID is much smaller than any other frame, it can be easily detected
at the receiver side, and it will not hinder the calculation of the
number of frames. The actual SID size is inferred from the payload
size: it is the size of what is left after the audio frames.
Section 5.4 of [RFC4749] mandates to ignore the remaining bytes after
complete frames. This document overrides that statement: the
receiver of the payload must consider these remaining bytes as a SID
frame. If the size of this remainder is not a valid SID frame size
(2, 3, or 6 octets), the receiver MUST ignore these bytes.
The full FT table is given for convenience:
+-------+---------------+-------------------+
| FT | encoding rate | frame size |
+-------+---------------+-------------------+
| 0 | 8 kbps | 20 octets |
| 1 | 12 kbps | 30 octets |
| 2 | 14 kbps | 35 octets |
| 3 | 16 kbps | 40 octets |
| 4 | 18 kbps | 45 octets |
| 5 | 20 kbps | 50 octets |
| 6 | 22 kbps | 55 octets |
| 7 | 24 kbps | 60 octets |
| 8 | 26 kbps | 65 octets |
| 9 | 28 kbps | 70 octets |
| 10 | 30 kbps | 75 octets |
| 11 | 32 kbps | 80 octets |
| 12-13 | (reserved) | - |
| 14 | SID | 2, 3, or 6 octets |
| 15 | NO_DATA | 0 |
+-------+---------------+-------------------+
DTX has no impact on the MBS definition and use.
5. Payload Format Parameters
Parameters defined in [RFC4749] are not modified. We add a new
optional parameter to configure DTX.
5.1. Media Type Registration Update
We add a new optional parameter to the audio/G7291 media subtype:
dtx: indicates that Discontinuous Transmission (DTX) is used or
preferred. Permissible values are 0 and 1. 0 means no DTX. 1
means DTX support, as described in Annex C of ITU-T Recommendation
G.729.1. 0 is implied if this parameter is omitted.
When DTX is turned off, the RTP payload MUST NOT contain a SID, and
the FT value 14 MUST NOT be used.
5.2. Mapping to SDP Parameters
The information carried in the media type specification has a
specific mapping to fields in the Session Description Protocol (SDP)
[RFC4566], which is commonly used to describe RTP sessions.
The mapping described in [RFC4749] remains unchanged.
The "dtx" parameter goes in the SDP "a=fmtp" attribute.
Some example partial SDP session descriptions utilizing G.729.1
encodings follow.
Example 1: default parameters (DTX off)
m=audio 57586 RTP/AVP 96
a=rtpmap:96 G7291/16000
Example 2: recommended packet duration of 40 ms (=2 frames), maximum
bit rate is 20 kbps, DTX supported and preferred.
m=audio 49987 RTP/AVP 97
a=rtpmap:97 G7291/16000
a=fmtp:97 maxbitrate=20000; dtx=1
a=ptime:40
5.2.1. DTX Offer-Answer Model Considerations
The offer-answer model considerations of [RFC4749] fully apply. In
this section, we only define the management of the "dtx" parameter.
The "dtx" parameter concerns both sending and receiving, so both
sides of a bi-directional session MUST have the same DTX setting. If
one party indicates that it does not support DTX, DTX must be
deactivated both ways. In other words, DTX is actually activated if,
and only if, "dtx=1" in the offer and in the answer.
A special rule applies for multicast: the "dtx" parameter becomes
declarative and MUST NOT be negotiated. This parameter is fixed, and
a participant MUST use the configuration that is provided for the
session.
An RTP receiver compliant with only RFC 4749 and not this
specification will ignore the "dtx" parameter and will not include it
in its answer, so DTX will not be activated in this case. As a
remark, if that happened, this kind of receiver would not be confused
by an RTP stream with DTX because RFC 4749 requires that the bytes
that are now used for SID frames be ignored. But during the silence
period, the receiver would then react using packet loss concealment
instead of comfort noise generation, leading to bad audio quality.
This justifies the use of the "dtx" parameter, even if the payload
format is backward-compatible at the binary level.
5.2.2. DTX Declarative SDP Considerations
The "dtx" parameter is declarative and provides the parameter that
SHALL be used when receiving and/or sending the configured stream.
6. Congestion Control
The congestion control considerations of [RFC4749] apply.
The use of DTX can help congestion control by reducing the number of
transmitted RTP packets and the average bandwidth of audio streams.
7. Security Considerations
The security considerations of [RFC4749] apply.
By observing the RTP flow with DTX, an attacker could see when and
for how long people are speaking. This is a general fact for DTX,
and G.729.1 DTX introduces no new specific issue.
8. IANA Considerations
IANA has assigned a new optional parameter for media subtype (audio/
G7291); see Section 5.1.
9. References
9.1. Normative References
[ITU-G.729.1] International Telecommunications Union, "G.729 based
Embedded Variable bit-rate coder: An 8-32 kbit/s
scalable wideband coder bitstream interoperable with
G.729", ITU-T Recommendation G.729.1, May 2006.
[ITU-G.729.1-C] International Telecommunications Union, "G.729.1
DTX/CNG scheme", ITU-T Recommendation G.729.1 Annex
C, May 2008.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V.
Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, RFC 3550, July 2003.
[RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP:
Session Description Protocol", RFC 4566, July 2006.
[RFC4749] Sollaud, A., "RTP Payload Format for the G.729.1
Audio Codec", RFC 4749, October 2006.
9.2. Informative References
[ITU-G.729] International Telecommunications Union, "Coding of
speech at 8 kbit/s using conjugate-structure
algebraic-code-excited linear-prediction (CS-
ACELP)", ITU-T Recommendation G.729, March 1996.
[ITU-G.729-B] International Telecommunications Union, "A silence
compression scheme for G.729 optimized for terminals
conforming to Recommendation V.70", ITU-T
Recommendation G.729 Annex B, October 1996.
[RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for
Audio and Video Conferences with Minimal Control",
STD 65, RFC 3551, July 2003.
Author's Address
Aurelien Sollaud
France Telecom
2 avenue Pierre Marzin
Lannion Cedex 22307
France
Phone: +33 2 96 05 15 06
EMail: aurelien.sollaud@orange-ftgroup.com
AI ELI5
On this page
§1Introduction and Scope
ITU-T Recommendation G.729.1 is a scalable and wideband extension of the G.729 audio codec. RFC 4749 defines how G.729.1 audio is packed into the Real-time Transport Protocol (RTP).
Annex C of G.729.1 adds Discontinuous Transmission (DTX) to the codec. This RFC updates the RTP payload format so that Annex C can be used. It describes only changes or additions to RFC 4749, so the two documents are read together.
There was already a rule book for sending this kind of voice over the internet. This note adds a few new pages about what to do during quiet moments.
§2DTX, SID and Comfort Noise
DTX is also known as silence suppression. The coder includes a Voice Activity Detection (VAD) algorithm that decides whether an audio frame holds silence or actual audio. During silence the coder may greatly reduce the transmitted bit rate by sending a small frame called a Silence Insertion Descriptor (SID) and then stopping transmission.
The receiver's decoder generates comfort noise (CNG) from the parameters in the SID. The G.729.1 SID has an embedded structure: the core SID is the same as the legacy G.729 SID, a first enhancement layer adds parameters for narrowband comfort noise, and a second adds wideband information. A G.729.1 SID can be 2, 3, or 6 octets long.
When you stop talking, the phone sends one tiny note describing the background hum. The other phone then plays a similar hum so the line does not sound dead.
§3RTP Header Usage and the Marker Bit
The RTP header fields are used as described in RFC 4749, except for the Marker (M) bit. If DTX is used, the first packet of a talkspurt MUST have the M bit set to 1. A talkspurt starts with the first packet after a silence period during which packets were not transmitted contiguously. The M bit in all other packets MUST be 0.
The start of a talkspurt MAY be used to adjust the playout delay to reflect changing network delays. If DTX is not used, the M bit MUST be 0 in all packets.
The first packet after a pause waves a little flag so the listener knows someone started talking again.
§4Payload Format with a SID
The payload format is that of RFC 4749 with the option to add a SID at the end. A complete payload is a 1-octet payload header (the MBS and FT fields), then zero or more audio frames at the same bit rate, then zero or one SID. This is consistent with the G.729 payload format in section 4.5.6 of RFC 3551.
To send a SID alone, the frame type value FT=14 is assigned to the SID. With FT=14, only a single SID SHALL be included, and its size (2, 3, or 6 octets) is inferred from the payload size. When a SID follows audio frames, FT keeps describing the audio encoding rate. The SID is much smaller than any audio frame, so the receiver can detect it and the frame count is not disturbed.
Section 5.4 of RFC 4749 told receivers to ignore bytes left after complete frames. This RFC overrides that: the remainder is treated as a SID. If its size is not 2, 3, or 6 octets, the receiver MUST ignore those bytes. DTX has no impact on the definition and use of MBS.
A packet can carry a little extra note at the end, or the note can travel alone in its own packet. The receiver tells which by how big the packet is.
- 08 kbps — Frame size 20 octets.
- 724 kbps — Frame size 60 octets.
- 1132 kbps — Frame size 80 octets.
- 12-13Reserved — No frame size defined.
- 14SID — Silence Insertion Descriptor of 2, 3, or 6 octets.
- 15NO_DATA — Zero octets.
§5The dtx Parameter and SDP
Parameters from RFC 4749 are not modified. One new optional parameter is added to the audio/G7291 media subtype: dtx, with permissible values 0 and 1. A value of 0 means no DTX and 1 means DTX support as in Annex C of G.729.1. If the parameter is omitted, 0 is implied. When DTX is off, the payload MUST NOT contain a SID and FT value 14 MUST NOT be used.
In the Session Description Protocol (SDP), the parameter goes in the a=fmtp attribute. The RFC's second example offers a 40 ms packet duration, a maximum bit rate of 20 kbps, and DTX supported and preferred.
Offer-answer rules
Both directions must use the same DTX setting. DTX is active if, and only if, dtx=1 appears in both the offer and the answer. For multicast the parameter is declarative and MUST NOT be negotiated.
A receiver that follows only RFC 4749 ignores dtx and leaves it out of its answer, so DTX is not activated. Such a receiver would not be confused by a DTX stream, but during silence it would use packet loss concealment instead of comfort noise, giving bad audio. This is why the parameter exists despite binary backward compatibility.
Both phones must agree before going quiet during pauses. If either one does not understand the new feature, nobody uses it.
§6Congestion and Security
The congestion control considerations of RFC 4749 apply. DTX can help by reducing the number of RTP packets sent and the average bandwidth of audio streams.
The security considerations of RFC 4749 also apply. By watching an RTP flow that uses DTX, an attacker could see when and for how long people are speaking. The RFC calls this a general fact about DTX and says G.729.1 DTX introduces no new specific issue.
Going quiet saves room on the network. But someone watching could tell when you are talking, because packets only flow then.