Tom Vile ha scritto:> I am trying to use the Gotoiftime CMD to not allow calls to be placed
> between the hours of 12am-5am, except if you know the PIN number to
> dial out and if the call is for 911.
>
> What is the best way to implement this solutions?
>
> I have the gotoiftime like so:
>
> exten => s,1,GotoIfTime(5:00-11:59|mon-fri|*|*?custom-blacklist,s,1)
>
> and using Read for the PIN like so:
>
> exten => s,3,Read(Secret,,3)
> exten => s,4,NoOp(${Secret})
> exten => s,5,Gotoif($[${Secret} = 123]?6:8)
>
> but I guess I am stuck at allowing 911 calls to go through and what
> order to place them in.
>
> Thanks for the suggestions.
>
>
> Tom
The quickest way is to use two different extensions.
I don't know the rest of your dial plan (so this might conflict
with internal extensions), but it could work (of course you've to
replace "whatever" with your actual outgoing trunk channel:
[context-dialout]
exten => 911,1,Dial(whatever/${EXTEN})
exten => _X.,1,GotoIfTime(5:00-11:59|mon-fri|*|*?custom-blacklist)
exten => _X.,n(do_dial),Dial(whatever/${EXTEN})
exten => _X.,n,Hangup()
exten => _X.,n(custom-blacklist),Read(Secret,,3)
exten => _X.,n,NoOp(${Secret})
exten => _X.,n,Gotoif($[${Secret} = 123]?do_dial)
exten => _X.,n,Playback(sorry-dude-youre-not-allowed)
exten => _X.,n,Hangup()
Alberto.
--
--
Alberto Pastore
B-Press Srl - Gruppo MSoft
P.IVA 01697420030
P.le Lombardia, 4 - 28100 Novara - Italy
Tel. 0321-499508
Fax 0321-492974
http://www.msoft.it