Pbx_functions.c: Function LANGUAGE not registered - Calls Stop

I’m running Asterisk 13.17 and randomly calls just starting failing. I go into the logs and for the failed calls I see the following:

[2019-03-07 08:06:15] ERROR[3986][C-0000ca29] pbx_functions.c: Function LANGUAGE not registered

When the calls start working again this goes away. Any ideas what might be happening here?

Need the full call trace around one of these errors. As far as I know, there is no such function as LANGUAGE:

freepbx*CLI> core show function LANGUAGE
No function by that name registered.
Command 'core show function LANGUAGE' failed.
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:1] Macro("SIP/300-00002cdd", "user-callerid,LIMIT,EXTERNAL,") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:1] Set("SIP/300-00002cdd", "TOUCH_MONITOR=1551964173.16295") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:2] Set("SIP/300-00002cdd", "AMPUSER=300") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:3] GotoIf("SIP/300-00002cdd", "0?report") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:4] ExecIf("SIP/300-00002cdd", "1?Set(REALCALLERIDNUM=300)") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:5] Set("SIP/300-00002cdd", "AMPUSER=300") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:6] GotoIf("SIP/300-00002cdd", "0?limit") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:7] Set("SIP/300-00002cdd", "AMPUSERCIDNAME=LetoCom Office") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:8] ExecIf("SIP/300-00002cdd", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:9] GotoIf("SIP/300-00002cdd", "0?report") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:10] Set("SIP/300-00002cdd", "AMPUSERCID=300") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:11] Set("SIP/300-00002cdd", "__DIAL_OPTIONS=Ttr") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:12] Set("SIP/300-00002cdd", "CALLERID(all)="LetoCom Office" <300>") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:13] GotoIf("SIP/300-00002cdd", "0?limit") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:14] ExecIf("SIP/300-00002cdd", "1?Set(GROUP(concurrency_limit)=300)") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:15] ExecIf("SIP/300-00002cdd", "0?Set(CHANNEL(language)=)") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:16] NoOp("SIP/300-00002cdd", "Macro Depth is 1") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:17] GotoIf("SIP/300-00002cdd", "1?report2:macroerror") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx_builtins.c: Goto (macro-user-callerid,s,18)
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:18] GotoIf("SIP/300-00002cdd", "1?continue") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx_builtins.c: Goto (macro-user-callerid,s,37)
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:37] Set("SIP/300-00002cdd", "CALLERID(number)=300") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:38] Set("SIP/300-00002cdd", "CALLERID(name)=LetoCom Office") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:39] GotoIf("SIP/300-00002cdd", "0?cnum") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:40] Set("SIP/300-00002cdd", "CDR(cnam)=LetoCom Office") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:41] Set("SIP/300-00002cdd", "CDR(cnum)=300") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-user-callerid:42] Set("SIP/300-00002cdd", "CHANNEL(language)=en") in new stack
[2019-03-07 08:09:33] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:2] Set("SIP/300-00002cdd", "MOHCLASS=default") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:3] Set("SIP/300-00002cdd", "LANGUAGE()=en") in new stack
[2019-03-07 08:09:34] ERROR[4272][C-0000ca6c] pbx_functions.c: Function LANGUAGE not registered
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:4] Set("SIP/300-00002cdd", "_NODEST=") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:5] NoCDR("SIP/300-00002cdd", "") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:6] Macro("SIP/300-00002cdd", "dialout-trunk,1,5183657500,,on") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:1] Set("SIP/300-00002cdd", "DIAL_TRUNK=1") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf("SIP/300-00002cdd", "0?Set(DIAL_OPTIONS=tr)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf("SIP/300-00002cdd", "0?sub-pincheck,s,1()") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:4] GotoIf("SIP/300-00002cdd", "0?disabletrunk,1") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:5] Set("SIP/300-00002cdd", "DIAL_NUMBER=5183657500") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:6] Set("SIP/300-00002cdd", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:7] Set("SIP/300-00002cdd", "OUTBOUND_GROUP=OUT_1") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:8] Set("SIP/300-00002cdd", "DIAL_TRUNK_OPTIONS=T") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:9] GotoIf("SIP/300-00002cdd", "0?nomax") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf("SIP/300-00002cdd", "0?chanfull") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:11] GotoIf("SIP/300-00002cdd", "0?skipoutcid") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:12] Macro("SIP/300-00002cdd", "outbound-callerid,1") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:1] ExecIf("SIP/300-00002cdd", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:2] ExecIf("SIP/300-00002cdd", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:3] ExecIf("SIP/300-00002cdd", "0?Set(REALCALLERIDNUM=300)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("SIP/300-00002cdd", "0?Set(AMPUSER=)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:5] GotoIf("SIP/300-00002cdd", "1?normcid") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx_builtins.c: Goto (macro-outbound-callerid,s,9)
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:9] Set("SIP/300-00002cdd", "USEROUTCID=") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:10] Set("SIP/300-00002cdd", "EMERGENCYCID=") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:11] Set("SIP/300-00002cdd", "TRUNKOUTCID=501") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:12] GotoIf("SIP/300-00002cdd", "1?trunkcid") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx_builtins.c: Goto (macro-outbound-callerid,s,17)
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:17] ExecIf("SIP/300-00002cdd", "1?Set(CALLERID(all)=501)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:18] ExecIf("SIP/300-00002cdd", "0?Set(CALLERID(all)=)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:19] ExecIf("SIP/300-00002cdd", "0?Set(CALLERID(all)=)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:20] ExecIf("SIP/300-00002cdd", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf("SIP/300-00002cdd", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:22] Set("SIP/300-00002cdd", "CDR(outbound_cnum)=501") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-outbound-callerid:23] Set("SIP/300-00002cdd", "CDR(outbound_cnam)=") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:13] GosubIf("SIP/300-00002cdd", "0?sub-flp-1,s,1()") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:14] Set("SIP/300-00002cdd", "OUTNUM=5183657500") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:15] Set("SIP/300-00002cdd", "custom=SIP/0124487") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:16] ExecIf("SIP/300-00002cdd", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("SIP/300-00002cdd", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:18] Macro("SIP/300-00002cdd", "dialout-trunk-predial-hook,") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/300-00002cdd", "") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:19] GotoIf("SIP/300-00002cdd", "0?skipcrm") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:20] Set("SIP/300-00002cdd", "__CRM_DIRECTION=OUTBOUND") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:21] Set("SIP/300-00002cdd", "__CRM_DESTINATION=5183657500") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:22] Set("SIP/300-00002cdd", "__CRM_SOURCE=300") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:23] AGI("SIP/300-00002cdd", "sangomacrm.agi") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] res_agi.c: <SIP/300-00002cdd>AGI Script sangomacrm.agi completed, returning 0
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:24] Set("SIP/300-00002cdd", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:25] NoOp("SIP/300-00002cdd", "CRM Finished") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:26] GotoIf("SIP/300-00002cdd", "0?bypass,1") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:27] ExecIf("SIP/300-00002cdd", "1?Set(CONNECTEDLINE(num,i)=5183657500)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:28] ExecIf("SIP/300-00002cdd", "1?Set(CONNECTEDLINE(name,i)=CID:501)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf("SIP/300-00002cdd", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)501)") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:30] GotoIf("SIP/300-00002cdd", "0?customtrunk") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-dialout-trunk:31] Dial("SIP/300-00002cdd", "SIP/0124487/5183657500,300,T") in new stack
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] netsock2.c: Using SIP RTP TOS bits 184
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] netsock2.c: Using SIP RTP CoS mark 5
[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] app_dial.c: Called SIP/0124487/5183657500
[2019-03-07 08:09:37] VERBOSE[4272][C-0000ca6c] app_dial.c: SIP/0124487-00002cde is ringing
[2019-03-07 08:09:37] VERBOSE[4272][C-0000ca6c] app_dial.c: SIP/0124487-00002cde answered SIP/300-00002cdd
[2019-03-07 08:09:37] VERBOSE[4277][C-0000ca6c] bridge_channel.c: Channel SIP/0124487-00002cde joined 'simple_bridge' basic-bridge <1eb824c5-b8e5-4310-9d18-c90bab61b816>
[2019-03-07 08:09:37] VERBOSE[4272][C-0000ca6c] bridge_channel.c: Channel SIP/300-00002cdd joined 'simple_bridge' basic-bridge <1eb824c5-b8e5-4310-9d18-c90bab61b816>
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] bridge_channel.c: Channel SIP/300-00002cdd left 'simple_bridge' basic-bridge <1eb824c5-b8e5-4310-9d18-c90bab61b816>
[2019-03-07 08:09:42] VERBOSE[4277][C-0000ca6c] bridge_channel.c: Channel SIP/0124487-00002cde left 'simple_bridge' basic-bridge <1eb824c5-b8e5-4310-9d18-c90bab61b816>
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] app_macro.c: Spawn extension (macro-dialout-trunk, s, 31) exited non-zero on 'SIP/300-00002cdd' in macro 'dialout-trunk'
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Spawn extension (from-internal, 5183657500, 6) exited non-zero on 'SIP/300-00002cdd'
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [h@from-internal:1] Macro("SIP/300-00002cdd", "hangupcall") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("SIP/300-00002cdd", "1?theend") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("SIP/300-00002cdd", "0?Set(CDR(recordingfile)=)") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@macro-hangupcall:4] Hangup("SIP/300-00002cdd", "") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/300-00002cdd' in macro 'hangupcall'
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/300-00002cdd'
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] app_stack.c: SIP/300-00002cdd Internal Gosub(crm-hangup,s,1) start
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:1] NoOp("SIP/300-00002cdd", "Sending Hangup to CRM") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:2] NoOp("SIP/300-00002cdd", "HANGUP CAUSE: 16") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:3] ExecIf("SIP/300-00002cdd", "0?Set(__CRM_VOICEMAIL=)") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:4] NoOp("SIP/300-00002cdd", "MASTER CHANNEL: 1551964173.16295 = 1551964173.16295") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:5] GotoIf("SIP/300-00002cdd", "0?return") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:6] Set("SIP/300-00002cdd", "__CRM_HANGUP=1") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:7] AGI("SIP/300-00002cdd", "sangomacrm.agi") in new stack
[2019-03-07 08:09:42] VERBOSE[4272][C-0000ca6c] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-03-07 08:09:43] VERBOSE[4272][C-0000ca6c] res_agi.c: <SIP/300-00002cdd>AGI Script sangomacrm.agi completed, returning 0
[2019-03-07 08:09:43] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [s@crm-hangup:8] Return("SIP/300-00002cdd", "") in new stack
[2019-03-07 08:09:43] VERBOSE[4272][C-0000ca6c] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/300-00002cdd'
[2019-03-07 08:09:43] VERBOSE[4272][C-0000ca6c] app_stack.c: SIP/300-00002cdd Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

