Skip to main content

Module tone

Module tone 

Source
Expand description

The audio/tone payload format: telephony tones described by their frequencies (RFC 4733 section 4).

A tone packet stands alone: unlike a telephone event it carries no history, so a tone longer than one packet is a run of packets whose timestamps follow on from each other (ToneSender). RedundantToneSender adds the rest of the sending procedures of section 4.4: each packet also carries the previous tone report in RFC 2198 redundancy (section 4.4.1), and the packetization interval lengthens while receiver reports show loss (ToneIntervalControl, section 4.4.3).

Structs§

RedundantToneSender
The sending procedures of RFC 4733 section 4.4, sans-I/O: tones cut into packets as ToneSender does, at the interval a ToneIntervalControl keeps (section 4.4.3), each payload an RFC 2198 RED payload whose primary is the new tone report and whose redundant blocks are the reports sent before it (section 4.4.1: “for increased reliability, the sender SHOULD combine new and old tone reports in the same RTP packet using RFC 2198 audio redundancy”).
Tone
One tone report (RFC 4733 section 4.3.3, Figure 2).
ToneIntervalControl
The packetization interval of initial and interim tone reports under congestion (RFC 4733 section 4.4.3): “If the sender determines that packets are being lost due to congestion (e.g., through RTCP receiver reports), it SHOULD increase the packetization interval for initial and interim tone reports … Both the maximum packetization interval and maximum increase in packetization interval at any one time are therefore a matter of configuration”.
TonePacket
One packet of a tone: its RTP timestamp, marker bit and payload.
ToneSender
Cuts a tone into packets, without redundancy (RFC 4733 section 4.4.1): “The RTP timestamp MUST be updated for each packet generated … the RTP timestamp in each subsequent packet MUST equal the sum of the timestamp and the duration in the preceding packet”; the first packet has the marker set and the rest not (section 4.3.2). RedundantToneSender adds the RFC 2198 combination the same section asks for.

Constants§

TONE_DEFAULT_CLOCK_RATE
The default clock rate of audio/tone (RFC 4733 section 4.3.4).
TONE_DEFAULT_MAX_PAYLOAD_SIZE
The default largest RED payload of a RedundantToneSender, in octets.
TONE_DEFAULT_REDUNDANCY
The default redundancy of a RedundantToneSender: each packet carries the tone report of the packet before (RFC 4733 section 4.4.1: “combine new and old tone reports”).
TONE_HIGH_LOSS_FRACTION
At or above this RTCP fraction lost (out of 256; 26 is 10.2 %), a receiver report means congestion and ToneIntervalControl lengthens the interval. The loss-based controller’s “more than 10 %” (draft-ietf-rmcat-gcc-02 section 6).
TONE_LOW_LOSS_FRACTION
At or below this RTCP fraction lost (out of 256; 5 is 1.95 %), a receiver report means no congestion and ToneIntervalControl shortens the interval again. The loss-based controller’s “less than 2 %” (draft-ietf-rmcat-gcc-02 section 6).