Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

DTMF Support #30

@aboba

Description

@aboba

From: Justin Uberti juberti@google.com
To: public-orca@w3.org
Date: Thu, 6 Feb 2014 11:21:21 -0800
URL: http://lists.w3.org/Archives/Public/public-orca/2014Feb/0014.html

One thing absent from the current API is support for DTMF. Yes, it's a
relic from an earlier age, but unfortunately it's not something we can
ignore.

Fortunately, the 1.0 spec did a nice job factoring DTMF functionality out
into the RTCDTMFSender http://www.w3.org/TR/webrtc/#rtcdtmfsender object.
After calling PeerConnection.createDTMFSender(track), a RTCDTMFSender is
created and attached to |track|. This object then allows DTMF to be
injected into the audio stream for the specified track. Visually, it looks
like this (in 1.0):

                      |---------------------------|
                      |       PeerConnection      |

MediaStreamTrack --> |Doohickey | |
| ^ |
| | |
|RTCDTMFSender| |
| |
|---------------------------|

So, we should be able to reuse this whole object in ORTC. All we need to do
is find a way to create a RTCDTMFSender for a given track, which we can do
just by adding a getDTMFSender() API to RTCRtpSender, and we end up with a
model like:

MediaStreamTrack --> RTCRtpSender ---> Transports
^
|
RTCDTMFSender

The API delta then becomes:

partial interface RTCRtpSender {
// gets/creates the RTCDTMFSender object for the current RTCRtpSender
RTCDTMFSender getDTMFSender();
}

and this taken from 1.0:

[NoInterfaceObject]
interface RTCDTMFSender {
readonly attribute boolean canInsertDTMF;
void insertDTMF (DOMString tones, optional long duration,
optional long interToneGap);
readonly attribute MediaStreamTrack track;
attribute EventHandler ontonechange;
readonly attribute DOMString toneBuffer;
readonly attribute long duration;
readonly attribute long interToneGap;
};

The only other edit we might want to make is to replace the |track|
reference with a reference to the RTCRtpSender the RTCDTMFSender is
attached to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions