[Asterisk-Users] after hours logic

Lance Arbuckle asterisk at arbuckle.org
Mon Dec 29 16:47:57 MST 2003


Andrew Thompson wrote:

> 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 think I understand how to move the GotoIfTime into the exten macro but
I hadn't thought of the problem that wuld cause for calling desk-to-desk
after hours.  Could you give an example of what you're referring to when
you say to "match against internal extensions(inside the macro)".  I'm
not quite following that statement.

[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,GotoIfTime(8:00-21:30|mon-fri|*|*?s,3)
exten => s,2,Goto(s,4)
exten => s,3,Dial(${ARG2},20)
exten => s,4,Voicemail(u${ARG1})
exten => s,5,Hangup
exten => s,103,Voicemail(b${ARG1})
exten => s,104,Hangup
-- 
  .~.    
  /V\    Lance C. Arbuckle
 // \\   
/(   )\  
 ^'~'^



More information about the asterisk-users mailing list