Files
selfphoneng/package.json
T
iamdoubz 1b7f60b5f2 trunks: CRUD API, PJSIP trunk config, live registration status, Trunks page
voip.ms-first trunk form with the portal checklist, POP server list
and Test button; passwords are write-only and encrypted. Registration
and IP-auth trunks render per 03 §5.3 (TCP/TLS add ;transport=). The
API refuses a server name that doesn't resolve and transports that are
off, because either makes Asterisk drop the trunk.

Live state: registration from PJSIPShowRegistrationsOutbound (re-read
on every Registry event: two sub-accounts on one server share
Username/Domain), reachability from PJSIPShowEndpoint and trunk
ContactStatus (static contacts aren't in PJSIPShowContacts). Trunk
state is admin-only. Dashboard gets a "Trunks up" card.

trunk-test.ts (in pnpm test:asterisk) runs a fake voip.ms (second
Asterisk): the good trunk registers, a wrong password is Rejected,
qualify reaches the provider; its recorded AMI drives the unit tests.
scripts/e2e/m3-t1.mjs does the same through the UI. The acceptance
check with a real voip.ms sub-account is still to do.

Tests: settle() now awaits an apply instead of a fixed sleep (flaked
under full-suite load).

Task: M3-T1
2026-10-17 19:42:14 -05:00

33 lines
1.0 KiB
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 && node --conditions=source apps/api/test/asterisk/trunk-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"
}
}