[Asterisk-Users] Time Based Goto Ifs Act Strange?

Corporate IT Solutions - Michael Dunne michael at citsolutions.com.au
Wed Jun 21 19:58:51 MST 2006


Wouldn't it be easier to do time based context?

i.e. - http://www.voip-info.org/wiki/view/Asterisk+tips+openhours

You can drop the Gotoiftime and create contexts for the hours instead.

For example ...

[default]
include => holiday|*|*|25|dec
include => day|09:00-17:30|mon-fri|*|*
include => day|09:00-13:00|sat|*|*
include => night|17:31-8:59|mon-fri|*|*
include => night|13:01-8:59|sat|*|*
include => night|*|sun|*|*
;
;----
[day]
exten => s,1,Wait()
exten => s,n,Answer
exten => s,n,Dial()
...etc
;
;----
[night]
exten => s,1,Wait()
exten => s,n,Answer
exten => s,n,Voicemail()
...etc
;
;----

Just a consideration.

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> bounces at lists.digium.com] On Behalf Of Matt
> Sent: Thursday, 22 June 2006 12:33 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] Time Based Goto Ifs Act Strange?
> 
> Hi,
> I'm still in the process of debugging this, but I have a gotoif
> statement that looks like this:
> 
> exten => 26,1,GotoIfTime(7:00-18:00|mon-fri|*|*?ext-queues,210,1)
> exten => 26,n,Goto(ext-local,${VM_PREFIX}127,1)
> 
> I have others setup the same way that also seem to have the same
> 'issue'.  The issue is that they work, but they seem to require (and I
> don't understand why) a call to come through to trigger them, before
> they will start working.
> 
> Example.
> I set this one up today.  It routed to queue 210 fine.
> No one else was calling this timecondition, as it was a test I setup.
> Around 1805 I called it and it went to queue 210.
> Called right back and it went to ${VM_PREFIX}127 (or *127 for direct
to
> voicemail).
> 
> I notice this happens with our 'open and close' messages as well.  Any
> idea why they seem to require a 'kick start' to work?
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list