Holidays With FreePBX


This article concentrates on Queensland, in particular Brisbane, Public Holidays, since only a few holidays vary between states, it will be easy for you to change to suite yours if you need to, likewise international readers, where many don't observe Show Days, ANZAC Day, or Easter.
Most Holidays don't change their dates, but some like the Royal Exhibition Show Day, and Easter do, and, what if a Holiday falls on a weekend? Here in Australia, most states - but not all, usually get the following Monday off to make up for it, for some states often depending on what type of holiday it is, in Queensland, we're lucky, we get them all, this does however present a slight problem, because rarely does anyone configure their phone systems for such occurrences in automation, leaving callers in a queue on hold waiting for nobody, unless someone remembered to manually switch to night mode.
With FreePBX Time Groups, it's easy to cater for those scenarios, well, except for Easter, where apparently nobody knows what date Jesus actually died on I guess since it changes every year, often by weeks, could be any Friday-Monday in or around late March and April, the result of this is even after the changes I'm going to give you, you will still every year need to modify Easter period, my recommendation is to change those dates to the following year right after you return from the current years Easter break, that way you wont forget.
For Queenslanders, you can verify these holiday dates at this Qld Govt website, for everyone else, sorry, you'll have to try some google fu
Bulk Handler does not process Time Conditions or Time Groups (I have an improvement request in for it though), and as this info is stored in astdb we can't cheat and write an asterisk conf file, well we could but the risk is high of it being overwrote or plain out ignored, so we have to enter one by one through the GUI.
Update! As of October 2021, my feature request for Bulk Handler to process Time Groups/Conditions has been approved and changes committed - but only for use on FreePBX 15 and 16, it will not be back ported to 14
Select Applications and Time Groups, then +Add Time Group, give it a meaningful name like Holidays, and in the description field give it some detail, I use holidays - Only need to modify Easter (https://bit.ly/3naW67f), the URL is Qld Govt website that lists the legislated public Holidays for the state of Qld.
Now, the first entry is going to be Easter, after which we use by-date-order, the reason for this is Easter is the only entry we should ever have to change from now on, so keeping it at the top makes sense, and when you do change it, don't delete it and add next years, just edit the existing entry to next years date - this keeps it at the top of the list, we are also not going to touch any of the time start/finishes, except for Christmas Eve, since most offices let their staff off around lunchtime, but obviously if you are retail, you wont be using that entry
To simplify things, just follow the below information in the images, I've taken them direct from my own working FreePBX system. I'm writing this in 2021, just after Easter, so I have already set in the correct dates for 2022.
If you look at the 5th period as an example, you see it lists January 27 and 28, but only if those dates fall on a Monday, resulting from the January 26 Australia Day Public Holiday if it falls on the previous Saturday or Sunday, Monday also becomes a Public Holiday. In fact New Years Day next year (2022) will be on a Saturday, so you will see this work by automatically setting Monday January the 3rd a Holiday. I've also accounted for holidays that are on the first Monday of the month too. Looking at the 9th period, Wednesday August 10-16, covers Brisbane Show Day which always falls on a Wednesday in that date range.
As mentioned earlier, if you're not in Brisbane, you'll need to change Show Day to suit your regions, along with any other holidays you observe that differ from mine.
After you have entered in a period, just click +Add Time and continue, once you've entered in all applicable time periods, click Submit then Apply Config, at that point, you're nearly done.













Again, check your entries, and make sure you click Submit then Apply Config
Next, you'll need to enable your Holidays Time Group by creating a Time Condition pointing to it...

Lastly, insert that Time Condition into your call flow so it can take affect, example ...

That's it, you're done!
Oh.... In Case you want a list of all the future universal Easter Sundays, for the next 20 years or so...
17th April 2022
9th April 2023
31st March 2024
20th April 2025
5th April 2026
28th March 2027
16th April 2028
1st April 2029
21st April 2030
13th April 2031
28th March 2032
17th April 2033
9th April 2034
25th March 2035
13th April 2036
5th April 2037
25th April 2038
10th April 2039
1st April 2040
21st April 2041
6th April 2042
29th March 2043
17th April 2044
9th April 2045
Enjoy!
FreePBX is a Registered Trademark of Sangoma Technologies through their purchase of Schmooze, who in turn bought the rights from the original author, Rob Thomas. FreePBX is Open Source software and completely free.
With FreePBX Time Groups, it's easy to cater for those scenarios, well, except for Easter, where apparently nobody knows what date Jesus actually died on I guess since it changes every year, often by weeks, could be any Friday-Monday in or around late March and April, the result of this is even after the changes I'm going to give you, you will still every year need to modify Easter period, my recommendation is to change those dates to the following year right after you return from the current years Easter break, that way you wont forget.
For Queenslanders, you can verify these holiday dates at this Qld Govt website, for everyone else, sorry, you'll have to try some google fu

Let's get on with it
Firstly, you need to login to FreePBX as administrator,Update! As of October 2021, my feature request for Bulk Handler to process Time Groups/Conditions has been approved and changes committed - but only for use on FreePBX 15 and 16, it will not be back ported to 14
Select Applications and Time Groups, then +Add Time Group, give it a meaningful name like Holidays, and in the description field give it some detail, I use holidays - Only need to modify Easter (https://bit.ly/3naW67f), the URL is Qld Govt website that lists the legislated public Holidays for the state of Qld.


To simplify things, just follow the below information in the images, I've taken them direct from my own working FreePBX system. I'm writing this in 2021, just after Easter, so I have already set in the correct dates for 2022.
If you look at the 5th period as an example, you see it lists January 27 and 28, but only if those dates fall on a Monday, resulting from the January 26 Australia Day Public Holiday if it falls on the previous Saturday or Sunday, Monday also becomes a Public Holiday. In fact New Years Day next year (2022) will be on a Saturday, so you will see this work by automatically setting Monday January the 3rd a Holiday. I've also accounted for holidays that are on the first Monday of the month too. Looking at the 9th period, Wednesday August 10-16, covers Brisbane Show Day which always falls on a Wednesday in that date range.
As mentioned earlier, if you're not in Brisbane, you'll need to change Show Day to suit your regions, along with any other holidays you observe that differ from mine.
After you have entered in a period, just click +Add Time and continue, once you've entered in all applicable time periods, click Submit then Apply Config, at that point, you're nearly done.













Again, check your entries, and make sure you click Submit then Apply Config
Next, you'll need to enable your Holidays Time Group by creating a Time Condition pointing to it...

Lastly, insert that Time Condition into your call flow so it can take affect, example ...

That's it, you're done!

Oh.... In Case you want a list of all the future universal Easter Sundays, for the next 20 years or so...
17th April 2022
9th April 2023
31st March 2024
20th April 2025
5th April 2026
28th March 2027
16th April 2028
1st April 2029
21st April 2030
13th April 2031
28th March 2032
17th April 2033
9th April 2034
25th March 2035
13th April 2036
5th April 2037
25th April 2038
10th April 2039
1st April 2040
21st April 2041
6th April 2042
29th March 2043
17th April 2044
9th April 2045
Enjoy!
FreePBX is a Registered Trademark of Sangoma Technologies through their purchase of Schmooze, who in turn bought the rights from the original author, Rob Thomas. FreePBX is Open Source software and completely free.
Comments
Display comments as Linear | Threaded
NoelB on :
Thought I'd post an update, after filing a feature request to have this added to bulk handling, it's now done, and in edge for FreePBX 15 and 16-beta.
With 16 close, I'll wait until its released before I install it, then I'll attach the bulk handler file to the article so you can D/L and import it, rather than typing all this crud out making life much easier for you guys.
Adam on :
I couldn't find the quick file, but I'm not in ozzie so it wouldn't really help much I guess anyway, since we do not observe most of the holidays you listed over here, but your examples above are a clear guide on how to do this so thank you.