setup: first-run wizard, telephony restart, system status
ci / check (push) Canceled after 0s
ci / images (push) Canceled after 0s

/setup walks a fresh install to working calls: password (done by the
forced change), company, network (detect public IP, LAN IP from
/api/system/status, router checklist; restarts telephony because the
transports changed), email (skippable), voip.ms trunk (Next unlocks on
Registered), phone numbers, users (extension auto-numbered, temporary
passwords shown once), main number routing, emergency (default E911
caller ID required once a trunk exists), done. Steps 7-8 ship now
because the acceptance needs a user and a routed number; their M6
choices (everyone, IVR) come later. Admins land on /setup until it is
finished or skipped.

api: /api/setup/status and /complete, POST
/api/settings/network/detect-public-ip (ipify, then ifconfig.me),
GET /api/system/status (M3 subset), POST /api/system/asterisk/restart
(an AMI disconnect during a restart counts as success).
restartRequired clears on AMI connect once Asterisk's uptime shows it
started after the change. The first phone number becomes the default
outbound caller ID when none is set (found by the acceptance run:
calls otherwise left with the provider's caller ID).

Verified: scripts/e2e/m3-t5.mjs on a fresh database against the fake
voip.ms: wizard end to end, then an inbound call to the DID rings the
new user's softphone and an outbound call leaves as 13125550000 with
the DID in Remote-Party-ID. m1-t4 now passes through "Skip setup".

Task: M3-T5
This commit is contained in:
iamdoubz committed 2026-10-17 21:11:04 -05:00
1 parent 409724bc55
commit c2b9fff126
19 files changed
+1455 -210

No files matched your search

+11
View File
@@ -66,6 +66,17 @@ to the next one. Steps can be skipped where noted.
9. Emergency: default E911 caller ID DID (required if a trunk exists), notification emails. Shows the 06 §6 text about registering the address at voip.ms.
10. Done: shows "Dial *43 from any phone for an echo test" and links to the softphone.
Implementation notes (M3):
- Admins are sent to `/setup` until `setup.completed` is true; "Skip setup" completes it.
- Step 1 is already done by the forced password change at first sign-in, so it only confirms.
- Step 3 changes the SIP transports; on a fresh install the wizard restarts telephony right away
(`POST /api/system/asterisk/restart?now=true`). `restartRequired` clears on the next AMI
connect once Asterisk's uptime shows it started after the change.
- M3 also ships steps 7 and 8 because "calls work using only the wizard" needs a user and a
routed number. Step 8 offers a user or an outside number; "everyone" and "an IVR" arrive in M6.
Step 10 does not mention *43 or the softphone until M6/M5 build them.
- The first phone number added becomes `routing.defaultCallerIdDidId` when none is set.
## 3. Shared components (`src/components/`)
- **DestinationPicker**: a type select (User, Voicemail of user, Ring group, Queue,