Unfortunately it is not quite that simple wrt to ‘a checkbox’
the timegroups represent and abstract set of times. Each module that uses them it responsible for taking those times and applying the logic. The timeconditions module and outbound routes uses the time groups. So does the third party customcontext module. There may be others I am not thinking of at this time.
So that means that each module that uses them would have to apply the appropriate logic. Furthermore, there may be some fairly “unsolvable” logic challenges in places like the outbound routes and customcontext. These modules use a construct provided by Asterisk that look like:
include => outrt-12|08:30-21:00|sat|*|* ; prefix6
include => outrt-12|06:45-21:15|mon-fri|*|* ; prefix6
include => outrt-12|09:00-20:30|sun|*|* ; prefix6
In that example, there was a time group with 3 entries. So this could likely be a ‘show stopper’ or limiter as to the reasonable ability to have ‘negative’ time group entries. There is no construct in Asterisk that I am aware of that allows you to specify to use the negative and ‘deriving’ the negative can be a fairly complex task.
I would like to use one time conditions with a time group where some entries are negated instead of using two time conditions, one with the not negated entries and another with the negated entries, after the other.
It is only for make the administration easiest and more clear.
timegroups are a direct translation down to the basic Asterisk time construct (which you can pull up details with Asterisk documentation.
it is not setup to negate as a result, though you are welcome to make a feature request to do such and we can explore how we might address that in a future release as it’s a valid request.
as far as times like 14 - 9, I don’t know what that would do. It might work, it might result in the equivalent of 14-midnight, or it may result in an error. And if it did work, assuming m-f, what would the implications be for sat 0-9, would that imply a true condition or false? (As you can see, the ambiguity created in such a definition leads me to believe it would be a bad idea to count on that…)
Anyhow - if you experiment with it and come up with some answers, post them here, it’s an interesting question.
time conditions are basic if () else () conditions… to do a negative test, simply put the desired action in the else () section. for example, if you want to “do something” on “not january 1”, set up your condition
if “january 1” (do nothing) else (do something)…
you can do similar things for all your other conditions.