Skip to content

feat(workspace): auto-detect softphone companion instead of config flag [WTEL-10073] - #1481

Open
dlohvinov wants to merge 1 commit into
mainfrom
feat/WTEL-10073/softphone-auto-detect
Open

feat(workspace): auto-detect softphone companion instead of config flag [WTEL-10073]#1481
dlohvinov wants to merge 1 commit into
mainfrom
feat/WTEL-10073/softphone-auto-detect

Conversation

@dlohvinov

@dlohvinov dlohvinov commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The external-softphone mode is now chosen by probing ws://127.0.0.1:<port> at every client creation instead of requiring a config flag:

  • utility running → answers in milliseconds → browser goes control-only (no mic probe, no web SIP device); the probe socket is adopted by the connection manager, so the utility sees no connect/disconnect flap
  • no utility → instant connection-refused → the usual web phone
  • re-evaluated per client generation: reload/reconnect picks up a started or quit utility
  • Safari (mixed-content-blocked probe) gracefully falls back to the web phone

CLI.externalSoftphone.enabled becomes a tri-state override: absent = auto (new default in public/config.json), true = forced external, false = never probe.

Implementation notes:

  • call-store gates (mic bypass, audio-only) read the runtime mode via isExternalPhoneActive() — in auto mode config alone can't answer
  • attach() refuses to displace a foreign (webrtc) phone across client generations; the manager is stopped when a generation picks the web phone

Jira: WTEL-10073

Test plan

  • utility running + reload → external mode, no mic prompt, answer via native SIP
  • utility not running + reload → webrtc mode with mic prompt (probe adds no noticeable delay)
  • quit utility mid-session → UI degrades; after reload → webrtc mode
  • enabled: false in config → never probes; enabled: true → external even before utility starts

🤖 Generated with Claude Code

…ag [WTEL-10073](https://webitel.atlassian.net/browse/WTEL-10073)

The external-softphone decision is now a loopback probe at client
creation: a running utility answers in milliseconds and the browser
switches to control-only mode (the probe socket is adopted by the
manager, no reconnect flap); connection refused is instant and the web
phone is used as before. Re-evaluated per client generation, so a
reload picks up a started or quit utility. CLI.externalSoftphone.enabled
becomes a tri-state override: absent = auto (new default), true =
forced external, false = never probe. Call-store gates (mic bypass,
audio-only) now read the runtime mode via isExternalPhoneActive()
instead of config; attach() refuses to displace a foreign (webrtc)
phone across generations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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