VAPI-3354 feat(dtmf): expose duration/interToneGap and fix null safety on RTCDTMFSender#7
Open
smoghe-bw wants to merge 3 commits into
Open
VAPI-3354 feat(dtmf): expose duration/interToneGap and fix null safety on RTCDTMFSender#7smoghe-bw wants to merge 3 commits into
smoghe-bw wants to merge 3 commits into
Conversation
…MFSender - Add `duration` and `interToneGap` params to `sendDtmf` on both the public wrapper and v1 implementation, forwarded directly to `RTCDTMFSender.insertDTMF()`. README previously stated these could not be controlled; that was incorrect for the native browser API. - Guard `transceiver.sender.dtmf` before storing — the property is `RTCDTMFSender | null` per spec and the previous `!` assertion would throw in environments where DTMF is unsupported for a track. - Add five unit tests covering: broadcast, targeted, parameterised, no-senders, and unknown-streamId paths. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
added 2 commits
June 17, 2026 09:10
…undStreamNotification callback" This reverts commit e587b4d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
durationandinterToneGaponsendDtmf— forwarded directly toRTCDTMFSender.insertDTMF(). The README previously said these could not be controlled, which was wrong for the native browser API.transceiver.sender.dtmfisRTCDTMFSender | nullper spec; the previous!non-null assertion would throw in environments where DTMF is unsupported for a given track. Now guarded before storing.Context
Companion to the
fix/dtmf-rfc4733-forwardingchange inpv-gateway, which now correctly forwards RFC 4733 telephone-event RTP packets. The SDK already used the browser's nativeRTCDTMFSender(which generates these packets) rather than the Web Audio API approach indtmfSender.ts; this PR makes the API complete and safe.Test plan
npx jest src/v1/bandwidthRtc.test.ts— all 10 tests passsendDtmf("1", undefined, 200, 80)in a live session and confirm the gateway forwards it as a telephone-event RTP packet with the correct duration🤖 Generated with Claude Code