Shared SIP.js softphone core + Slash-branded UI (Phase 9)
- TypeScript 100%
|
All checks were successful
Build slash-sip-client / build (push) Successful in 5s
Reviewed-on: #2 |
||
|---|---|---|
| .forgejo/workflows | ||
| demo | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
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/core—SoftphoneLine(SIP.js UserAgent/Registerer wrapper: register, reconnect w/ 5s→5m backoff, place/answer/hangup, DTMF, mute) andSoftphone(multi-line manager; line configs fetched from slash-sip-plugin'sGET /lines?include_secret=true).src/ui— React components:Dialer,IncomingCall,InCall, andSoftphonePanelglue. NCW palette from NCW-Branding-KIT.demo/—register-test.mjslive 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).