The RTCDTMFSender
interface provides a mechanism for transmitting DTMF codes on a WebRTC RTCPeerConnection
. You gain access to the connection's RTCDTMFSender
through the RTCRtpSender.dtmf
property on the audio track you wish to send DTMF with.
The primary purpose for WebRTC's DTMF support is to allow WebRTC-based communication clients to be connected to a public-switched telephone network (PSTN) or other legacy telephone service, including extant voice over IP (VoIP) services. For that reason, DTMF can't be used between two WebRTC-based devices, because there is no mechanism provided by WebRTC for receiving DTMF codes.