FreePBX AllowList Caller Module -- to block all but a list of allowed callers

You want a dialplan hook, which currently rely on the deprecated macro application, but you can be the first to create a gosub hook:
https://issues.freepbx.org/browse/FREEPBX-19656?jql=text%20~%20"Replace%20macro%20gosub"

In your case you don’t need the macro part at all, just use gosubif and check for the existence of the context. Not tested:

exten => s,n,GoSubIf($[${DIALPLAN_EXISTS(app-allowlist-check-predial-hook,s,1)}]?app-allowlist-check-predial-hook,s,1())
1 Like