LiveState loads extension states and registered devices from Asterisk on every AMI connect and follows ExtensionStatus/ContactStatus; the hub sends a snapshot then deltas batched every 250 ms (devices for admins only), pings every 30 s and closes unauthenticated sockets with 4401. The web UI keeps one reconnecting socket in a zustand store, shows a Reconnecting banner, a Dashboard (online, on a call, telephony engine) and status dots. Fix: Asterisk 24 has no 'pjsip reload'; reload with 'module reload res_pjsip.so'. AMI errors now carry the CLI output. Milestone check, automated: call-test.ts registers two baresip phones and holds a 30 s call with RTP both ways (pnpm test:asterisk); the recorded session drives the live-state tests. scripts/e2e/m2-live.mjs runs api + Asterisk + phones + browser on a private Docker network: a new extension is live in Asterisk in ~1.3 s, the dashboard shows 2/2 online and red dots during the call. Task: M2-T6
33 lines
988 B
JSON
33 lines
988 B
JSON
{
|
|
"name": "selfphoneng",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"license": "AGPL-3.0-or-later",
|
|
"type": "module",
|
|
"packageManager": "pnpm@11.10.0",
|
|
"engines": {
|
|
"node": ">=24"
|
|
},
|
|
"scripts": {
|
|
"dev": "pnpm --parallel --filter @selfphoneng/api --filter @selfphoneng/web dev",
|
|
"build": "pnpm -r build",
|
|
"test": "vitest run",
|
|
"lint": "eslint . && prettier --check .",
|
|
"format": "prettier --write .",
|
|
"typecheck": "pnpm -r typecheck",
|
|
"test:asterisk": "node apps/api/test/asterisk/load-golden.mjs && node --conditions=source apps/api/test/asterisk/call-test.ts"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^24.19.2",
|
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
"eslint": "^10.13.0",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"globals": "^17.13.0",
|
|
"prettier": "^3.9.10",
|
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
"typescript-eslint": "^8.71.2",
|
|
"vitest": "^5.0.5"
|
|
}
|
|
}
|