Play a set of announcements randomly while waiting in the queue

Hello,

I’m currently running Asterisk 16 and have a number of sound files with recorded ads for my company. I’d like to play those files randomly while people are waiting on the queue mixed up with the MusicOnHold (not mixing up the audio but insert an add every X amount of time pausing the MOH while doing it).

So, for example, while a caller is waiting in the queue, play announcement like this:

  1. play MOH for X seconds
  2. play ad1
  3. play MOH for X seconds
  4. play ad2
  5. play MOH for X seconds
  6. play ad3
  7. play MOH for X seconds
  8. play ad4
  9. Start over

Is there a way to achieve this?

Thanks

Best way for me to get this done is mixing the announcement and the music on a single file, but if you dont want to do it like this try periodic-announce option, dont know if this option will do exactly what you want because I haven’t test it ,check the samples configuration file for more information

http://svn.digium.com/svn/asterisk/trunk/configs/samples/queues.conf.sample