How To Disable An Extension after work hours

I am having a little problem which i think can be solved, by just disabling the extension after work hours.

The problem is with the operator’s phone. When she leave’s at 6pm, the security comes in and he uses her phone to make calls. I just want to disable her phone or extension from making call after 6pm.

Can anyone tell me how to do that?

this is possible using asterisk Time based routing.

where incoming call will come uotp sepcific time & same for out going & then after that time incoming call go for voicemail & out going call got for congestion.
means time based routing + ur call skill will help you.

try & search it from


Try this I have tested it on my system. This will block external call from callerid 300 between 6:00PM and 8:59AM


exten => _X.,1,GotoIfTime(18:00-8:59|mon-fri||?afterhours,${EXTEN},1)
exten => _X.,2,Dial(${PSTN-TRUNK}/${EXTEN})
exten => _X.,3,Congestion()

exten => _X.,1,GotoIf($["${CALLERID(num)}" = “300”]?blocked-calls,${EXTEN},1)
exten => _X.,2,Dial(${PSTN-TRUNK}/${EXTEN})
exten => _X.,3,Congestion()

exten => _X.,1,Congestion()

Thanks much. I’m gonna give this a try real soon and let u know if it works.

Greatly Appreciated :smiley:

It worked perfectly.