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.
Go to the section "Telephony" -> "Sound files" -> "Music on hold"

Add media files:

After saving the media file, copy its ID from the browser address bar. For example , in a link like "http://192.168.0.41/admin-cabinet/sound-files/modify/5" the identifier is the number 5.

Go to the "System" -> "System file customization"

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

Paste the following code at the end of the file:
[queue-pre-dial-custom]
exten => 2001,1,Set(CHANNEL(musicclass)=moh-5)
exten => 2002,1,Set(CHANNEL(musicclass)=moh-6)
exten => _X!,2,return

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
Last updated
Was this helpful?