Time-based routing automatically directs calls differently based on business hours, holidays, or other schedules — essential for professional call handling outside operating hours. This guide covers configuring this in FreePBX/Asterisk.
Why Time-Based Routing Matters
Without it, calls received outside business hours ring the same way as during business hours, often resulting in unanswered calls with no appropriate after-hours message — time-based routing ensures callers receive appropriate handling regardless of when they call.
Setting Up a Time Condition in FreePBX
Applications > Time Conditions — define your business hours schedule and the destinations for calls matching (business hours) versus not matching (after hours) the defined schedule.
Creating a Time Group
Applications > Time Groups — define your specific business hours (Monday-Friday 9am-5pm, for example) as a reusable time group that time conditions reference.
Setting Business Hours Destination
Route business-hours calls to your normal handling (ring group, queue, or specific extension) — the "normal" call flow when staff are genuinely available.
Setting After-Hours Destination
Route after-hours calls to an appropriate alternative — a voicemail box specifically for after-hours messages, an after-hours answering service, or an emergency contact for genuinely urgent matters, depending on your business's specific needs.
Handling Holidays Separately
[Holiday Time Group]
December 25 (all day)
January 1 (all day)
Set up a separate holiday schedule/time condition, since holidays don't follow your regular weekly pattern — ensure your holiday schedule is configured with appropriate priority so it correctly overrides the regular business-hours schedule on those specific dates.
Setting Up Lunch Break or Other Intra-Day Variations
Beyond simple business-hours/after-hours, you can chain multiple time conditions for more nuanced routing (lunch break routing to voicemail while staff are out, for example) — build genuinely appropriate complexity for your specific operational patterns.
Testing Time-Based Routing
Most systems provide a way to preview/test how a call would currently route based on the configured schedule — verify your configuration behaves as expected before relying on it, particularly important since time-based logic errors might not be obvious until the specific time window when the issue would manifest.
Setting Up an Override for Genuine Emergencies
Consider whether you need a manual override capability (temporarily forcing after-hours routing during business hours for a snow day, for example) — FreePBX supports manual override feature codes for exactly this kind of exceptional situation.
Recording Appropriate Greetings for Each Time Period
Ensure your after-hours greeting clearly communicates your actual hours and appropriate next steps (leave a message, contact emergency line) — a generic or unclear after-hours message frustrates callers who genuinely need clear guidance.
Common Errors
Time condition doesn't switch at the expected time — verify your server's timezone configuration matches your actual business timezone; a server running in UTC without correct timezone configuration will apply your defined business hours at the wrong actual local time.
Continue Reading
- How to Install FreePBX on a VPS
- How to Configure Extensions and Voicemail in Asterisk
- How to Set Up an IVR (Interactive Voice Response) Menu
Browse more articles in VoIP & Communication Servers.