Output from the following pls:

asterisk -x "dialplan show 5183657500@from-internal"

and

fwconsole ma list | grep core
[ Included context 'outrt-4' created by 'pbx_config' ]
  '_NXXNXXXXXX' =>  1. Macro(user-callerid,LIMIT,EXTERNAL,)       [pbx_config]
                    2. Gosub(sub-record-check,s,1(out,${EXTEN},dontcare)) [pbx_config]
                    3. ExecIf($[ "${CALLEE_ACCOUNCODE}" != "" ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE})) [pbx_config]
                    4. Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?top40testat10percenvolume:${MOHCLASS})}) [pbx_config]
                    5. ExecIf($["${KEEPCID}"!="TRUE" & ${LEN(${DB(AMPUSER/${AMPUSER}/outboundcid)})}=0 & ${LEN(${TRUNKCIDOVERRIDE})}=0]?Set(TRUNKCIDOVERRIDE=8452784180)) [pbx_config]
                    6. Set(_NODEST=)                              [pbx_config]
                    7. Macro(dialout-trunk,3,${EXTEN},,off)       [pbx_config]
                    8. Macro(outisbusy,)                          [pbx_config]

[ Included context 'bad-number' created by 'pbx_config' ]
  '_X.' =>          1. ResetCDR()                                 [pbx_config]
                    2. NoCDR()                                    [pbx_config]
                    3. Progress()                                 [pbx_config]
                    4. Wait(1)                                    [pbx_config]
                    5. Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer) [pbx_config]
                    6. Wait(1)                                    [pbx_config]
                    7. Congestion(20)                             [pbx_config]
                    8. Hangup()                                   [pbx_config]

