Outbound Routes MOH not working

I was making an outbound route for a specific set of extensions so I could give them custom hold music as this post suggested:

I was under the impression that setting this up this way would make 1170 use the custom MOH instead of the default when making an outbound call. Do I have this setup correctly, do I have the wrong idea, or is outbound MOH not working properly?

Freepbx 14
Distro 7
Asterisk 13

Is this your top route? Or there’s a matching dial pattern in a other route which 1107 is using before trying to use this route…

This is above our bottom route which is the catch all/default. Checked all routes above this one and this extension is in none of them.

Our routes go like this:
911
Special Route
Special Route
Special Route
Special Route
Default

What happens when you place it on top? (Below 911)

Same thing. Called out, plays default music not the selected MOH music.

Logs would tell what’s wrong

-- Executing [4861854356@from-internal:1] Macro("PJSIP/1170-000003e3", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("PJSIP/1170-000003e3", "TOUCH_MONITOR=1522267383.85623") in new stack
-- Executing [s@macro-user-callerid:2] Set("PJSIP/1170-000003e3", "AMPUSER=1170") in new stack
-- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/1170-000003e3", "0?report") in new stack
-- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/1170-000003e3", "1?Set(REALCALLERIDNUM=1170)") in new stack
-- Executing [s@macro-user-callerid:5] Set("PJSIP/1170-000003e3", "AMPUSER=1170") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/1170-000003e3", "0?limit") in new stack
-- Executing [s@macro-user-callerid:7] Set("PJSIP/1170-000003e3", "AMPUSERCIDNAME=Business ") in new stack
-- Executing [s@macro-user-callerid:8] ExecIf("PJSIP/1170-000003e3", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:9] GotoIf("PJSIP/1170-000003e3", "0?report") in new stack
-- Executing [s@macro-user-callerid:10] Set("PJSIP/1170-000003e3", "AMPUSERCID=1170") in new stack
-- Executing [s@macro-user-callerid:11] Set("PJSIP/1170-000003e3", "__DIAL_OPTIONS=TtrxX") in new stack
-- Executing [s@macro-user-callerid:12] Set("PJSIP/1170-000003e3", "CALLERID(all)="Business " <1170>") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("PJSIP/1170-000003e3", "0?limit") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/1170-000003e3", "1?Set(GROUP(concurrency_limit)=1170)") in new stack
-- Executing [s@macro-user-callerid:15] ExecIf("PJSIP/1170-000003e3", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:16] NoOp("PJSIP/1170-000003e3", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:17] GotoIf("PJSIP/1170-000003e3", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,18)
-- Executing [s@macro-user-callerid:18] GotoIf("PJSIP/1170-000003e3", "1?continue") in new stack
-- Goto (macro-user-callerid,s,36)
-- Executing [s@macro-user-callerid:36] Set("PJSIP/1170-000003e3", "CALLERID(number)=1170") in new stack
-- Executing [s@macro-user-callerid:37] Set("PJSIP/1170-000003e3", "CALLERID(name)=Business ") in new stack
-- Executing [s@macro-user-callerid:38] GotoIf("PJSIP/1170-000003e3", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:39] Set("PJSIP/1170-000003e3", "CDR(cnam)=Business ") in new stack
-- Executing [s@macro-user-callerid:40] Set("PJSIP/1170-000003e3", "CDR(cnum)=1170") in new stack
-- Executing [s@macro-user-callerid:41] Set("PJSIP/1170-000003e3", "CHANNEL(language)=en") in new stack
-- Executing [4861854356@from-internal:2] Gosub("PJSIP/1170-000003e3", "sub-record-check,s,1(out,4861854356,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("PJSIP/1170-000003e3", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("PJSIP/1170-000003e3", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("PJSIP/1170-000003e3", "NOW=1522267383") in new stack
-- Executing [s@sub-record-check:4] Set("PJSIP/1170-000003e3", "__DAY=28") in new stack
-- Executing [s@sub-record-check:5] Set("PJSIP/1170-000003e3", "__MONTH=03") in new stack
-- Executing [s@sub-record-check:6] Set("PJSIP/1170-000003e3", "__YEAR=2018") in new stack
-- Executing [s@sub-record-check:7] Set("PJSIP/1170-000003e3", "__TIMESTR=20180328-160303") in new stack
-- Executing [s@sub-record-check:8] Set("PJSIP/1170-000003e3", "__FROMEXTEN=1170") in new stack
-- Executing [s@sub-record-check:9] Set("PJSIP/1170-000003e3", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("PJSIP/1170-000003e3", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("PJSIP/1170-000003e3", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("PJSIP/1170-000003e3", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("PJSIP/1170-000003e3", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("PJSIP/1170-000003e3", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("PJSIP/1170-000003e3", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("PJSIP/1170-000003e3", "Outbound Recording Check from 1170 to 4861854356") in new stack
-- Executing [out@sub-record-check:2] Set("PJSIP/1170-000003e3", "RECMODE=force") in new stack
-- Executing [out@sub-record-check:3] ExecIf("PJSIP/1170-000003e3", "0?Goto(routewins)") in new stack
-- Executing [out@sub-record-check:4] ExecIf("PJSIP/1170-000003e3", "0?Goto(routewins)") in new stack
-- Executing [out@sub-record-check:5] Gosub("PJSIP/1170-000003e3", "recordcheck,1(force,out,4861854356)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/1170-000003e3", "Starting recording check against force") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/1170-000003e3", "force") in new stack
-- Goto (sub-record-check,recordcheck,5)
-- Executing [recordcheck@sub-record-check:5] Set("PJSIP/1170-000003e3", "__REC_POLICY_MODE=FORCE") in new stack
-- Executing [recordcheck@sub-record-check:6] GotoIf("PJSIP/1170-000003e3", "1?startrec") in new stack
-- Goto (sub-record-check,recordcheck,16)
-- Executing [recordcheck@sub-record-check:16] NoOp("PJSIP/1170-000003e3", "Starting recording: out, 4861854356") in new stack
-- Executing [recordcheck@sub-record-check:17] Set("PJSIP/1170-000003e3", "AUDIOHOOK_INHERIT(MixMonitor)=yes") in new stack
-- Executing [recordcheck@sub-record-check:18] Set("PJSIP/1170-000003e3", "__CALLFILENAME=out-4861854356-1170-20180328-160303-1522267383.85623") in new stack
-- Executing [recordcheck@sub-record-check:19] MixMonitor("PJSIP/1170-000003e3", "/mnt/archivevolume/asterisk/monitor/2018/03/28/out-4861854356-1170-20180328-160303-1522267383.85623.wav,abi(LOCAL_MIXMON_ID),/usr/local/parselog/update_mix_mixmonitor.pl ^{UNIQUEID} ^{MIXMONITOR_FILENAME}") in new stack
-- Executing [recordcheck@sub-record-check:20] Set("PJSIP/1170-000003e3", "__MIXMON_ID=0x7fcdd40053e0") in new stack
--  Begin MixMonitor Recording PJSIP/1170-000003e3
-- Executing [recordcheck@sub-record-check:21] Set("PJSIP/1170-000003e3", "__RECORD_ID=PJSIP/1170-000003e3") in new stack
-- Executing [recordcheck@sub-record-check:22] Set("PJSIP/1170-000003e3", "__REC_STATUS=RECORDING") in new stack
-- Executing [recordcheck@sub-record-check:23] Set("PJSIP/1170-000003e3", "CDR(recordingfile)=out-4861854356-1170-20180328-160303-1522267383.85623.wav") in new stack
-- Executing [recordcheck@sub-record-check:24] Return("PJSIP/1170-000003e3", "") in new stack
-- Executing [out@sub-record-check:6] Return("PJSIP/1170-000003e3", "") in new stack
-- Executing [4861854356@from-internal:3] Set("PJSIP/1170-000003e3", "MOHCLASS=default") in new stack
-- Executing [4861854356@from-internal:4] Set("PJSIP/1170-000003e3", "_NODEST=") in new stack
-- Executing [4861854356@from-internal:5] Macro("PJSIP/1170-000003e3", "dialout-trunk,3,4861854356,,on") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("PJSIP/1170-000003e3", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/1170-000003e3", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:3] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERID(num)=1170)") in new stack
-- Executing [s@macro-dialout-trunk:4] GotoIf("PJSIP/1170-000003e3", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("PJSIP/1170-000003e3", "DIAL_NUMBER=4861854356") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("PJSIP/1170-000003e3", "DIAL_TRUNK_OPTIONS=TtrxX") in new stack
-- Executing [s@macro-dialout-trunk:7] Set("PJSIP/1170-000003e3", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("PJSIP/1170-000003e3", "DIAL_TRUNK_OPTIONS=TxX") in new stack
-- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/1170-000003e3", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,11)
-- Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/1170-000003e3", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:12] Macro("PJSIP/1170-000003e3", "outbound-callerid,3") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/1170-000003e3", "1170") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/1170-000003e3", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/1170-000003e3", "off") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERPRES(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERPRES(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] ExecIf("PJSIP/1170-000003e3", "0?Set(REALCALLERIDNUM=1170)") in new stack
-- Executing [s@macro-outbound-callerid:7] GotoIf("PJSIP/1170-000003e3", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,11)
-- Executing [s@macro-outbound-callerid:11] Set("PJSIP/1170-000003e3", "USEROUTCID="Business" <7896513485>") in new stack
-- Executing [s@macro-outbound-callerid:12] Set("PJSIP/1170-000003e3", "EMERGENCYCID="Business" <7896513485>") in new stack
-- Executing [s@macro-outbound-callerid:13] Set("PJSIP/1170-000003e3", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:14] GotoIf("PJSIP/1170-000003e3", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,19)
-- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:20] ExecIf("PJSIP/1170-000003e3", "1?Set(CALLERID(all)="Business" <7896513485>)") in new stack
-- Executing [s@macro-outbound-callerid:21] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:23] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:24] ExecIf("PJSIP/1170-000003e3", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:25] Set("PJSIP/1170-000003e3", "CDR(outbound_cnum)=7896513485") in new stack
-- Executing [s@macro-outbound-callerid:26] Set("PJSIP/1170-000003e3", "CDR(outbound_cnam)=Business") in new stack
-- Executing [s@macro-dialout-trunk:13] GosubIf("PJSIP/1170-000003e3", "1?sub-flp-3,s,1()") in new stack
-- Executing [s@sub-flp-3:1] ExecIf("PJSIP/1170-000003e3", "1?Set(TARGET_FLP_3=14861854356)") in new stack
-- Executing [s@sub-flp-3:2] GotoIf("PJSIP/1170-000003e3", "1?match") in new stack
-- Goto (sub-flp-3,s,6)
-- Executing [s@sub-flp-3:6] Set("PJSIP/1170-000003e3", "DIAL_NUMBER=14861854356") in new stack
-- Executing [s@sub-flp-3:7] Return("PJSIP/1170-000003e3", "") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("PJSIP/1170-000003e3", "OUTNUM=14861854356") in new stack
-- Executing [s@macro-dialout-trunk:15] Set("PJSIP/1170-000003e3", "custom=IAX2/cr3") in new stack
-- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/1170-000003e3", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)TxX)") in new stack
-- Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/1170-000003e3", "0?Set(DIAL_TRUNK_OPTIONS=TxXM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:18] Macro("PJSIP/1170-000003e3", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/1170-000003e3", "") in new stack
-- Executing [s@macro-dialout-trunk:19] GotoIf("PJSIP/1170-000003e3", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/1170-000003e3", "1?Set(CONNECTEDLINE(num,i)=14861854356)") in new stack
-- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/1170-000003e3", "1?Set(CONNECTEDLINE(name,i)=CID:7896513485)") in new stack
-- Executing [s@macro-dialout-trunk:22] ExecIf("PJSIP/1170-000003e3", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)7896513485)") in new stack
-- Executing [s@macro-dialout-trunk:23] GotoIf("PJSIP/1170-000003e3", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:24] Dial("PJSIP/1170-000003e3", "IAX2/cr3/14861854356,300,TxXb(func-apply-sipheaders^s^1)") in new stack

The MOH class looks like it may be getting picked up from the extension and not the route. Check to make sure the Trunk MOH (if there is one) is not set, or at least not set to “default”.

Pretty sure it is getting picked up by the extension and not the route otherwise this would be working, I wonder if the router is overriding or set to the right priority. I don’t even see an option in trunks for MOH so I don’t think its that.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.