> 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/faq/cases/pause-for-queue-agent.md).

# Пауза для агента очереди

Для случая, когда сотрудник отошел и не может ответить на вызов бывает удобно поставить агента на паузу. К примеру сотрудник набирает специальный добавочный номер **\*46** и уходит по на обед.

Новые вызовы сотруднику перестанут поступать.

Когда сотрудник возвращается, снова набирает номер **\*46** и отключает паузу. В современных телефонах все можно свести к нажатию одной кнопки.

1. Перейдите в раздел "**Модули**" -> "**Приложения диалпланов**"

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FwoDoEypxEvca05OYDnvD%2FDialplanSection.png?alt=media&amp;token=36c67437-77d1-4632-a3cd-5b7e3386fc4a" alt=""><figcaption><p>Раздел "Приложения диалпланов"</p></figcaption></figure>

2. Создайте новый диалплан.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fmj96Ob2QIlTHJSARm6JQ%2FnewDialplan.png?alt=media&amp;token=8844f438-759a-4485-b48a-a842a3277d06" alt=""><figcaption><p>Создание нового диалплана</p></figcaption></figure>

3. Укажите название, а так же номер диалпана (в нашем случае - **2200105**). В качестве типа кода укажите "**Диалплан Asterisk**"

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FYTnL8YMAwfUsvXGYmzt3%2FDialplanSettings.png?alt=media&amp;token=02cbb067-cb4f-4ea2-b2b4-5434622088d9" alt=""><figcaption><p>Настройки нового диалплана</p></figcaption></figure>

4. Перейдите во вкладку "Программный код". Вставьте следующий код в черную область:

```php
1,Answer()
n,Set(PeerNumber=${CHANNEL(endpoint)})
n,Set(MemberStatus=${DB(QueueMemberOnPause/${PeerNumber}})
n,Set(AppName=${IF($[ "${MemberStatus}" != "1" ]?PauseQueueMember:UnpauseQueueMember)})
n,Set(NewMemberStatus=${IF($[ "${MemberStatus}" == "1" ]?0:1)})
n,Exec(${AppName}(,Local/${PeerNumber}@internal/n))
n,Set(DB(QueueMemberOnPause/${PeerNumber})=${NewMemberStatus})
n,Playback(beep)
n,Hangup()
```

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FRcVC4FbYpgA5mlNIn1Lq%2FCodeForDialplan.png?alt=media&amp;token=73defdf6-9478-488e-af6b-7a78003232f4" alt=""><figcaption><p>Код для диалплана</p></figcaption></figure>

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

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FmRoCXGlTdLZsCYDSh3T2%2FcustomizationFiles.png?alt=media&amp;token=ec18b151-274a-4a56-9e51-17f693db0bb7" alt=""><figcaption><p>Раздел "Кастомизация системных файлов"</p></figcaption></figure>

6. Откройте для редактирования файл «**/etc/asterisk/extensions.conf**»

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fgit-blob-0a1dd07707eb967d811042c18a85b2c567eb1916%2FextensionsConf%20(1).png?alt=media" alt=""><figcaption><p>Конфигурационный файл "extensions.conf"</p></figcaption></figure>

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

<pre class="language-php"><code class="lang-php">[all_peers](+)
exten => *46,1,Goto(applications,<a data-footnote-ref href="#user-content-fn-1">2200105,1</a>)
</code></pre>

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FRo4Hd6qXLYeXMOsUp98Q%2FcodeForExtensionsConf.png?alt=media&amp;token=11991173-994e-469f-b50a-dbb74b7915ff" alt=""><figcaption><p>Код для extensions.conf</p></figcaption></figure>

[^1]: Номер диалплана


---

# 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/faq/cases/pause-for-queue-agent.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.
