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

# Unique background music for the queue

The function can be useful if there is a need to play an advertising audio file instead of background music. You can assign your own file to each queue.

1. Go to the section "**Telephony**" -> "**Sound files**" -> "**Music on hold**"

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FPubfZhRet6DcTvbOjndA%2FSoundFilesSection.png?alt=media&amp;token=f309acff-5b76-4433-8a6f-98dc37e4faf1" alt=""><figcaption><p>Music on hold section</p></figcaption></figure>

2. Add media files:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FIutCNiIflyrKGgRUhkMh%2FnewAudioFile.png?alt=media&amp;token=c980bd85-86d7-4aea-a2f1-e985ad40658a" alt=""><figcaption><p>New audio file</p></figcaption></figure>

3. After saving the media file, copy its ID from the browser address bar. For example , in a link like "<mark style="color:blue;"><http://192.168.0.41/admin-cabinet/sound-files/modify/5></mark>" the identifier is the number **5**.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F3bs08Sv3taTP6PuiMcks%2FSoundID.png?alt=media&amp;token=eea7c9e1-d77d-46c7-a932-78d568b77c38" alt=""><figcaption><p>ID of the media file</p></figcaption></figure>

4. Go to the "**System**" -> "**System file customization**"

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fn06cIfMIqk6wJhcxD3gW%2FSystemFileCustomization.png?alt=media&amp;token=4edfbfbf-6903-46c5-b1b5-d2a62131f59e" alt=""><figcaption><p>"System file customization" section</p></figcaption></figure>

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

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FNuELWVzuFh5rThr08jvu%2FEditExtensions.conf.png?alt=media&amp;token=567dc075-00ed-45a7-bc10-915ccc1dc97f" alt=""><figcaption><p>"extensions.conf" file</p></figcaption></figure>

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

```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://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F7LTLe5MZDUMWL5iL2VBU%2FcodeForExtensions.png?alt=media&amp;token=f4a692a2-ebc9-4d4f-872f-f2058f1b799b" alt=""><figcaption><p>Code for extensions.conf</p></figcaption></figure>

{% hint style="success" %}
According to this example, for the queue with the number "**2001**", a file with the ID **5** will be played in the background, for the queue "**2002**", a file with the ID **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/english/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.
