# Route Inbound Calls based on Business Hours

An inbound route can react to the time a call arrives, sending it to one destination while you are open, another during holidays, and a third when you are closed. This walkthrough shows how to build such a route around the Business Hours you have defined for a time zone, using a typical office schedule as the example.

## Scenario

Suppose your office keeps the following hours:

- **Open days**: Monday through Friday
- **Open times**: 09:00 to 12:00 and 14:00 to 18:00

Callers reach you through a trunk named `sip_routein_GBH`. A trunk is the line that connects your phone system to the outside telephone network. You want the system to handle those calls like this:

- While the office is open, send callers to an IVR that greets business callers. An IVR (Interactive Voice Response) is the automated menu that answers a call and lets the caller pick an option from their keypad.
- On holidays, play an `office_holiday` announcement and then send callers to a separate holiday IVR.
- At every other time, send callers to voicemail.

## Before you begin

Make sure the following pieces are in place:

- The trunk that carries your inbound calls is set up and active.
- [Business Hours](/pbx/administrator-guide/set-global-business-hours/) are defined for the time zone that matches your office schedule.
- The destinations you plan to route to already exist. For this example, you need a business-hours IVR and a holiday IVR configured ahead of time. See [Set up an IVR](/pbx/administrator-guide/set-up-an-ivr/) for details.
- If you want callers to hear an announcement on holidays, record or upload the prompt first. This example uses a prompt named `office_holiday`. See [Create a Holiday](/pbx/administrator-guide/create-a-holiday/) for related steps.

:::note
To route calls by more than one time schedule, give each inbound route its own trunk, or a trunk with distinct DID (Direct Inward Dialing) numbers, so that every call lands on the route you intend. A DID number is the specific phone number a caller dials to reach you. For routing by dialed number, see [Route Inbound Calls based on DID Numbers](/pbx/administrator-guide/route-inbound-calls-based-on-did-numbers/).
:::

## Build the inbound route

1. Sign in to the PBX (Private Branch Exchange, your phone system) web portal and go to **Call Control > Inbound Route**, then click **Add**.

2. In **Name**, type a label that will help you recognize this route later.

   :::tip
   Use a descriptive name such as `Inbound_BusinessHours`. A clear name saves time when you have several inbound routes and need to find the right one later.
   :::

3. Under **Trunk**, move the trunks you want this route to serve from the **Available** list into the **Selected** list. For this example, select `sip_routein_GBH`.

   ![Inbound route form with the sip_routein_GBH trunk moved into the Selected column](/images/pbx/inbound-route-based-on-global-business-hours-trunk-ce.png)

4. Under **Default Destination**, select the **Time Condition** checkbox.

   ![Default Destination section showing the Time Condition options and per-period destinations](/images/pbx/inbound-route-based-on-global-business-hours-destination-1.png)

5. Open the **Time-based Routing Mode** drop-down, choose **Based on Business Hours Configured for the Time Zone**, then pick the time zone whose schedule you want to follow.

   :::caution
   Pick the same time zone you used when you set your Business Hours and Holidays. If the time zone here does not match, calls will be routed against the wrong clock and may reach the wrong destination.
   :::

6. Choose a destination for each time period:

   - **Business Hours Destination**: Where calls go during the [Business Hours](/pbx/administrator-guide/set-global-business-hours/) set for the chosen time zone. For this example, select **IVR** and pick the business-hours IVR.
   - **Outside Business Hours Destination**: Where calls go at times that fall outside both Business Hours and Holidays. For this example, select **Extension Voicemail** and choose an extension number.
   - **Holidays Destination**: Where calls go during the [holidays](/pbx/administrator-guide/create-a-holiday/) set for the chosen time zone. For this example, select **IVR** and pick the holiday IVR.

   :::note
   "Outside Business Hours" covers any time that is neither Business Hours nor a Holiday: nights, weekends, and the lunch gap between your two open blocks. In this example, calls that arrive between 12:00 and 14:00 count as outside business hours, so they go to voicemail.
   :::

7. Select the **Play Holiday Prompt During Holidays** checkbox.

   :::note
   With this box checked, the system plays your holiday prompt (here, `office_holiday`) first, then forwards the call to the Holidays Destination. Leave it unchecked if you do not want an announcement before the holiday IVR.
   :::

8. Click **Save**, then **Apply**.

   :::caution
   The new route does not take effect until you click **Apply**. If you only click **Save**, callers keep following the old routing until you apply the change.
   :::

## Result

Calls that come in on the `sip_routein_GBH` trunk now follow the clock: business callers reach the business IVR during open hours, holiday callers hear the announcement and reach the holiday IVR, and everyone else goes to voicemail.