-= 2 extensions (16 priorities) in 2 contexts. =-

| core | 13.0.122.56 | Enabled | GPLv3+ |

Presumably things are all working now, have you upgraded any modules since the issue happened? Do you, or did you, have custom dialplan on this system? The call trace provided doesn’t match up with the dialplan:

3. ExecIf($[ "${CALLEE_ACCOUNCODE}" != "" ] ?Set(CDR(accountcode)=${CALLEE_ACCOUNCODE})) [pbx_config]

[2019-03-07 08:09:34] VERBOSE[4272][C-0000ca6c] pbx.c: Executing [5183657500@from-internal:3] Set("SIP/300-00002cdd", "LANGUAGE()=en") in new stack

In the problem call from-internal priority 3 was setting LANGUAGE incorrectly, but at present priority 3 sets the account code. Not sure what to tell you what might be generating the problem line.

1 Like

I appreciate you taking a look. It certainly is an odd one. It does appear to be working right now. Thanks!

Hi @mvogel4949:

I touched a system today with the same issue, and in this case there was evidence of an exploit in the file /etc/asterisk/extensions_custom.conf. Make sure there is nothing there you don’t recognize.

2 Likes

Great catch. I found this and have no idea where it came from:

[asterisk-outcalls]; reloadout
exten => _.,1,Macro(user-callerid,LIMIT,EXTERNAL,); reloadout
exten => _.,n,Set(MOHCLASS=${IF($["${MOHCLASS}"=""]?default:${MOHCLASS})}); reloadout
exten => _.,n,Set(LANGUAGE()=en); reloadout
exten => _.,n,Set(_NODEST=); reloadout
exten => _.,n,NoCDR(); reloadout
exten => _.,n,Macro(dialout-trunk,1,${EXTEN},,on); reloadout
exten => _.,n,Macro(dialout-trunk,3,${EXTEN},,on); reloadout
exten => _.,n,Macro(dialout-trunk,4,${EXTEN},,on); reloadout
exten => _.,n,Macro(dialout-trunk,5,${EXTEN},,on); reloadout
exten => _.,n,Macro(dialout-trunk,6,${EXTEN},,on); reloadout
exten => _.,n,Macro(dialout-trunk,7,${EXTEN},,on); reloadout
exten => _.,n,Macro(dialout-trunk,9,${EXTEN},,on); reloadout
exten => _.,n,Macro(outisbusy,); reloadout

This is a variant of the ‘thankuohoh’. They changed it so they wouldnt be detected by framework

1 Like

The system I touched had the FreePBX GUI, UCP as well as other 3rd party package GUIs exposed to untrusted traffic. Not sure about your case.

“The security aspect of cyber is very, very tough. And maybe, it’s hardly doable.”

I was thinking it reminded me of the thankuohoh. Do this think this system was previously hit with thanku which morphed into this or hit for the first time with the new version?

Assuming new as the system in question (mine) was deployed last year with full updates before having ports opened which I think was after the last thankuohoh ?

hey mvogel4949 do you happen to have any asternic stuff installed (Asternic CDR, Asternic Queue Stats, or FOP2)

It had FOP2 on it but there were no ports like 4445 being forwarded to the system to utilize it. The system did have http access open without any trusted source port forwarding setup.

Would love to know where the exploit was :confused:

1 Like

I agree. There has to be some logfile we could search to see when and how this entry was made into extensions_custom.conf file.

Unfortunately there is not due to GDRP. Before GDRP we were logging such things on FreePBX systems but now we do not log this at all. Thank the European Union!

2 Likes

I am not familiar with the law, but would it be an option to be disabled by default and if a user wants they can toggle a switch to enable it?

2 Likes