By the time your done, you should have at least 10 different time conditions – just for this one extension. Now imagine if there are 4 other people in the company on the same schedule – were pushing fifty time conditions – for just five extensions! And that not including the usual company widetime conditions – including various work schedule’s, open hours, holidays, etc.
Here to save the day is naftali5’s Abstracted Time Groups and updated Time Conditions, (as implemented by FreePBX project lead – Philippe Lindheimer). In a nut shell, what this upgrade does is it separates the time condition from the destinationallowing for the same ‘set’ of conditions to be ‘reused’ many times. Back to our example. In order to accommodate our tired CEO, we would click on the Time Groups module (assuming that the Time Conditions module is installed) and create a new time group by clicking add a new time group. Enter a description, such as "executive working hours". Now start by creating the first time group (10:00am-12:30 pm, mon-thu) and click Submit. Now pick the "Executive working hours" from the time groups menu, and add the second time group (2:00pm – 3:30pm mon-thu), and click submit. When your done it should look like this:
Now, click on the Time Condition module. Add a time condition called "CEO’s working hours" and select "Executive working hours" from the time groups drop-down list. Now, simply select the CEO’s extension as the "Destination if time matches" and his voicemail as the "Destination if time does not match" (or send the call wherever you would like – depending on your needs). Bravo! Can it be simpler? If you need to set the same time conditions for other exec’s, just create a new time condition – and reuse the time group as many times as you’d like! The time condition should look something like this:
One more thing:
This solution beautifully and simply addresses our needs and allows for reusing the time groups while keeping the time condition separate. There is just one hiccup: said CEO does not like to be disturbed while he smokes his cigar’s and sips Chardonnay. He needs a simple way to be able to manually override the time conditions and send all his calls to voice mail. That’s what the "Day/Night Mode Association" option is for (assuming you have the day/night module installed). You can set a Day/Night Control with a "Night" destination of the CEO’s voicemail. When ever he needs to smoke his cigars, he can just dial his Day/Night control code – and all his call will be routed to his voicemail.
The use of Day/Night controls are endless – and can introduce some form of dynamic call-flow control. What is your best/wildest implementation of Time Groups/Conditions? Lets hear about it in the comments!
Moshe Brevda, FreePBX Development Team
lazytt – FreePBX forums
hi365 – IRC