Skip to content

Add support for receiving DTMF tones #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025
Merged

Add support for receiving DTMF tones #215

merged 1 commit into from
May 29, 2025

Conversation

mickel8
Copy link
Member

@mickel8 mickel8 commented May 21, 2025

This PR adds support for DTMF tones.

It also slightly modifies behavior of rtp receiver. So far, we have been expecting only a single codec, and when we received a packet with different payload type, we were logging this as warning.

Right now, we allow for any codec from transceiver codecs with the following notes:

  • if a packet has a payload type that does not belong to the codecs list, it is dropped but stats are updated. This is similar to what chromium does
  • if a packet has different clock rate than the clock rate used to initialize RTCP report generators, we log this as a warning but we accept such a packet

Resources:

Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 65.62500% with 11 lines in your changes missing coverage. Please review.

Project coverage is 88.02%. Comparing base (af0ab87) to head (43e7811).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
lib/ex_webrtc/rtp/dtmf/depayloader.ex 57.14% 6 Missing ⚠️
lib/ex_webrtc/rtp_receiver.ex 75.00% 3 Missing ⚠️
lib/ex_webrtc/peer_connection.ex 0.00% 1 Missing ⚠️
lib/ex_webrtc/rtp_transceiver.ex 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   88.33%   88.02%   -0.31%     
==========================================
  Files          49       50       +1     
  Lines        2598     2623      +25     
==========================================
+ Hits         2295     2309      +14     
- Misses        303      314      +11     
Files with missing lines Coverage Δ
lib/ex_webrtc/rtp/depayloader.ex 100.00% <100.00%> (ø)
lib/ex_webrtc/rtp/g711/depayloader.ex 100.00% <ø> (ø)
lib/ex_webrtc/rtp/g711/payloader.ex 100.00% <ø> (ø)
lib/ex_webrtc/rtp/opus/depayloader.ex 100.00% <ø> (ø)
lib/ex_webrtc/rtp/opus/payloader.ex 100.00% <ø> (ø)
lib/ex_webrtc/peer_connection.ex 86.65% <0.00%> (ø)
lib/ex_webrtc/rtp_transceiver.ex 91.04% <75.00%> (-0.46%) ⬇️
lib/ex_webrtc/rtp_receiver.ex 76.92% <75.00%> (-1.13%) ⬇️
lib/ex_webrtc/rtp/dtmf/depayloader.ex 57.14% <57.14%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af0ab87...43e7811. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mickel8 mickel8 force-pushed the dtmf branch 25 times, most recently from 7a87b53 to 0222215 Compare May 28, 2025 14:29
@mickel8 mickel8 marked this pull request as ready for review May 28, 2025 14:33
@mickel8 mickel8 merged commit a1bcc6f into master May 29, 2025
3 checks passed
@mickel8 mickel8 deleted the dtmf branch May 29, 2025 09:45
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.

1 participant