Skip to content

feat: tel: parsing and the AT dialer (Domain + Modem) - #5

Closed
DeepDiver1975 wants to merge 3 commits into
mainfrom
feat/domain-to-main
Closed

DeepDiver1975 wants to merge 3 commits into
mainfrom
feat/domain-to-main

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Now carries Domain and Modem: #3 (Modem) was merged into this branch, so merging this PR lands both on main. Both were reviewed in #2 and #3.

Re-lands #2 on main. #2 was merged into its stacked base chore/bootstrap after #1 had already gone into main, so its code never reached main. Same two commits, rebased onto main; the content is identical to what #2 merged (git diff b0548b3 feat/domain-to-main -- src tests AGENTS.md is empty). Already reviewed in #2.

  • TelUri reduces an RFC 3966 link to digits (optional leading +) and refuses everything else: line breaks (plain or percent-encoded), ;, letters, * and # (a landline *21*<number># would set up call forwarding), more than 32 digits, links over 256 characters.
  • DialNumber.From applies Ländervorwahl and Amtsholung; DialSettings validates both.

Modem (#3): AtDialer (open, AT, ATD, close; timeouts on TimeProvider; NoResponse for a silent phone or a broken link), SerialPorts, StreamAtChannel.

106 tests; make ci green.

🤖 Generated with Claude Code

DeepDiver1975 and others added 2 commits October 26, 2026 21:48
TelUri reduces an RFC 3966 link to 0-9 * # with an optional leading +,
dropping visual separators, the printed "(0)" and all parameters. Since
whatever follows ATD is executed by the phone, a link carrying a line
break, a semicolon or any other character is refused, as is one longer
than 32 digits or 256 characters.

DialNumber turns +<home country> into a leading 0, any other + into 00,
and prepends the Amtsholung prefix from DialSettings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>
On a landline a supplementary-service code such as *21*<number># sets up
call forwarding at the exchange. A link carrying one would divert every
call to the Feuerwehr's line, behind a confirm window that shows what
looks like a number. Links, and the Amtsholung prefix, are now digits
only; the attack is replayed in plain and percent-encoded form.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>
…ands (#3)

* feat(modem): dial over the phone's Bluetooth serial port with AT commands

AtDialer runs one dial as one connection: open the port, AT, ATD, close.
A silent phone times out after 10 s on connect and 15 s on the dial and
reports NoResponse, which is what the DL500A does while the PC holds its
audio connection. ERROR/+CME ERROR, BUSY, NO CARRIER and NO DIALTONE map
to their own results; echo lines, RING and CLIP: are skipped. A probe
sends AT only.

SerialPorts opens the OS's SPP port (COM on Windows, /dev/cu.* on macOS,
/dev/rfcomm* on Linux) off the caller's thread and classifies why it did
not open; StreamAtChannel frames the lines and refuses to write anything
but one line of printable ASCII.

Tests replay the transcript recorded from a DL500A on 2026-10-26.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>

* fix(modem): report a link that breaks mid-dial as no response

A serial stream throws IOException once the Bluetooth link behind it is
gone — phone switched off, out of range, RFCOMM dropped. AtDialer let it
escape; it now closes the port and reports NoResponse like a silent
phone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>

---------

Signed-off-by: Thomas Müller <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@DeepDiver1975 DeepDiver1975 changed the title feat(domain): parse tel: links and normalise the number to dial feat: tel: parsing and the AT dialer (Domain + Modem) Oct 26, 2026
@DeepDiver1975

Copy link
Copy Markdown
Collaborator Author

Superseded by #4, which now targets main directly and contains these commits plus AppLogic. Closing to keep one path to main.

@DeepDiver1975
DeepDiver1975 deleted the feat/domain-to-main branch October 26, 2026 21:01
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