Block incoming calls on an extension from any trunk.

Hello, we need to block calls coming from outside on an internal extension. We know how incoming calls from other extensions are blocked, but I cannot block external calls from trunks.
I would like to be able to do it in the code of the configuration files (extensions_custom.conf, …) without any external module to FreePBX, although if there is no other remedy then we would use it.

I am not sure what you mean.

If you have an inbound route to that extension, remove it.
If you have an IVR which callers can dial that extension, either tie it to a directory that does not have that extension, or setup an IVR option with that extension number, which will reroute the call to wherever you want.

1 Like

Hello, those options are interesting, but it is not our scenario. In our case, the caller can communicate using the DISA tool with any of the 600 internal extensions, but there are some that we want to prohibit from receiving calls.
Any ideas?

I am afraid you are misusing DISA, but whatever. I just hope you realize that all external calls these callers are placing is on you.

To block certain calls from DISA, set your custom context in DISA

Then in /etc/asterisk/extensions_custom.conf have something like:

exten => s,1,Noop(Entering user defined context in extensions_custom.conf)
;Check the dialed extension and then determine if it should be blocked.
exten => s,n,Goto(from-internal,${EXTEN},1)
1 Like

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