This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2020.
The RTCDTMFSender interface's toneBuffer property returns a string containing a list of the DTMF tones currently queued for sending to the remote peer over the RTCPeerConnection. To place tones into the buffer, call insertDTMF().
Tones are removed from the string as they're played, so only upcoming tones are listed.
A string listing the tones to be played. If the string is empty, there are no tones pending.
InvalidCharacterError DOMException
Thrown if a character is not a DTMF tone character (0-9, A-D, #, or ,).
The tone buffer is a string which can contain any combination of the characters that are permitted by the DTMF standard.
These characters represent the digit keys on a telephone keypad.
These characters represent the "A" through "D" keys which are part of the DTMF standard but not included on most telephones. These are not interpreted as digits. Lower-case "a"-"d" automatically gets converted to upper-case.
These correspond to the similarly-labeled keys which are typically on the bottom row of the telephone keypad.
This character instructs the dialing process to pause for two seconds before sending the next character in the buffer.
Note: All other characters are unrecognized and will cause insertDTMF() to throw an InvalidCharacterError DOMException.
For example, if you're writing code to control a voicemail system by sending DTMF codes, you might use a string such as "*,1,5555". In this example, we would send "*" to request access to the VM system, then, after a pause, send a "1" to start playback of voicemail messages, then after a pause, dial "5555" as a PIN number to open the messages.
Setting the tone buffer to an empty string ("") cancels any pending DTMF codes.
tbd
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
toneBuffer |
27 | 79 | 52 | 15 | 13.1 | 27 | 52 | 15 | 13.4 | 1.5 | 4.4 | 13.4 |
RTCDTMFSender.insertDTMF()RTCPeerConnectionRTCDTMFSenderRTCRtpSender
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCDTMFSender/toneBuffer