MOH default for all extensions

Current PBX Version:
Current System Version:12.7.3-1708-1.sng7
Asterisk 13.17.2

I searched for a while on this and it seems to have gone unanswered, so I have resorted to posting. I don’t mind doing some custom config edits if that’s what it requires…

I know you can set hold music on ring groups, but I can’t find any place to set the default music category for all extensions when they put a customer on hold. Is this even able to be set?

I am resorting to deleting all music in “default” category and filling it with my purchased music instead, but soon I will need to group advertisement hold music categories for different departments… and it seems I’m SOL. :grin:

I’m sure there are people here who would be able to tell how to do it the legitimate way.

But here’s a workaround…

Default MOH you can just delete all tracks and upload your custom.
If you want to separate by departments, create separate parking lots for each department, and have add the MOH to each parking lot accordingly.

Much luck m

I’ve not found a way for per-extension hold music. Its been requested by many customers but I don’t think we can do it in 13.

you can set the hold music in the inbound route, that will set the moh for all inbound calls.

Also Ext to Ext?

i think moh for ext-ext calls uses the default group. i know a few people have wished that it would be easier to deal with MOH.

Thank you. I didn’t think of that, but people would have to be trained to use the parking lots, so they probably wouldn’t get used. Yeah, it’s a default MOH life for me, until they program something different. Can’t complain with free development though.

Thank you adtopkek, Yes, I hope that can be implemented sooner than later. It’s one of those low priority items that just keeps bugging the forums :grin:

1 Like

If you put in a feature request it will actually be looked at by the developers.

1 Like

Hello @adtopkek,

You can use this code to fix a music on hold class to an extension like this.
put these lines in the extensions_custom.conf file:


;=== Set the moh class ===

exten => s,1,NoOp(The moh class is: ${MOHCLASS})
exten => s,n,Set(MOHCLASS=${IF($[ "${AMPUSER}" = "your_extension_number" ]?"your_moh_class")})
exten => s,n,GotoIf($[ "${MOHCLASS}" = "your_moh_class" ]?your_moh_class:exit)
exten => s,n(your_moh_class),Set(CHANNEL(musicclass)=${MOHCLASS})
exten => s,n(exit),MacroExit()

;=== End Set the moh class

Change your music on hold class and your extension accordingly to your pbx.
your_extension_number : your extension number
your_moh_class : your mousic on hold class.

Do not forget to reload the dialplan from the Linux console:
rasterisk -x'dialplan reload'

Thank you,

Daniel Friedman
Trixton LTD

1 Like