How to block extensions in asterisk


I want to know if anyone of you knows how to block extensions. I mean, I want to block some extensions at night because I don’t want to call anyone outside the office, just call inside.

Is there a way to do that? I want to do that mannually via web.

Is there possible?

Thank you in advance.

Manually via the web?

You’re going to have to construct your dialplan then to take different paths dependent on something such as the time of day or the status of some ASTDB value or other indicator.

I don’t know if FreePBX has this kind of capability, if that’s what you’re asking about.


this is a common request of the freePBX forums and is pretty straight forward using freePBX “Time Conditions” module so this could be done easily from a web GUI.

Thanks for your help.

Is there any way to do that via code? I mean, in a terminal.