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?
Corporate IT Solutions - Michael Dunne
2006-Jun-21 19:58 UTC
[Asterisk-Users] Time Based Goto Ifs Act Strange?
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@lists.digium.com [mailto:asterisk-users- > bounces@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 directto> 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
On 6/21/06, Matt <mhoppes@gmail.com> wrote:> 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)[..snip..] Hi Matt, Are you sure the date/time is set correctly on the Asterisk machine? Reason I ask is that you said it worked fine the first time, then you rang at 18:05 and it went to queue 210. Maybe the machine's clock was 17:59 or something when you rang. You rang right back which went to VM_PREFIX. Highly coincidential and unlikely, but maybe you rang just before 18:00 and again just after 18:00, as far as the Asterisk machine's time is concerned. Also, try using | as the separator instead of ",". ie: exten => 26,1,GotoIfTime(7:00-18:00|mon-fri|*|*?ext-queues|210|1) I doubt it makes any difference otherwise it would have never worked, but you never know. The show application gotoiftime says the separator is "|". HTH, Gonzalo.
Matt wrote:> 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 had similar problems, you have your time statement incorrect. Instead of: 7:00-18:00 It should be 07:00-18:00 Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."