GoToIfTime() Occasionally Skips Valid Rule

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

GoToIfTime() Occasionally Skips Valid Rule

Postby tee_see_voo » Tue Feb 02, 2016 2:45 pm

My extensions.conf contains the following rules to control our IVR and make sure after hours calls are sent to the appropriate extension.

Code: Select all
same => n,Answer()
; this sets the inter-digit timer
same => n,Set(TIMEOUT(digit)=2)
same => n,GotoIfTime(08:00-16:59,mon-fri,*,*?open,1)
same => n,Goto(closed,1)

Some of my customers have complained that they are being sent to the "closed" extension during normal business hours. It seems to be an intermittent problem, and I can't find any rhyme or reason to why some customers might experience it while most don't.

As a sanity check, is there anything in the above sequence that might be causing it?

Since I'm not sure when it's happening, I'm not sure how to debug it. The Master.csv log file just shows that callers are being sent to the closed extension, but doesn't say why. Anywhere else I should look? Should I just hang out in the Asterisk CLI with debugging turned on waiting for it to happen to a caller?
Posts: 4
Joined: Wed Nov 25, 2015 12:31 am

Re: GoToIfTime() Occasionally Skips Valid Rule

Postby csyria » Tue Feb 02, 2016 6:00 pm

First step, are you sure that your box's time is correct? If you're using NTP, is it synchronizing against a reliable source? Is your timezone set correctly?

You can also add some logging to your dialplan so that you can see this better in the logs. Something like:
Code: Select all
exten => s,n,Verbose(Call was directed to closed at time ${STRFTIME(${EPOCH},,%Y%m%d %H:%M:%S)})

Then just compare these logs with when your calls actually came in to see what time Asterisk thinks it is.
Posts: 8
Joined: Thu Oct 10, 2013 3:18 am

Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest