Business Hours
Business Hours enable time-based call routing. Calls route to different destinations depending on whether your business is open or closed.
Purpose
Use this module to:
- Define weekly open and closed hours
- Configure time zones
- Add holiday and special-hours exceptions
- Route calls to different destinations during open and closed periods
Configuration Elements
| Element | Description |
|---|---|
| Weekly Schedule | Open hours for each day of the week |
| Time Zone | IANA timezone for accurate routing |
| Exceptions | Closed dates or special hours (for example, holidays) |
| Open Destination | Where calls go during business hours |
| Closed Destination | Where calls go after hours |
Destination Types
Business hours support the following destination types using prefixed string IDs:
| Prefix | Destination |
|---|---|
ext-{id} | Extension |
rg-{id} | Ring Group |
conf-{id} | Conference Room |
ivr-{id} | IVR Menu |
ai-{id} | AI Assistant |
alb-{id} | AI Load Balancer |
Permissions
| Action | Owner | PBX Admin | PBX User | Reporter |
|---|---|---|---|---|
| View schedules | Yes | Yes | Yes | Yes |
| Create schedules | Yes | Yes | No | No |
| Update schedules | Yes | Yes | No | No |
| Delete schedules | Yes | Yes | No | No |
UI Workflow
Create a Schedule
- Navigate to Business Hours in the sidebar
- Click Create Schedule
- Enter a name and select a timezone
- Define weekly hours for each day
- Add exceptions (holidays or special hours)
- Set the open-hours destination
- Set the closed-hours destination
- Save
Duplicate a Schedule
- Open the schedule
- Click Duplicate
- The system creates a copy with "(Copy)" appended to the name
- Edit the copy as needed
Toggle Status
Use the status toggle to enable or disable a schedule. Disabled schedules are not used for routing.
Schedule Templates
The frontend provides templates to speed up configuration:
mon-fri-businessmon-fri-all-daysun-thu-businesssun-thu-all-day24-7
Holiday Import
The UI can fetch public holidays from date.nager.at by country and year. Select the holidays you want to import as closed exceptions.
Key Data Fields
business_hours_schedules Table
| Column | Type | Notes |
|---|---|---|
id | bigint | Primary key |
organization_id | FK | Tenant scope, soft deletes |
name | string | Unique per org |
status | enum | active, inactive |
timezone | string | IANA timezone |
open_hours_action | JSON | {target_id: "ext-13"} |
open_hours_action_type | enum | BusinessHoursActionType |
closed_hours_action | JSON | {target_id: "rg-5"} |
closed_hours_action_type | enum | BusinessHoursActionType |
Related Tables
business_hours_schedule_days— One row per day of the week per schedulebusiness_hours_time_ranges— Time intervals per daybusiness_hours_exceptions— Exception datesbusiness_hours_exception_time_ranges— Exception time intervals
Related API Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET/POST/PUT/DELETE | /v1/business-hours[/{businessHour}] | Standard CRUD |
| POST | /v1/business-hours/{businessHour}/duplicate | Duplicate a schedule |
| PATCH | /v1/business-hours/{businessHour}/toggle-status | Toggle active status |
See the OPBX REST API reference for full schemas.
Related Modules
- Phone Numbers — DIDs can route to business hours
- IVR Menus — IVR options can route to business hours
- Ring Groups — Common closed-hours destination