3.3 Audio/Video Codecs & DTMF Relay

Key Takeaways

  • Audio codecs balance bandwidth consumption against acoustic fidelity: G.711 operates at 64 kbps (MOS 4.1), G.729 compresses to 8 kbps (MOS 3.9), and G.722/Opus deliver wideband/fullband high-definition audio.

  • In-band DTMF transmission is only reliable with uncompressed codecs like G.711; low-bitrate compression codecs like G.729 distort dual-tone frequencies, requiring out-of-band relay methods.

  • RFC 2833 / RFC 4733 dynamic payload (telephony-event) conveys DTMF events as discrete RTP packets with sequence numbers, durations, and end-of-event flags.

  • Cisco CUBE enables asymmetric DTMF bridging between Cisco IP Phone KPML signaling and carrier RFC 2833 using the dial-peer command 'dtmf-relay rtp-nte sip-kpml'.

Last updated: October 2026

3.3 Audio/Video Codecs & DTMF Relay

Enterprise collaboration networks rely on coder-decoders (codecs) to convert analog voice and video signals into digital packetized streams for transport across IP networks. Simultaneously, networks must reliably convey user digit input—Dual-Tone Multi-Frequency (DTMF) signaling—to support Interactive Voice Response (IVR) systems, automated attendants, and voicemail navigation.


1. Enterprise Audio Codecs

Audio codecs differ in their compression algorithms, bandwidth utilization, processing latency, and perceptual audio fidelity. The standard metric for voice quality is the Mean Opinion Score (MOS), ranging from 1.0 (unacceptable) to 5.0 (crystal clear / toll quality = ~4.0).

Detailed Codec Breakdown

G.711 (u-law and A-law)

  • Algorithm: Pulse Code Modulation (PCM) without compression.
  • Bitrate: 64 kbps.
  • Sampling Rate: 8 kHz with 8-bit sample resolution (Nyquist theorem: 2 × 4 kHz acoustic spectrum = 8,000 samples/sec × 8 bits = 64,000 bps).
  • Flavors:
    • u-law (PCMU): Standard in North America and Japan (logarithmic companding curve).
    • A-law (PCMA): Standard in Europe and the rest of the world.
  • Packetization: Default 20 ms frame size = 160 bytes audio payload per packet.
  • Bandwidth Calculation: Voice Payload=64,000 bps×0.020 s8 bits/byte=160 bytes\text{Voice Payload} = \frac{64{,}000\text{ bps} \times 0.020\text{ s}}{8\text{ bits/byte}} = 160\text{ bytes} Total Packet=160 bytes (payload)+40 bytes (IP/UDP/RTP)=200 bytes\text{Total Packet} = 160\text{ bytes (payload)} + 40\text{ bytes (IP/UDP/RTP)} = 200\text{ bytes} Layer 3 Bandwidth=200 bytes×8 bits/byte0.020 s=80.0 kbps\text{Layer 3 Bandwidth} = \frac{200\text{ bytes} \times 8\text{ bits/byte}}{0.020\text{ s}} = 80.0\text{ kbps} Ethernet Bandwidth=(200+14 Ethernet+4 FCS)×80.020 s=87.2 kbps\text{Ethernet Bandwidth} = \frac{(200 + 14\text{ Ethernet} + 4\text{ FCS}) \times 8}{0.020\text{ s}} = 87.2\text{ kbps}
  • MOS Score: 4.1.

G.729 (G.729a and G.729b)

  • Algorithm: Conjugate-Structure Algebraic-Code-Excited Linear Prediction (CS-ACELP).
  • Bitrate: 8 kbps.
  • Sampling Rate: 8 kHz; 10 ms speech frames, typically packetized as two frames per packet (20 ms payload = 20 bytes).
  • Variants:
    • G.729a: Computationally simplified Annex A version, reducing DSP processing load by ~50% with negligible audio degradation.
    • G.729b: Annex B adds Voice Activity Detection (VAD) and Comfort Noise Generation (CNG) to suppress transmission during pauses, saving ~30–40% bandwidth.
  • Layer 3 Bandwidth (20 ms): (20 bytes+40 bytes header)×8/0.020 s=24.0 kbps(20\text{ bytes} + 40\text{ bytes header}) \times 8 / 0.020\text{ s} = 24.0\text{ kbps}.
  • MOS Score: 3.9.

