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"

Music on hold section
  1. Add media files:

New audio file
  1. 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.

ID of the media file
  1. Go to the "System" -> "System file customization"

"System file customization" section
  1. Open the file "/etc/asterisk/extensions.conf" for editing

"extensions.conf" file
  1. 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
Code for extensions.conf

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