> 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="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FiqHc3kXae0vSFaZ9zt3E%2FsoundFiles.png?alt=media&amp;token=4e1741fc-97d5-4a38-9d07-eeaaa17d352c" 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%2Ft6CII6OxwIp9EQHsforg%2FnewSoundFile.png?alt=media&amp;token=fb002fb0-34d8-4b5a-986c-7923fb166c34" alt=""><figcaption><p>Новый звуковой файл</p></figcaption></figure>

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

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FZpe6Ki7GRU8vWiOLDyix%2FSoundFileID.png?alt=media&amp;token=fb521232-29eb-482a-8974-b372fbe266e4" alt=""><figcaption><p>Идентификатор медиа файла</p></figcaption></figure>

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

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FQvcuqaGieZX0m7MoutUm%2FCustomizationFilesMenu.png?alt=media&amp;token=9aa4670e-73be-45af-8512-ad5bc9ffd9fd" alt=""><figcaption><p>Раздел "Кастомизация системных файлов"</p></figcaption></figure>

5. Откройте для редактирования файл «**/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%2FA3LCI7r47uWs6J57IeL3%2FextensionsConf.png?alt=media&amp;token=a4b0fca8-0a34-4974-96c4-d90d54d4cf47" 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="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fgit-blob-015d3b74d6d58c2c09b27a5f25996fb14cd92ed4%2FcodeForExtensionsConf%20(1).png?alt=media" 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 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/unique-background-music-for-the-queue.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.
