Queue music different from hold music

Hi all,

I have to two queues with different music classes (queue-music1 and queue-music2) in queues.conf for the caller waiting for an agent to take the call. When an agent took the call and presses the hold key on his phone I would like to play different misc on each queue (moh-music1 and moh-music2). The music played after agent presses hold should be different in each queue and different from the queue misc (caller waiting for an agent in the beginning).

I have tried to use SetMusicOnHold in the dialplan but it overrides the misc setting in queues.conf. The result is that the same music is played when the caller is waiting for an agent and when the agent presses hold during a call.

To me it seems what I want to do is not possible. Or do I overlook something?

I’m using Asterisk 11.7.0


The call is no longer really on the queue at that stage, and the bridge will bass the AST_CONTROL_HOLD all the way through, so you will get the agent’s class suggestion, not the queue’s.

I’m not sure if you can run dialplan on the caller at the point the all is answered, but if you can, you could set the music class there.

If the agent only answers one queue, you may be able to associate the MoH suggestion with the agent.

Thanks for your answer!

Haven’t found a way either.

Can’t find a way to associate MoH with a specific agent. There seems to be a general setting for all agents but not to differentiate agents.

My problem still exists. If anyone knows how to do it, please let me know.

The suggestion is coming from the device that is acting as the agent. If that device is the agent phone, rather than a trunk to to it, you should be able to set the suggested MoH in the channel technology driver configuration file (e.g. sip.conf).


I tried to set musicclass and musiconhold at the friend definition in sip.conf. But the default class is played and my setting in sip.conf is ignored. My queue looks like this:

queue show 123
123 has 0 calls (max unlimited) in 'ringall' strategy (3s holdtime, 6s talktime), W:0, C:36, A:17, SL:0.0% within 0s
      SIP/10 (ringinuse disabled) (Not in use) has taken 1 calls (last was 486 secs ago)
      SIP/12 (ringinuse disabled) (Not in use) has taken no calls yet
   No Callers

I was very careful to use the word “suggest”. According to the documentation that you should have read:

; This option specifies which music on hold class to suggest to the peer channel ; when this channel places the peer on hold. It may be specified globally or on ; a per-user or per-peer basis. ; ;mohsuggest=default

Wow. It’s working. Never heard of mohsuggest before. Thank you very much!