Since August 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The canInsertDTMF read-only property of the RTCDTMFSender interface returns a boolean value which indicates whether the RTCDTMFSender is capable of sending DTMF tones over the RTCPeerConnection.
A boolean value which is true if the RTCDTMFSender is capable of sending DTMF tones, or false if it is not.
This example shows how to use the canInsertDTMF property to check DTMF support in a WebRTC connection and then send tones if supported.
The code first checks if the canInsertDTMF property is defined, and if so, uses it to check whether inserting DTMF tones is supported. If the feature is supported, RTCDTMFSender.insertDTMF() is called to insert a tone.
if (sender.dtmf.canInsertDTMF) {
const duration = 500;
sender.dtmf.insertDTMF("1234", duration);
} else {
console.log("DTMF function not available");
}
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
canInsertDTMF |
27 | 79 | 129 | 15 | 13.1 | 27 | 129 | 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/canInsertDTMF