[Asterisk-Users] after hours logic
Andrew Thompson
asteriskuser at aktzero.com
Mon Dec 29 14:59:02 MST 2003
mods, please excuse my other posting... forgot to reset the email address :)
----- Original Message -----
From: "Lance Arbuckle" <asterisk at arbuckle.org>
To: <asterisk-users at lists.digium.com>
Sent: Monday, December 29, 2003 3:57 PM
Subject: Re: [Asterisk-Users] after hours logic
> Andrew Thompson wrote:
>
> >
> > Go to your console, and type show application GotoIfTime
>
>
> > 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...
> >
>
>
> So by using GotoIfTime I would end up with something like this which
> would ring the phone at that the extension and then goto voicemail
> during the gotoIfTime and otherwise execute the next priority and do a
> Goto to the extension's unavailable message.
>
> exten => 1,1,GotoIfTime(8:00-21:30|mon-fri|*|*?Sales,s,1)
> exten => 1,2,Goto(Sales,s,2)
> exten => 2,1,GotoIfTime(8:00-21:30|mon-fri|*|*?Support,s,1)
> exten => 2,2,Goto(Support,s,2)
> exten => 3,1,GotoIfTime(8:00-21:30|mon-fri|*|*?Billing,s,1)
> exten => 3,2,Goto(billing,s,2)
> exten => 9,1,Directory(exten-local)
>
> So that works fine for the extensions listed here but how do I
> accomplish the same thing (phone doesn't ring after hours) if the caller
> picks an extension from the directory ? Would I have to use GotoIfTime
> in the [macro-stdexten] to route around the dial command ? This seems
> like it would work but I'd like some feedback on 'best practices' so I
> don't create a monster. :)
Yes, move your GotoIfTime logic into the macro. Then any call to that macro
would be subject to that rule.
However, in that case, you might want to match against internal
extensions(inside the macro) so that you can still call desk-to-desk after
hours.
>
> I'm planing on setting up my extensions something like this:
>
> exten => 8000,1,Macro(stdexten,8000,Zap/2)
> exten => 8001,1,Macro(stdexten,8001,Zap/3)
> exten => 8002,1,Macro(stdexten,8002,Zap/4)
> exten => 8003,1,Macro(stdexten,8003,Zap/5)
> exten => 8004,1,Macro(stdexten,8004,Zap/6)
> exten => 8005,1,Macro(stdexten,8005,Zap/7)
> exten => 8006,1,Macro(stdexten,8006,Zap/8)
> exten => 8007,1,Macro(stdexten,8007,Zap/9)
> ..... etc
>
> [macro-stdexten]
> ;
> ; Standard extension macro:
> ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
> ; ${ARG2} - Device(s) to ring
> ;
> ; Ring the interface, 20 seconds maximum
> exten => s,1,Dial(${ARG2},20)
> exten => s,2,Voicemail(u${ARG1})
> exten => s,102,Voicemail(b${ARG1})
>
> --
> .~.
> /V\ Lance C. Arbuckle
> // \\
> /( )\
> ^'~'^
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-----
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