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

Gonzalo Servat gservat at gmail.com
Wed Jun 21 21:05:29 MST 2006


On 6/21/06, Matt <mhoppes at 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.



More information about the asterisk-users mailing list