> 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/unique-background-music-for-the-queue.md).

# Уникальная фоновая музыка для очереди

Функция может быть полезна, если вместо фоновой музыки есть необходимость воспроизводить рекламный аудиофайл. Для каждой очереди можно назначить свой файл.

1. Перейдите в раздел «**Телефония**» - «**Звуковые файлы**» - «**Музыка на удержании**»

<figure><img src="/files/iRyji8iKDNUr3V9jCO77" alt=""><figcaption><p>Раздел "Звуковые файлы"</p></figcaption></figure>

2. Добавьте медиафайлы:

<figure><img src="/files/gUAkTeW1w1wnH1AE44lR" alt=""><figcaption><p>Новый звуковой файл</p></figcaption></figure>

3. После сохранения медиа файла скопируйте его идентификатор из адресной строки браузера. К примеру в ссылке вида «<http://192.168.0.41/admin-cabinet/sound-files/modify/5>» идентификатором является число **5**.

<figure><img src="/files/CCzl2xg1EetMwycI9mM6" alt=""><figcaption><p>Идентификатор медиа файла</p></figcaption></figure>

4. Перейдите в раздел «**Система**» - «**Кастомизация системных файлов**»

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

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

<figure><img src="/files/ZMe4qhcH9ebpzuUxfZXU" alt=""><figcaption><p>Конфигурационный файл "extensions.conf"</p></figcaption></figure>

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

```php
[queue-pre-dial-custom]
exten => 2001,1,Set(CHANNEL(musicclass)=moh-5)
exten => 2002,1,Set(CHANNEL(musicclass)=moh-6)
exten => _X!,2,return
```

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

{% hint style="success" %}
Согласно этому примеру для очереди с номером «**2001**» будет воспроизводится в фоне файл с идентификатором **5**, для очереди «**2002**» файл с идентификатором **6**
{% endhint %}


---

# 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/unique-background-music-for-the-queue.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.
