It's 9 PM. Someone Calls Your Sales Line. What Happens?
Every business hits the same requirement in week one: calls arriving outside business hours need a story. Not a busy tone, not an infinite ring — a story. Maybe a voicemail box, maybe an emergency escalation for VIPs, maybe a “we’re closed, back at 9” prompt in three languages.
This post walks through the patterns RustPBX gives you for after-hours handling, from the simple to the fairly sophisticated.
The Building Blocks
RustPBX handles time-of-day at three layers, and they compose:
- ACD schedule rules — business hours, holidays, and night mode on the queue side
- IVR schedules — business-hours branching inside an IVR flow
- Routing-level fallbacks — the dialplan decides where calls go when nothing answers
Pattern 1: Closed Means Voicemail
The simplest story. Enable the voicemail addon and point night traffic at a mailbox:
[proxy]
addons = ["voicemail"]
[acd.policies.support.schedule]
[acd.policies.support.schedule.business_hours]
start = "09:00"
end = "18:00"
timezone = "Asia/Shanghai"
[acd.policies.support.schedule.night_mode]
enabled = true
start = "18:00"
end = "09:00"
action = "voicemail"
Callers outside 09:00–18:00 hear your greeting and leave a message. Messages land in the extension’s mailbox, with MWI notification and (optionally) email delivery. Deleting an extension cleans up its mailbox automatically via addon lifecycle hooks.
Pattern 2: Holidays Are Not Weekends
Night mode handles the daily cycle; holidays need their own map — because “closed” on New Year’s Day deserves a different message than a regular Tuesday night:
[acd.policies.support.schedule.holidays]
"2026-01-01" = { name = "New Year's Day", overflow_chain = ["voicemail"] }
"2026-02-17" = { name = "Spring Festival", overflow_chain = ["back_to_ivr"] }
Each holiday carries its own overflow chain: voicemail for passive days, back-to-IVR for days when a self-service flow can still serve callers.
Pattern 3: Emergency Lines Never Sleep
Some numbers must ring through at 3 AM — the security desk, the on-call doctor, the datacenter hotline. Emergency routing bypasses everything:
[proxy.emergency]
enabled = true
numbers = ["110", "119", "120", "911"]
emergency_trunk = "emergency-carrier"
No schedule check, no queue, no IVR — the call goes straight to the designated trunk.
Pattern 4: The Busy Extension That Waits
After-hours support often means one on-call engineer on a single extension. When they’re already on a call, the classic behavior — busy tone — is exactly wrong. RustPBX 0.5 added busy-wait (camp-on): the caller parks with looping hold audio, and the extension is re-dialed every N seconds until it frees up:
# in a forward route targeting the on-call extension
[busy_wait]
enabled = true
max_wait_secs = 120
retry_interval_secs = 15
hold_audio = "sounds/hold-music.wav"
Caller hangup or a non-busy failure exits the wait immediately.
Pattern 5: Overflow Chains as Escalation Ladders
For teams with an on-call rotation, overflow chains double as escalation ladders during covered hours too: first ring the frontline group, on timeout escalate to the senior group, then voicemail. With 0.5’s sequential overflow, the call dwells in each group in order instead of ringing everyone at once — and every hand-off emits an overflow_joined event you can audit the next morning.
Testing Without Waiting for 9 PM
Night logic that nobody tested is night logic that fails at 9:01. Two quick ways to validate:
- IVR test calls — the built-in Web Dialer (Diagnostics) places a real call through your flow; set the device clock aside and simply walk the branches with different source numbers.
- One-off holiday dry run — add tomorrow’s date to the holiday map with a harmless
back_to_ivrchain, call in, verify, then decide whether it stays.
And pair voicemail with email notification (SMTP settings) so the morning report includes overnight messages without anyone dialing into mailboxes.
The Checklist
- Business hours + timezone on the queue
- Night mode action (voicemail / IVR / hangup)
- Holiday map with per-holiday chains
- Emergency numbers bypassing everything
- Busy-wait on the on-call extension
- Escalation chain with events
Five minutes of config, and 9 PM calls have a story. The full details live in the Queue & ACD guide and the Voicemail addon docs.