Ast_func_read: Function IF not registered

I’m upgrading from asterisk 11.7 to 14.0.02 and have an error which worked in the earlier version.

exten => start,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${ARG1} through Twilio)
same => n,Dial(PJSIP/${ARG2}@twilio0)
same => n,VoiceMail(${ARG3}@default,${IF($[${DIALSTATUS} = BUSY]?b:u)})
same => n,Hangup()

[Oct 12 11:19:18] ERROR[17449][C-0000000b]: pbx_functions.c:593 ast_func_read: Function IF not registered

Try GotoIf. I’ve never tried that inline in asterisk before.

Do you have the func_logic module loaded? That is where the IF dialplan function lives.

Thank you, that fixed it. It seems surprising that this module doesn’t get loaded by default.

It’s a default enabled module for building, and normally autoload is turned on so it would get loaded. You would need to check modules.conf and also look at the console output at startup to see if there was a reason it didn’t load automatically.

The func_logic module wasn’t listed in modules.conf so I added it. I don’t recall unchecking any default modules when I built it. There were no errors on startup so i assume all I needed to do was add the module to modules.conf and restart asterisk.