# 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&#x26;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&#x26;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&#x26;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&#x26;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&#x26;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&#x26;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 %}
