> 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/faq/incoming-routing/notification-of-employment-call-waiting.md).

# Notification of Employment, Call Waiting

1. Go to the [System file customization](/mikopbx/english/manual/system/custom-files.md) section

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fn06cIfMIqk6wJhcxD3gW%2FSystemFileCustomization.png?alt=media&amp;token=4edfbfbf-6903-46c5-b1b5-d2a62131f59e" alt=""><figcaption><p>System file customization menu</p></figcaption></figure>

2. Proceed to editing the "**modules.conf**" file

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FOOR18KwpzDhecRg5Ek3s%2FmodulesConf.png?alt=media&amp;token=7cd59158-ba08-43dc-82c0-97c47e7a2c29" alt=""><figcaption><p>modules.conf file</p></figcaption></figure>

3. Add the following code to the end of the file:

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

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FUkQcjI9Zi3qp6v4V2Evv%2FCodeForModules.png?alt=media&amp;token=0b0bf9ba-8f00-43ed-a616-65a9c58d41aa" alt=""><figcaption><p>Code for modules.conf</p></figcaption></figure>

4. Go to editing the file "**extensions.conf**"

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FNuELWVzuFh5rThr08jvu%2FEditExtensions.conf.png?alt=media&amp;token=567dc075-00ed-45a7-bc10-915ccc1dc97f" alt=""><figcaption><p>extensions.conf file</p></figcaption></figure>

5. Add the following code to the end of the file:

```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="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FodZ4yCgjHpmzsSilC2bC%2FCodeForExtensions2.png?alt=media&amp;token=b221f257-7e04-4424-8912-f2c1ee9657bd" alt=""><figcaption></figcaption></figure>

6. In the extension card, in the "**Advanced Settings**" - "**Extra Options**" field, set the value

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

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FSq8Wo5YoIl1eJe5bJXwX%2FparametersForExtensions.png?alt=media&amp;token=95212359-e72b-4767-b826-5c0e4ab0e7da" alt=""><figcaption></figcaption></figure>

If the employee is busy, a **beep** file (a short beep) will be played to the caller, then music will be played instead of beeps until the employee answers the call

{% hint style="warning" %}
**device\_state\_busy\_at** is the number of conversations at which the employee should be considered "busy", in this case the "**Routing Settings**" rules described in the employee card will start working.
{% endhint %}

If the problem solution does not work correctly, change the code in **extensions.conf** to:

```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
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
