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

# Pause for Queue agent

For the case when an employee has moved away and cannot answer a call, it is convenient to put the agent on pause. For example, an employee dials a special extension number **\*46** and leaves for lunch.

New calls to the employee will stop coming.

When the employee returns, he dials **\*46** again and disables the pause. In modern phones, everything can be reduced to pressing a single button.

1. Go to "**Modules**" -> "**Dialplan Applications**"

<figure><img src="/files/HEB8SKmoPAFsDoBlTQkE" alt=""><figcaption><p>Section "Dialplan applications"</p></figcaption></figure>

2. Create a new dialplan.

<figure><img src="/files/Vaqa4X5UONf5hdg0cWiV" alt=""><figcaption><p>Creating a new dialplan</p></figcaption></figure>

3. Specify the name, as well as the dialplan number (in our case - **2200105**). Specify "**Dialplan Asterisk**" as the code type

<figure><img src="/files/kwCpnUJAKVJ62MOk8C9h" alt=""><figcaption><p>New Dialplan Settings</p></figcaption></figure>

4. Go to the "**Programme Code**" tab. Paste the following code into the black area:

```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/kh3Sj418UEuN8RrnTKPD" alt=""><figcaption><p>Code for dialplan</p></figcaption></figure>

5. Go to the "**System file customization**" section

<figure><img src="/files/tYsBgqXvD9DV5euOc4N0" alt=""><figcaption><p>"System file customization' section</p></figcaption></figure>

6. Open the file "**/etc/asterisk/extensions.conf**" for editing

<figure><img src="/files/R61HVwQh4xX75UmmNNdE" alt=""><figcaption><p>"extensions.conf" file</p></figcaption></figure>

7. Paste the following code at the end of the file:

<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</a>,1)
</code></pre>

<figure><img src="/files/cA9GSXnDXzXBFyiz0Cq6" alt=""><figcaption><p>Code for extensions.conf</p></figcaption></figure>

[^1]: Dialplan number


---

# 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/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.
