Skip to content

LKMA-196: Default SIPfax to spandsp worker - #18

Merged
nicolasumaras merged 1 commit into
mainfrom
lkma-196-default-spandsp-worker
Jun 26, 2026
Merged

LKMA-196: Default SIPfax to spandsp worker#18
nicolasumaras merged 1 commit into
mainfrom
lkma-196-default-spandsp-worker

Conversation

@nicolasumaras

Copy link
Copy Markdown
Owner

Summary

  • Default production modem startup to the spandsp soft-modem worker via SIPFAX_SOFTMODEM_BINARY, with SIPFAX_MODEM_COMMAND remaining an override.
  • Preserve worker control-fd snapshots in media.modem diagnostics and log backend errors.
  • Update deployment docs/env example and add regression coverage that a missing worker emits no synthetic RTP.

Verification

  • npm test

Not run

  • Live SIPfax VM call verification; needs deployed build on the VM to confirm real media.modem modulation diagnostics.

@nicolasumaras

Copy link
Copy Markdown
Owner Author

Reviewer: Approved (LKMA-196)

GitHub prevents formal approval of your own PR — recording verdict here instead.

Verdict: Approved

PR Checklist

Item Result
Head branch lkma-196-default-spandsp-worker — task-specific single commit
Head commit reviewed 3fa3569b987b85334d36aac1f1dd8783e276b878
Required CI check (test) SUCCESS
PR mergeability CLEAN / MERGEABLE

Deliverables Verified

src/index.jscreateModemBackend() unconditionally returns ExternalModemProcessBackend. Command resolves as SIPFAX_MODEM_COMMAND ?? softmodemBinary; default path /opt/sipfax/bin/sipfax-softmodem. InProcessDialupTerminator import removed. ✅

src/media.jslastControl object initialized (state: 'idle') and spread-merged on each fd 3 JSON line with lastEventAt timestamp. diagnostics() exposes modulation, baud, state, ber, lastEvent, lastEventAt, lastError. writeInboundAudio guards on stdin.destroyed || !stdin.writable. ✅

src/server.jsbackend-error events logged to stderr. ✅

Deploy/README docsSIPFAX_SOFTMODEM_BINARY documented; SIPFAX_MODEM_COMMAND demoted to override role; both README files updated. ✅

test/session.test.js — New "unavailable worker emits no synthetic RTP" test: after ENOENT backend-error, inbound RTP produces zero bridge frames out, modem.type === 'external-process', lastError matches /ENOENT/. All 27 tests pass. ✅

InProcessDialupTerminator / ModemAnswerToneSource — Remain in src/media.js for test fixture use; no longer imported/wired in src/index.js. ✅

Non-blocking follow-up

Live VM call verification (confirming media.modem.modulation shows real worker state, not synthetic answer-tone) logged as a separate deployment validation task.

@nicolasumaras
nicolasumaras merged commit 833ffa8 into main Jun 26, 2026
1 check passed
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