Why does my FreePBX or VitalPBX time condition send calls to the wrong destination?
Usually the time group matches something other than what its entries look like. Asterisk accepts every combination, so nothing warns you. The usual causes: the finish minute counts, a time range crosses midnight on only some week days, a date range crosses into another month, holidays sit in the business hours group, the holiday time condition comes after the business hours one, someone left a permanent override on, or the PBX runs in a different timezone. Paste your entries into the tool above and it flags the ones that live in the entries. The rest are under "Traps a single entry can't show".
Why is my FreePBX time condition still open at 17:00?
Asterisk counts the finish minute. 08:00-17:00|mon-fri|*|* matches until 17:00:59, so a caller at 17:00:30 still reaches the open branch. To close at 17:00 exactly, finish at 16:59: 08:00-16:59|mon-fri|*|*.
How do I make a VitalPBX or FreePBX time group that goes past midnight?
If every week day is allowed, a wrapped range like 17:00-09:00|*|*|* covers the whole night. Limit the week days and it stops working, because Asterisk checks the time and the week day separately. 22:00-02:00|fri|*|* matches Friday from 22:00 to 23:59 and Friday from 00:00 to 02:00, but not Saturday morning. Split it in two: 22:00-23:59|fri|*|* and 00:00-02:00|sat|*|*.
How do I close from Friday evening to Monday morning in FreePBX or VitalPBX?
17:00-08:00|fri-mon|*|* looks like one stretch, but Asterisk applies 17:00 to 08:00 to each day from Friday to Monday on its own. Saturday and Sunday don't match during the day, and Friday morning and Monday evening do. One stretch takes three entries: 17:00-23:59|fri|*|*, *|sat-sun|*|* and 00:00-07:59|mon|*|*.
How do I add a holiday closure across the new year, like Dec 24 to Jan 2, in FreePBX or VitalPBX?
Not as one entry. *|*|24-2|dec-jan saves the days and the months as two separate ranges, and Asterisk matches the day range inside every month in the month range, so it also catches Dec 1 to 2 and Jan 24 to 31. Use one entry per month: *|*|24-31|dec and *|*|1-2|jan. Keep holidays in their own time group, on a time condition that calls reach before the business hours one.
How do I match the last day of the month in a VitalPBX time group?
Asterisk has no "last day of the month", and *|*|31|* only matches in the seven months that have a 31st. It takes seven entries: *|*|31|*, the 30th in April, June, September and November (*|*|30|apr and so on), and *|*|28|feb plus *|*|29|feb. In a leap year Feb 28 matches too.
How do I add Thanksgiving or another holiday that moves to a FreePBX or VitalPBX time group?
Pair one week day with a seven-day range of month days. The 4th Thursday in November always falls between the 22nd and the 28th, so Thanksgiving is *|thu|22-28|nov. The first Monday of every month is *|mon|1-7|*. The date moves every year and the entry never needs editing. For the last Monday of a 31-day month use the 25th to the 31st, so Memorial Day is *|mon|25-31|may. In a 30-day month use the 24th to the 30th.
Can a FreePBX or VitalPBX time group close for one date in one year only?
No. There is no year field, so *|*|3|mar matches March 3 every year. Delete the entry once the date has passed. If that might get forgotten, also set the week day that date falls on. The entry then stays quiet until a year when that date lands on the same week day again, and the tool shows you which year that is.
Why does my FreePBX time condition only match for one minute?
If you set a start time and leave the finish time blank, FreePBX saves the start time as both the start and the finish. 09:00|mon-fri|*|* matches the single minute 09:00, not "from 09:00 on". Set a finish time.
What format do Asterisk GotoIfTime() and FreePBX time groups use?
Four fields: time, week day, month day and month. FreePBX saves a time group entry with pipes between them, like 08:00-17:00|mon-fri|*|*. GotoIfTime() takes the same four fields separated by commas, with an optional timezone after them. * matches anything. Ranges include both ends and wrap around, so fri-mon and 28-3 both work. The finish minute counts through :59, and there is no year.
Why does my VitalPBX or FreePBX time condition switch at the wrong hour?
Times are checked against the PBX's timezone, or the one set on the time condition, not your office's. A hosted PBX in another timezone runs every entry shifted by the difference.