Skip to main content

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

ElementDescription
Weekly ScheduleOpen hours for each day of the week
Time ZoneIANA timezone for accurate routing
ExceptionsClosed dates or special hours (for example, holidays)
Open DestinationWhere calls go during business hours
Closed DestinationWhere calls go after hours

Destination Types

Business hours support the following destination types using prefixed string IDs:

PrefixDestination
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

ActionOwnerPBX AdminPBX UserReporter
View schedulesYesYesYesYes
Create schedulesYesYesNoNo
Update schedulesYesYesNoNo
Delete schedulesYesYesNoNo

UI Workflow

Create a Schedule

  1. Navigate to Business Hours in the sidebar
  2. Click Create Schedule
  3. Enter a name and select a timezone
  4. Define weekly hours for each day
  5. Add exceptions (holidays or special hours)
  6. Set the open-hours destination
  7. Set the closed-hours destination
  8. Save

Duplicate a Schedule

  1. Open the schedule
  2. Click Duplicate
  3. The system creates a copy with "(Copy)" appended to the name
  4. 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-business
  • mon-fri-all-day
  • sun-thu-business
  • sun-thu-all-day
  • 24-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

ColumnTypeNotes
idbigintPrimary key
organization_idFKTenant scope, soft deletes
namestringUnique per org
statusenumactive, inactive
timezonestringIANA timezone
open_hours_actionJSON{target_id: "ext-13"}
open_hours_action_typeenumBusinessHoursActionType
closed_hours_actionJSON{target_id: "rg-5"}
closed_hours_action_typeenumBusinessHoursActionType
  • business_hours_schedule_days — One row per day of the week per schedule
  • business_hours_time_ranges — Time intervals per day
  • business_hours_exceptions — Exception dates
  • business_hours_exception_time_ranges — Exception time intervals
MethodEndpointPurpose
GET/POST/PUT/DELETE/v1/business-hours[/{businessHour}]Standard CRUD
POST/v1/business-hours/{businessHour}/duplicateDuplicate a schedule
PATCH/v1/business-hours/{businessHour}/toggle-statusToggle active status

See the OPBX REST API reference for full schemas.