# Night and Holiday Switch

"Off-hours" in MikoPBX is a tool for setting up call processing rules during periods when the company is not working, such as at night, on weekends or holidays. With its help, administrators can determine how the system will handle incoming calls during off-hours: forward to an answering machine, play special voice messages or forward calls to the mobile numbers of on-duty employees. This ensures correct interaction with customers outside of working hours and maintains a high level of service.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FVGt5hUMWfVx4swpuybf2%2F1.png?alt=media&#x26;token=4c5f0945-c813-4f90-8c1c-412532b1f5d3" alt=""><figcaption><p>"Call routing" -> "Night and Holiday Switch" Section</p></figcaption></figure>

## Creating a rule

To add a new rule, click on the "**Add Time Interval**" button.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FQE1gUzHDhC8A4cLHLODC%2F2.png?alt=media&#x26;token=f520cdae-2cf0-41fd-a5fe-797470f531cb" alt=""><figcaption><p>"Add time interval" button</p></figcaption></figure>

A form for creating a new rule will open.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FobYTtcnXkL86hb5dQLQu%2F3.png?alt=media&#x26;token=49e8f644-4c15-4e1c-bc96-48a90c271896" alt=""><figcaption><p>A form for creating a new rule</p></figcaption></figure>

In the form, you will find the following fields:

* **Period**: The calendar period when employees are absent from the office, such as during New Year's or May holidays.
* **Weekdays**: Specific weekdays for which the rule will be applied.&#x20;
* **Time Range**: The time period during the day when employees are absent.&#x20;
* **Incoming Call Action**: You can choose to **play a sound file** or perform a call transfer. Call transfer options include transferring the call to a conference, IVR menu, queue, internal employee extension, or specific termination numbers.&#x20;

In the **Note** field, you can add a note with a description of the created rule, so that you can quickly navigate through the essence of this rule using this description. With the **eraser button**, you can clear the fields opposite which this button is located.

### Apply only to certain incoming routes

By activating this function, a new menu "**Route restrictions**" will appear on top of you

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FxYH6b81JRmwDY4p0cuLw%2F7.png?alt=media&#x26;token=39077705-2458-4938-9cf3-714fb297e3c7" alt=""><figcaption><p>"Apply only to certain incoming routes" switch and "Route restrictions" Section</p></figcaption></figure>

Here you can choose which specific routes the rule you are creating will apply to.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FoTnmkd5kONtAXCClhZRy%2F8.png?alt=media&#x26;token=a908e537-66a5-44df-95fd-8db37acf67cd" alt=""><figcaption><p>"Route restrictions" section</p></figcaption></figure>

## Examples of rules

This rule is used for calls during non-working hours from Monday to Friday, specifically from **7:00** **PM** to **9:00 AM:**

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FqvTmapJWw3N45QONxcNn%2F5.png?alt=media&#x26;token=4ebbc081-ea51-4223-a85d-577c7a16d213" alt=""><figcaption><p>Example of the rule</p></figcaption></figure>

This rule is used to handle calls on Saturdays and Sundays:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FLXCUn6gGuHQ45qqZuX0y%2F6.png?alt=media&#x26;token=246db821-d1d3-4e43-8933-a2e53026c152" alt=""><figcaption><p>Example of the rule</p></figcaption></figure>