G.722 (Wideband / HD Voice)

  • Algorithm: Sub-band Adaptive Differential Pulse Code Modulation (SB-ADPCM).
  • Bitrate: 64 kbps (with operating modes at 56 kbps and 48 kbps).
  • Sampling Rate: 16 kHz (captures frequencies from 50 Hz to 7,000 Hz, compared to 300 Hz–3,400 Hz for G.711).
  • Bandwidth: Identical to G.711 (80 kbps at Layer 3 with 20 ms ptime), but delivers substantially richer "High-Definition Voice" acoustics.
  • MOS Score: 4.2.

Opus (RFC 6716)

  • Architecture: Highly versatile open standard combining Skype's SILK (voice compression) and CELT (ultra-low latency music/audio).
  • Bitrate: Adaptive from 6 kbps to 510 kbps.
  • Sampling Rates: Fullband up to 48 kHz (supports narrowband 8 kHz, mediumband 12 kHz, wideband 16 kHz, super-wideband 24 kHz, and fullband 48 kHz).
  • Packetization: Dynamically variable frame sizes from 2.5 ms up to 60 ms.
  • Use Case: Native codec for Webex Calling, Webex App, WebRTC, and modern Cisco IP Phone 8800 series firmware.

iLBC (Internet Low Bitrate Codec, RFC 3951)

  • Bitrate & Frame Size: 13.33 kbps (30 ms frame = 400 bits) or 15.2 kbps (20 ms frame = 304 bits).
  • Resilience: Employs independent frame encoding. A lost packet does not corrupt adjacent frames, making it exceptionally stable across lossy public Internet or satellite connections.
  • MOS Score: 3.8.

Audio Codec Reference Table

CodecBitrateSampling RateFrame SizeL3 Bandwidth (20ms)MOS
G.711u/a64 kbps8 kHz20 ms80.0 kbps4.1
G.729a8 kbps8 kHz20 ms24.0 kbps3.9
G.72264 kbps16 kHz20 ms80.0 kbps4.2
Opus6–510 kbps (dynamic)Up to 48 kHz2.5–60 msVariableUp to 4.5
iLBC15.2 / 13.33 kbps8 kHz20 / 30 ms31.2 kbps (20 ms mode)3.8

2. Enterprise Video Codecs

H.264 AVC (Advanced Video Coding, MPEG-4 Part 10)

The ubiquitous standard across Cisco Room OS endpoints, Jabber, and Webex devices:

  • Profiles:
    • Constrained Baseline Profile (CBP): Uses I-slices and P-slices with CAVLC entropy coding. Low computational complexity and low latency; ideal for early video endpoints.
    • Main Profile: Introduces B-slices (bidirectional predictive coding) and CABAC (Context-Adaptive Binary Arithmetic Coding).
    • High Profile: Introduces the 8×8 transform and intra-prediction and custom quantization scaling matrices, giving noticeably better compression than Baseline at the same quality, at the cost of more encoder and decoder processing.

H.265 HEVC (High Efficiency Video Coding)

  • Efficiency: Delivers approximately 50% better compression than H.264 High Profile.
  • Architecture: Replaces macroblocks with flexible Coding Tree Units (CTUs) up to 64×64 pixels.
  • Application: Essential for high-resolution 4K/60fps video collaboration, Cisco Webex Room Panorama systems, and bandwidth-constrained WAN links.

3. DTMF Relay Mechanisms

DTMF signaling generates dual frequencies per digit (e.g., dialing '5' generates 770 Hz and 1336 Hz). How these digits traverse the network is critical:

In-Band DTMF

  • DTMF tones are sampled directly into the voice stream as standard uncompressed audio (audio/pcmu).
  • Failure Mode with Compression: When passed through lossy perceptual codecs like G.729 or iLBC, speech compression algorithms treat the pure dual tones as background noise or alter their frequency harmonics. The remote IVR fails to recognize dialed digits. In-band DTMF is only reliable over uncompressed G.711.

Out-of-Band DTMF Methods

1. RFC 2833 / RFC 4733 (Named Telephony Events - RTP-NTE)

  • Standard: IETF standard dynamic RTP payload (telephony-event, commonly payload type 101).
  • Operation: When a key is pressed, the endpoint stops sending audio and transmits discrete RFC 2833 RTP packets containing:
    • Event ID: 0–9, *, #, A–D (e.g., digit '5' = event 5).
    • Volume: 6-bit signal level in dBm0.
    • Duration: 16-bit integer representing timestamp duration.
    • End of Event (E) bit: Set to 1 on the final 3 redundant packets to ensure delivery even under packet loss.

