> 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="/files/WSPq11YLObOFcZaz2hm0" alt=""><figcaption><p>Раздел "Приложения диалпланов"</p></figcaption></figure>

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

<figure><img src="/files/RA2oZUg702UWDm3Y894E" alt=""><figcaption><p>Создание нового диалплана</p></figcaption></figure>

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

<figure><img src="/files/LA9vxypSbYBbSVjGkkOW" 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="/files/5StxNuZug7BigX3Kosni" alt=""><figcaption><p>Код для диалплана</p></figcaption></figure>

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

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

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

<figure><img src="/files/VUuCfVqNcFcxZzAVl1oF" 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="/files/bJpvKxEObZ3FGZZWOGBh" 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 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/faq/cases/pause-for-queue-agent.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.
