Queue MOH vs Global MOH

This is something of a logic bug in Asterisk 1.8 (im not sure of other versions)

Typically one sets the music on hold when a call enters the system, right, then say based on whatever dial-plan logic, the call is put in a queue. So now in your queue.conf you have gone to the trouble of setting specific music on hold for that specific queue… because you know you care about your customers… however what we all notice is that the queue.conf music on hold is ignored because the channel music on hold is set! ooops. so of course the queue.conf moh is not used! In order to enable the special moh in the queue you have to clear the channel moh, but now you land up with an even more silly problem in that the channel moh is cleared-out now and so putting the poor caller on hold, who was hearing such nice moh in the queue, gets the default moh, that of course nobody has set up.

It makes no sense that a more fin-grained settings cannot overwrite a global settings and then leave the global setting in place once the queue is over.

Any ideas of a work-around?
It would work perfectly if the queue.conf moh temporary set the music to play to the channel while in the channel was in the queue, and then the setting could default back to the original moh once the queue was over.

I stumbled upon this post: viewtopic.php?f=1&t=89529&p=197315
That actually has the solution. (Thanks David) So if you come across this, there is the deal.

When your callers dial in you can set their channel moh:

Then in order to have different moh in the queue (if the caller lands up in here), you have to remove it, otherwise the queue.conf cannot override it:

exten => s,n,Set(CHANNEL(musicclass)=) exten => s,n,Queue(queuename)


[queuename] musicclass=specialqueuemusic

Then the trick is to use mohsuggest in the sip.conf.

[100] mohsuggest=generalpurpose

That will make it so if someone has their channel moh removed (from being put in the queue), when you answer the call, and put the customer on hold, your channel makes a suggestion of moh, making the caller hear your nice pretty general music.