2. Keypad Markup Language (KPML, RFC 4730)

  • Standard: XML-based signaling carried within SIP.
  • Operation: The call agent (CUCM) sends a SUBSCRIBE request for the kpml event package. When the user presses a digit, the phone sends a NOTIFY request containing an XML body:
    <?xml version="1.0" encoding="UTF-8"?>
    <kpml-response version="1.0" code="200" text="OK" digits="5" tag="dtmf"/>
    
  • Supported natively by Cisco Unified IP Phones registered to CUCM.

3. SIP INFO

  • Carries DTMF in the body of a mid-call INFO message (application/dtmf-relay or application/dtmf).
  • Hop-by-hop signaling. Not widely supported by public carrier SIP trunks.

4. Cisco Unsolicited NOTIFY

  • Gateway sends a NOTIFY message containing the DTMF digit without waiting for a prior SUBSCRIBE.

4. DTMF Interworking on Cisco CUBE & CUCM

In real-world collaboration environments, endpoints frequently use mismatched DTMF mechanisms. For example, internal Cisco IP Phones use KPML to communicate with CUCM, while the external Session Border Controller (CUBE) connects to an Internet Telephony Service Provider (ITSP) that mandates RFC 2833 (RTP-NTE).

Asymmetric DTMF on Cisco IOS XE CUBE

Cisco CUBE supports asymmetric DTMF negotiation, receiving KPML on the LAN call leg and converting it to RFC 2833 on the WAN call leg (or vice versa) without needing DSP transcoding resources.

! Inbound dial-peer from CUCM
dial-peer voice 101 voip
 description Inbound Leg from CUCM
 session protocol sipv2
 incoming called-number .
 codec g711ulaw
 dtmf-relay sip-kpml rtp-nte
!
! Outbound dial-peer to ITSP
dial-peer voice 201 voip
 description Outbound Leg to Carrier SIP Trunk
 destination-pattern +1[2-9]..[2-9]......
 session protocol sipv2
 session target ipv4:198.51.100.1
 codec g711ulaw
 dtmf-relay rtp-nte

MTP Allocation for DTMF Conversion in CUCM

If an endpoint or trunk cannot perform native asymmetric DTMF negotiation, CUCM must insert a Media Termination Point (MTP):

  • When a SIP trunk only supports RFC 2833, but an endpoint only supports KPML or in-band audio, CUCM dynamically allocates an MTP from the Media Resource Group (MRG).
  • The MTP terminates the RTP stream, extracts the RFC 2833 telephony-event packets, and generates KPML SIP NOTIFY messages toward CUCM (or vice versa).
  • If no MTP is available in the endpoint's Media Resource Group List (MRGL), DTMF digits fail to register with remote IVR systems.
Loading diagram...
CUBE Asymmetric DTMF Interworking: SIP-KPML to RTP-NTE
Test Your Knowledge

Why does sending in-band DTMF audio tones across a VoIP connection utilizing the G.729 audio codec consistently result in digit recognition failure at an Interactive Voice Response (IVR) system?

A

G.729 packets strictly reject RTP payload types other than payload 0.

B

The lossy CS-ACELP compression algorithm discards and distorts the harmonic frequency components of dual-tone sine waves.

C

The IP/UDP/RTP packet headers in G.729 exceed the MTU size of most WAN links, resulting in packet fragmentation that splits each tone.

D

G.729 operates at 16 kHz sampling, shifting dual-tone frequencies above the audible acoustic threshold.

Test Your Knowledge

Which Cisco IOS XE dial-peer command enables Cisco Unified Border Element (CUBE) to convert incoming SIP Keypad Markup Language (KPML) signaling messages from CUCM into outgoing RFC 2833 Named Telephony Event RTP packets toward an ITSP?

A

voice-class sip dtmf-relay in-band

B

dtmf-relay cisco-rtp

C

codec transparent dtmf

D

dtmf-relay rtp-nte sip-kpml

Test Your Knowledge

How does RFC 2833 / RFC 4733 ensure that a DTMF digit event is reliably registered by the receiving media gateway even under conditions of moderate IP packet loss?

A

The receiving endpoint immediately issues a SIP PRACK request for every incoming DTMF packet it receives.

B

The DTMF digit is protected with an MD5 hash and verified through an RTCP feedback loop with the sender.

C

The sender repeats the final packet with the End (E) bit set several times, and each packet carries the growing event duration.

D

The sending gateway switches the voice stream from UDP to TCP port 5060 for the duration of the tone so that no digit packet is lost.

Sections you finish are checked off in the contents.