Skip to content

VAPI-3804: Add onDtmfSent callback for locally-sent DTMF tone events - #16

Merged
smoghe-bw merged 2 commits into
mainfrom
vapi-3804-dtmf-sent-callback
Aug 20, 2026
Merged

VAPI-3804: Add onDtmfSent callback for locally-sent DTMF tone events#16
smoghe-bw merged 2 commits into
mainfrom
vapi-3804-dtmf-sent-callback

Conversation

@smoghe-bw

Copy link
Copy Markdown
Contributor

Summary

  • Adds DtmfSentEvent/DtmfSentHandler types and an onDtmfSent(callback) registration method, following the existing onReady/onStreamAvailable pattern.
  • Wires the browser's native RTCDTMFSender tonechange event so consumers are notified once per tone actually played on a published stream (the empty-tone "queue drained" event is filtered out).
  • Reflects local injection into the outbound stream only — no delivery confirmation from the remote party (RFC 4733 has no ack).

Test plan

  • tsc --noEmit passes
  • jest src passes (had to guard the new tonechange listener with addEventListener?.() since existing RTCDTMFSender test mocks don't implement EventTarget)
  • prettier --check passes

Jira: https://bandwidth-jira.atlassian.net/browse/VAPI-3804

🤖 Generated with Claude Code

Consumers previously had no way to know when a queued DTMF tone
actually played on a published stream. Wire the browser's native
RTCDTMFSender "tonechange" event through onDtmfSent, mirroring the
existing onReady/onStreamAvailable callback pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@smoghe-bw
smoghe-bw requested review from a team as code owners August 20, 2026 15:29
@bwappsec

bwappsec commented Aug 20, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@smoghe-bw
smoghe-bw merged commit 9e671ab into main Aug 20, 2026
5 checks passed
@smoghe-bw
smoghe-bw deleted the vapi-3804-dtmf-sent-callback branch August 20, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants