Ok, after googling around more I came across this: http://www.trixbox.org/forums/trixbox-forums/help/app-blacklist-check-custom-not-working-advertised
Which looked like someone else was attempting to do something like I am, and it wasn’t working right either. Based on that, I’ve decided to go at this another way, since this method isn’t working as expected.
Based on the docs, I went into the “extensions_override_freepbx.conf” file, and overrode “app-blacklist-check” there, by borrowing the existing code from “existing_additional.conf” and modifying it to look like this:
[app-blacklist-check]
include => app-blacklist-check-custom
exten => s,1,GotoIf($["${CALLERID(name):1:2}" = “–”]?blacklisted)
exten => s,n,GotoIf($["${CALLERID(num):0:6}" = “1-pstn”]?blacklisted)
exten => s,n,NoOp(${CALLERID(name)}/${CALLERID(num)} has valid caller-id…check blacklist now…)
exten => s,n,LookupBlacklist()
exten => s,n,GotoIf($["${LOOKUPBLSTATUS}"=“FOUND”]?blacklisted)
exten => s,n,Return()
exten => s,n(blacklisted),Answer
exten => s,n,Wait(1)
exten => s,n,Zapateller()
exten => s,n,Playback(ss-noservice)
exten => s,n,Hangup
; end of [app-blacklist-check]
Which is pretty much the existing code with my additional tests tacked onto the beginning. I’ve tested incoming and outgoing calls and they still work, and examination of the logs now shows the new code being executed. Now, hopefully later today we’ll get some calls in that will further test the code.
Still not sure why my original idea of modifying the function didn’t work. I don’t like this way because I’ve replaced the function, and if changes come along later I would have to manually “resync” the code. But, if this works, great.