Shared SIP.js softphone core + Slash-branded UI (Phase 9)
  • TypeScript 100%
Find a file
2026-07-07 11:01:54 +00:00
.forgejo/workflows feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
demo feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
src feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
.gitignore feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
CHANGELOG.md feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
LICENSE chore: repo baseline (README + MIT LICENSE) 2026-07-07 00:23:22 -04:00
package-lock.json feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
package.json feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00
README.md chore: repo baseline (README + MIT LICENSE) 2026-07-07 00:23:22 -04:00
tsconfig.json feat: initial slash-sip-client — SIP.js core + branded UI (Phase 9, task #3) 2026-07-07 00:23:23 -04:00

slash-sip-client

Shared SIP softphone core + Slash-branded UI for the Slash platform (Phase 9). One MIT-licensed TypeScript package consumed by the webapp plugin panel, Slash Desktop, and slash-mobile. Built on SIP.js (MIT) over SIP-over-WSS — chosen over Linphone's AGPL/GPL SDK (PRD Open Decision A, decided 2026-07-06).

Layout

  • src/coreSoftphoneLine (SIP.js UserAgent/Registerer wrapper: register, reconnect w/ 5s→5m backoff, place/answer/hangup, DTMF, mute) and Softphone (multi-line manager; line configs fetched from slash-sip-plugin's GET /lines?include_secret=true).
  • src/ui — React components: Dialer, IncomingCall, InCall, and SoftphonePanel glue. NCW palette from NCW-Branding-KIT.
  • demo/register-test.mjs live registration harness + mock-registrar.mjs (local SIP-over-WS registrar with digest auth).

Status / verification (2026-07-07)

  • Registration flow validated end-to-end against the local mock registrar: WSS connect → REGISTER → 401 digest challenge → authed REGISTER → 200 OK; wrong password surfaces failed (REGISTER rejected: 403); clean unregister on stop.
  • ⚠️ FreePBX-specific behavior is UNVERIFIED — PRD task #1 (real test extension) is blocked. Public SIP.js demo endpoints (edge.sip.onsip.com, tryit.jssip.net) are dead, hence the local mock. Do not treat this package as production-ready until task #1 passes against NCW's PBX.
  • ⚠️ Call/media paths (placeCall, answer, remote audio) compile and follow SIP.js's documented API but need a real endpoint + browser WebRTC to test.

Usage

import {Softphone, fetchLinesFromPlugin} from 'slash-sip-client';
import {SoftphonePanel} from 'slash-sip-client/ui';

const phone = new Softphone();
await phone.start(await fetchLinesFromPlugin());
// render <SoftphonePanel softphone={phone}/> in the plugin panel

Dev

npm install && npm run build
node demo/mock-registrar.mjs &          # local test registrar
npm run test:register -- ws://127.0.0.1:8089 slash-mock 1001 testpass

No real hostnames, extensions, or credentials belong in this repo (public).