feat(sip_client): add auth_username (3CX Auth-ID) and accept SIP INFO / marker-less RFC 2833 DTMF - #319
Merged
Merged
Conversation
… DTMF Two fixes for 3CX and DECT deployments (#318). auth_username: PBXs that separate the Digest authentication user from the extension (3CX v20 "Authentication ID") rejected REGISTER with "credentials don't match", because Digest username= always carried the extension. The new optional auth_username feeds REGISTER and INVITE Digest only; From / To / Contact keep using username, so the device still presents its extension. Omitted = today's behaviour. DTMF receive: on_dtmf only fired on RFC 2833 packets carrying the RTP marker bit, so Yealink DECT handsets and the 3CX Android app (marker-less, or SIP INFO) never opened a door relay. The telephone-event decoder now reports a digit once per (event, RTP timestamp) regardless of the marker, which also covers the retransmitted end packets, and SIP INFO with application/dtmf-relay or application/dtmf fires the trigger too. The INFO body is parsed via Signal=, so "Duration=250" is no longer read as digit D, and * / # are accepted both literally and as event codes 10 / 11. Digit decoding and the receive de-duplication live in dtmf.h/.cpp and are covered by the native test suite. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 31, 2026
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.
Closes #318.
1.
auth_username— Digest auth ID separate from the extension3CX v20 (and other PBXs) issue an Authentication ID that differs from the
extension number. Digest
username=always carried the extension, so REGISTERfailed with
403 Credentials don't match.Applied to both the REGISTER and the INVITE challenge. Omitting the option
keeps the current behaviour exactly (
usernameis used for Digest).2. DTMF receive: marker-less RFC 2833 + SIP INFO
on_dtmfonly fired on telephone-event packets that carried the RTP markerbit, so Yealink DECT handsets (W70B/W73H) and the 3CX Android app never
triggered a door relay.
timestamp) and ignores the marker bit entirely. Since every packet of one
event repeats its timestamp, this also swallows the retransmitted end
packets — firing on the end bit instead would have fired ~3x per keypress.
State is reset on session start/stop, so an identical packet in the next call
is not mistaken for a duplicate.
application/dtmf-relay(Signal=1) orapplication/dtmfnow fires the trigger, answered with
200 OKas before. The body is parsedthrough
Signal=, soDuration=250is not misread as digitD;*/#are accepted literally and as event codes
10/11. INFO outside anestablished call is answered but does not fire the trigger.
In-band audio tones remain undecoded.
Existing
on_dtmfautomations are unchanged.Tests
Digit decoding, the receive de-duplication and the INFO body parser live in
dtmf.h/dtmf.cppwith no ESPHome dependency, and are covered by 10 newcases in
tests/native/sip_sdp/test_dtmf.cpp(wired intorun.shand thesuite README).
tests/native/sip_sdp/— all passesphome compile tests/components/sip_client/test.esp32-idf.yaml— succeeds(the test YAML now also sets
auth_username, so CI covers the new option)On-device verification against 3CX v20, a Yealink desk phone, Yealink DECT and
the 3CX Android app is still pending — @AlexW85 offered to test in #318.
🤖 Generated with Claude Code