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.

Some DTMF Questions #178

Closed
Closed

Description

@aboba

From Shijun Sun:

  1. What happens if a DTMFSender object sender is constructed from an RTCRtpSender object sendObject and methods such as insertDTMF() are called, but sendObject.send() was not previously called to set up the DTMF codec?

var sendObject = new RTCRtpSender(audioTrack, dtlsTransport);
var sender = new RTCDtmfSender(sendObject);
if (sender.canInsertDTMF) {
var duration = 500;
sender.insertDTMF("1234", duration);
} else
log("DTMF function not available");

In the above example (assuming the DTMF function is available) does sender.insertDTMF() throw an InvalidState exception?

  1. In the single sender example above, what happens to the audioTrack when DTMF is being sent? Presumably the audioTrack is not encoded, correct? Then once the DTMF tones are played out, audioTrack is encoded and sent over the wire within RTP packets again?

Activity

  1. aboba commented on Feb 13, 2015

    @aboba
    ContributorAuthor

    The proposed resolution is to add the following text to Section 10.3.2:

    insertDTMF
    Insert DTMF tones. Since DTMF tones cannot be sent without configuring the DTMF codec, if insertDTMF() is called prior to sender.send(), throw an InvalidStateError exception.

  2. aboba commented on Mar 11, 2015

    @aboba
    ContributorAuthor

    A slight revision:
    insertDTMF
    Insert DTMF tones. Since DTMF tones cannot be sent without configuring the DTMF codec, if insertDTMF() is called prior to sender.send(parameters), or if sender.send(parameters) was called but parameters did not include the DTMF codec, throw an InvalidStateError exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions