# Уведомление о занятости, Call Waiting

1. Перейдите в раздел [Кастомизация системных файлов](/mikopbx/manual/system/custom-files.md)

<figure><img src="/files/vijEVOA1rNRbdd8BCwSl" alt=""><figcaption><p>Раздел "Кастомизация системных файлов"</p></figcaption></figure>

2. Перейдите к редактированию файла "**modules.conf**"

<figure><img src="/files/cI1D7kqlP84Ft1oBzdy1" alt=""><figcaption><p>Редактирование файла "modules.conf"</p></figcaption></figure>

3. Добавьте в конец файла следующий код:

```php
load => func_extstate.so
```

<figure><img src="/files/mi3EUG9n7ASHczmDuTht" alt=""><figcaption><p>Код для "modules.conf"</p></figcaption></figure>

4. Перейдите к редактированию файла "**extensions.conf**"

<figure><img src="/files/VUuCfVqNcFcxZzAVl1oF" alt=""><figcaption><p>Редактирование файла "extensions.conf"</p></figcaption></figure>

5. Добавьте в конец файла следующий код:

```php
[internal-users-custom]
exten => _X!,1,Progress()
  same => n,ExecIf($["${EXTENSION_STATE(${EXTEN})@internal-hints}" = "INUSE" || "${EXTENSION_STATE(${EXTEN}@internal-hints)}" = "RINGINUSE"]?Playback(beep))
  same => n,ExecIf($["${EXTENSION_STATE(${EXTEN})@internal-hints}" = "INUSE" || "${EXTENSION_STATE(${EXTEN}@internal-hints)}" = "RINGINUSE"]?Set(TRANSFER_OPTIONS=${TRANSFER_OPTIONS}m))
    same => n,return
```

<figure><img src="/files/oLuonWG0V5Zjb5FG9I3M" alt=""><figcaption><p>Код для "extensions.conf"</p></figcaption></figure>

6. В карточке сотрудника, в поле «**Расширенные настройки**» - «**Дополнительные параметры**» установите значение

```
[endpoint]
device_state_busy_at = 3
```

<figure><img src="/files/WFQhOpxA9RsVxULjPxBM" alt=""><figcaption></figcaption></figure>

Если сотрудник будет занят, то звонящему будет проигран файл **beep** (короткий гудок), затем вместо гудков будет проигрываться музыка, пока сотрудник не ответит на вызов

{% hint style="warning" %}
**device\_state\_busy\_at** - это то количество разговоров, при котором следует считать сотрудника «занятым», в этом случае начнут работать правила «**Настройки маршрутизации**», описанные в карточке сотрудника.
{% endhint %}

В случае некорректной работы решения задачи, измените код в **extensions.conf** на:

```php
[internal-users-custom]
exten => _X!,1,Progress()
same => n,NoOp(${EXTEN})
same => n,NoOp(${DEVICE_STATE(PJSIP/${EXTEN})})
same => n,ExecIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INUSE" || "${DEVICE_STATE(PJSIP/${EXTEN})}" = "RINGINUSE"]?Background(nomer&zanjat))
same => n,ExecIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INUSE" || "${DEVICE_STATE(PJSIP/${EXTEN})}" = "RINGINUSE"]?Set(TRANSFER_OPTIONS=${TRANSFER_OPTIONS}m(callwaiting)))
same => n,return
```


---

# Agent Instructions: 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:

```
GET https://docs.mikopbx.com/mikopbx/faq/incoming-routing/notification-of-employment-call-waiting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
