files/en-us/web/api/rtcdtmfsender/tonebuffer/index.md
{{APIRef("WebRTC")}}
The {{domxref("RTCDTMFSender")}} interface's toneBuffer property returns a string containing a list of the {{Glossary("DTMF")}} tones currently queued for sending to the remote peer over the {{domxref("RTCPeerConnection")}}. To place tones into the buffer, call {{domxref("RTCDTMFSender.insertDTMF", "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 {{domxref("DOMException")}}
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.
[!NOTE] All other characters are unrecognized and will cause {{domxref("RTCDTMFSender.insertDTMF", "insertDTMF()")}} to throw an
InvalidCharacterError{{domxref("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
{{Specifications}}
{{Compat}}