> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/english/manual/routing/out-off-work-time.md).

# 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="/files/zB6ROQE27Q8ji7kgp0NA" 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="/files/7U21rrJCCdmXYSB97QmZ" alt=""><figcaption><p>"Add time interval" button</p></figcaption></figure>

A form for creating a new rule will open.

<figure><img src="/files/muQvXCiPYxo0IOchPu2m" 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.
* **Time Range**: The time period during the day when employees are absent.
* **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.

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="/files/C2dxdGJuHviOGDfAD2lh" 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="/files/vcgnPh42NWqZVR7JwZlA" 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="/files/zCCSgPpInWkyeQCam98f" alt=""><figcaption><p>Example of the rule</p></figcaption></figure>

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

<figure><img src="/files/yP2r89re0im4J7ZB4lTr" alt=""><figcaption><p>Example of the rule</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mikopbx.com/mikopbx/english/manual/routing/out-off-work-time.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
