[Asterisk-Users] after hours logic
Andrew Thompson
asteriskuser at aktzero.com
Mon Dec 29 12:35:21 MST 2003
----- Original Message -----
From: "Lance Arbuckle" <asterisk at arbuckle.org>
To: <asterisk-users at lists.digium.com>
Sent: Monday, December 29, 2003 2:16 PM
Subject: [Asterisk-Users] after hours logic
> I think I have a good start on this, but I can't figure out how to
> modify the behavior of the extension phones in a manner that will easily
> scale above a few extensions. All I can think of is to have a seperate
> [after-hours] context that has different GoTo's but that seems rather
> cumbersome. Any suggestions are welcome.
> FLAME away if this is a stupid question :)
Go to your console, and type show application GotoIfTime
>
> ;*************
> [main-menu]
> ;*************
> exten => s,1,Zapateller(answer|nocallerid) ;play SIT if no Caller-Id
> exten => s,2,PrivacyManager ;prompt for Caller-Id if not
> present
> ;otherwise goto 103
>
> ;check for after-hours
> include => night|00:00-7:59|*|*|*
> include => night|21:31-23:59|*|*|*
>
> ;check for day time
> include => day|8:00-21:30|*|*|*
>
> ; set some defaults
> exten => s,5,SetResponseTimeout,20
> exten => s,6,SetDigitTimeout,10
> exten => s,7,SetMusicOnHold,default
>
> ; the menu
> exten => s,8,Playback,intro ; Thanks for calling....
> exten => s,9,Background,instructions ; Press 1 for xxx, 2 for xxx
>
> ;change to something nicer
> exten => i,1,Hangup
> exten => t,1,Hangup
>
> ; the options
> exten => 1,1,Goto(Sales,s,1)
> exten => 2,1,Goto(Support,s,1)
> exten => 3,1,Goto(Billing,s,1)
> exten => 9,1,Directory(exten-local)
>
> exten => s,103,Playback (we-dont-accept-calls-from-unknown-callers)
> exten => s,104,Hangup
>
> ;*************
> [day]
> ;*************
> exten => s,3,Dial,Zap/2|20
> exten => s,4,NoOp
>
> ;*************
> [night]
> ;*************
> exten => s,3,Playback (after-hours-message)
> exten => s,4,Goto(s,9)
>
> ; change extensions to use STDEXTN Macro
> ;*************
> [Sales]
> ;*************
> exten => s,1,Dial,Zap/2|20
> exten => s,2,Voicemail,u8000
> exten => s,102,Voicemail,b8000
>
> ;*************
> [Support]
> ;*************
> exten => s,1,Dial,Zap/2|20
> exten => s,2,Voicemail,u8001
> exten => s,102,Voicemail,b8001
>
> ;*************
> [Billing]
> ;*************
> exten => s,1,Dial,Zap/2|20
> exten => s,2,Voicemail,u8002
> exten => s,102,Voicemail,b8002
>
If "billing", "support", and "sales" are your users/extensions, go back to
the asterisk pdf, or the wiki and look up macro's. Actually, you'll probably
be interested in them to clean up that section anyway...
-----
Andrew Thompson http://aktzero.com/
Your eyes are weary from staring at the CRT. You feel sleepy. Notice how
restful it is to watch the cursor blink. Close your eyes. The opinions
stated above are yours. You cannot imagine why you ever felt otherwise.
More information about the asterisk-users
mailing list