Block incoming calls on an extension from any trunk.


(Rafael Salcedo) #1

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.
Regards


(Itzik) #2

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.


(Rafael Salcedo) #3

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?


(Itzik) #4

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:

[your-custom-context]
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)