Hello,
I need help refining my logic setup.
What I’m trying to achieve:
Create time conditions for working hours. If it’s within working hours, calls should be directed to a specific department. However, if it’s outside of working hours, during weekends, or on holidays, an announcement should play instead.
To accomplish this, I’m using a calendar where all holidays are defined, as well as another calendar for non-working hours and weekends. However, there’s an issue: every day, there’s a one-minute window between 23:59 and 00:00 (due to how calendar events are set up – you can’t create an event that spans from a higher hour to a lower hour, so I have to split non-working times into two events: one for the evening and one for the morning). As a result, FreePBX considers that one minute as working time, which is driving me crazy.
Next, I’ve created a calendar group that combines these two calendars. I then use this calendar group in my time condition for NON-WORKING HOURS.
While this setup technically works, it feels illogical. If someone else were to look at it, I doubt they would understand it easily.
On top of that, I’d like to implement this solution for multiple departments, each with different opening hours.
Does anyone have a simpler or better approach for this?