apps/api/src/jobs.ts takes over the once-a-minute timer from index.ts
(no croner: every schedule in 04 §8 is whole minutes). Each job has a
running flag; errors are logged.
- Retention (at start and when the date changes, once AMI is up):
recordings, voicemail past voicemail.retentionDays (VoicemailRemove, so
Asterisk renumbers and updates MWI), expired sessions, webhook
deliveries older than 30 days.
- publicIpWatch (every 5 min, Settings -> Network): a changed IP is saved,
audited, applied (restart required) and emailed to admins.
- trunkWatch: a registering trunk rejected/unregistered for 5 minutes ->
one email per outage.
- diskWatch (hourly): under 10% free -> one email a day.
- A failed daily backup emails admins too.
Settings gets a Network tab (public IP, Detect, re-check) and voicemail
retention on the Recording tab.
Task: M11-T4