[asterisk-bugs] [Asterisk 0016698]: gotoiftime does not work as expected for date range

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Feb 2 04:21:13 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16698 
====================================================================== 
Reported By:                Nick_Lewis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16698
Category:                   PBX/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.2.X 
JIRA:                       SWP-819 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-25 11:53 CST
Last Modified:              2010-02-02 04:21 CST
====================================================================== 
Summary:                    gotoiftime does not work as expected for date range
Description: 
In the middle of December I set a time condition using the gotoiftime
dialplan application from Dec24 to Jan3. It worked correctly over this
holiday period and switched off after Jan3. However on Jan24 it switched on
again. This is not the operation that I expected.
====================================================================== 

---------------------------------------------------------------------- 
 (0117508) Nick_Lewis (reporter) - 2010-02-02 04:21
 https://issues.asterisk.org/view.php?id=16698#c117508 
---------------------------------------------------------------------- 
My point is that the syntax that would appear to be the way to do it does
not do it. For example
   exten => 1,1,GotoIfTime(*,*,24-3,dec-jan?timeconditions,2,1)
is not interpreted as a single range dec24-jan3 but instead interpreted as
the less expected dec1-3, dec24-jan3, jan24-31

The behaviour of some other settings seem to sit better with human
expectations. For example
   exten => 1,1,GotoIfTime(09:30-11:59,*,*,*?timeconditions,3,1)
is interpreted as a single range 09:30-11:59 and not interpreted as
09:30-09:59, 10:30-10:59, 11:30-11:59 (though I accept that the syntax is
different)

I suggest that the current operation for date/month is: 
(i) at odds with user's expectations 
(ii) never the wanted behaviour 
(iii) should be changed so that the current syntax provides useful
date/month ranges

If this is not acceptable then alternatively perhaps the date field syntax
could be augmented with optional "mth/" to better support ranges e.g.

exten => 1,1,GotoIfTime(*,*,dec/24-jan/3,*?timeconditions,3,1) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-02 04:21 Nick_Lewis     Note Added: 0117508                          
======================================================================




More information about the asterisk-bugs mailing list