I have a question about the Time Group module.
I have set up some holiday dates within a TG called HOLIDAYS.
For example the bank holiday that has just passed here in the UK.
Start and Finish Times were 17:30
Start Day was 23rd, Finish day was 26th
Start and Finish Month was May.
This I thought would start at 17:30 on the 23rd of May
and end on the 26th of May at 17:30.
Thus capturing all incoming calls during this period and route them to my after hours message.
However on testing I notice that the TimeCondition that uses that Holidays group totally ignored the last day (26th)
It worked fine for the days 23rd ,24th and 25th.
I have created some more test patterns and the same happens each time. The last day is ignored or overlooked
Can someone advise if I have just misunderstood how to configure this module or if it has an error.?
I do not want to report this as a bug if the fault is with my understanding.
Sorry forgot to include the versions.
Time Conditions 22.214.171.124
PBX Firmware: 5.211.65-12
to 00:00 and end time to 23:59
Many thanks for the advice.
I shall give that a go, but would this indicate a Bug in the TimeGroup / TimeCondition modules.
After all what would happen if people work half day on bank holidays or any other time for that matter. I was hoping that someone “in the know” would be able to advise if what I had configured was correct or not.
It just seems a little daft to have a module that gives options that are then ignored or misinterpreted.
As mentioned it may be my own misunderstanding of how to configure the module correctly, after all if nobody else is having the same problem then my only assumption is it is me or my config.
When I look at the sky and think it is blue I am happy to change that mode of thought if enough people tell me otherwise, but it then it makes me question every other aspect of my thinking.
Whenever I’ve set up Time Groups for Holidays, I typically have three blocks:
- Closing time to midnight on the start of the holiday
- 00:00 to 23:59 on each full day
- 00:00 to opening on the first day back from holiday
So my Christmas Time Group looks like:
Many thanks for the tips.
To be honest I can work out ways to work around the problem but I was actually trying to work out if a problem exists with the module.
Like I had mentioned in my reply to BK it seems silly to have a module that does not work as expected unless the issue is with my own expectations.
I have tried to find out where in the code that the time conditions are refered but apart from the hint of “pbx.c” in the log files I have drawn a blank.
I am only too happy to step thru the source and try to locate the offending code but as you may imagine without some sort of pointer I could be here for days, perhaps only to find it is not a problem and operating as expected anyway.
If the “correct” method is creating multiple sections within the Timegroup then I am surprised, shocked, flabbergasted even, and perhaps I should put forward a Feature enhancement request or for it to be made clear in the Docs on how to configure the module correctly as the module GUI gives the impression that what I have configured should be acceptable.
Again many thanks for the tips and I do not intend to offend or seem otherwise grateful, just trying to get to the root cause of my misunderstanding.
Now I look at the sky and it is grey, so I could have been wrong all along.
but perhaps one of the schmooze guys can comment on what happens when the start and end times are identical and the time spans multiple days. i know it does work is if you set the start time to be 17:31 and then end time to be 17:30.
i would offer another solution
i assume you have “business hours” and “after hours” time groups an time conditions and from the 17:30 in your post i assume “after hours” starts at 17:30. create a “holiday” time group and time condition which is checked before any of the other time conditions. enter may 24,25 & 26 into the holiday time condition and you are good to go. your after hours TC will handle the 23rd, and the holiday TC will handle the 24,25, & 26th.
Cheers for the additional ideas, as mentioned I can figure out different ways to work around the situation.
Being a programmer I take the approach that if a logical statement makes sense to the human mind then a computer/software/module should have no problem understanding the concept also.
So if I were to say the condition starts on 23rd of May at 17:30 and ends on the 26th of May at 17:30 I am sure that you and I know exactly what I am trying to describe, so the software/module should be able to understand that also.
Computers only do what they are told ! so if they get things wrong the cause should be easy to resolve. Humans on the other hand have ego, opinions, culture, attitude and all that other type of overhead to overcome so they are far harder to resolve.
Fault finding is what I do, be it software, hardware, or mankind related. One thing that I do not like to do is simply say this is faulty or broken without also giving some sort of path to a resolution to the issues I raise. Quite often in solving one issue other more subtle problems are also identified and rectified. Even silly things like the sort order of multiple sections within a TimeGroup. Have you noticed they are not sorted in a logical order.? Not the end of the world but it does indicate a little lack of finesse to the end result.
I can see that some of the schmooze people do read and comment on topics in this forum so I was hoping that they may be able to drop a comment on this one.
Once again I should say that I am 100% grateful of any comments, tips and suggestions, as I am sure other FreePBX users will be if they ever experience the same issue. I am not looking for praise or recognition for finding bugs, simply just a nod perhaps that it has been noted and maybe addressed in future updates.
Today the sky is Blue again. go figure.
but if you still have the log files from those days, you can see how the system evaluates the expression. or test it yourself. I just tested it using 12:00-12:00, may 31 til jun 2nd, and it does not evaluate the expression as true (today is June 1). however changing it to be 12:01 til 12:00 does work. you can see that it properly sets the start time, but sets the end time to be “*” which I think is evaluated as “match any time”, therefore the expression is never true. perhaps it is a bug or perhaps that is the way the code works.
I agree that the “logical” view of what you have done should work the way you intended it to but it doesn’t.
Many thanks for your persistence.
I had similar results so fairly easy to overcome but annoying all the same.
Actually looking at some of the other PBX configs I have done one or two had been set this way already, so I must have had similar problems last year but forgot.
Seems like the Schmooze guys do not like to comment on some topics for whatever reason. Guess they are busy with other more important issues.
But at least others that do experience the same issue may find an easy resolution thru our discussions.
All the best.
I see there has been an update.
126.96.36.199: Cleanup things that dont make sense
Was any of the oddness ironed out in the update.
If so it is still a little funkey.
Let me know if you would like to know what parts.
If not then I guess things are still the same.
I notice this still has issues.
Can anyone advise if this module is ever to be made more logical.
What would make it more logical?
From what I can see it still has problems when setting a time group that spans over multiple days, as described in the posts above.
The module just provides a GUI for the data the time commands in Asterisk expects. The module does not do any interpretation of the dates you enter, it just plugs them into the GotoIfTime.
Check out Asterisk cmd GotoIfTime
As Alan mentioned this is how Asterisk works. There are no bugs in time conditions just your misunderstanding of the module and that is not your fault.
We have plans to re-work the module and make it more intuitive in the future but not any time soon.
With the old forum software it was really hard to keep track of who is saying what. Plus we have work to accomplish. Do not feel offended if we don’t post.
Hi Alan & tm1000.
I was not offended in any way, just confused as you pointed out !
Now that I have had a quick read of the gotoiftime page it makes total sense.
As always I would like to offer my thanks to those that have made the Freepbx platform as good as it is, extending that to the people behind the asterisk core also.
I guess I should now do my bit and offer some updated code to enhance the current TG module. I shall have a tinker and see what I can rustle up.
The thought for the new version (13) is to allow syncing with an ICS calendar file through a cron job, then you can add and remove dates and it will run contition A when there is an event or condition B when there isn’t an event, this can be done through the internal asterisk DB using gotoiftime
I have it on the roadmap and have discussed it internally, so it will most likely happen in the next year or less.