Overriding a Time Condition with a feature code is a request that has been asked for since as long as Time Conditions have been available in FreePBX. It comes up regularly on the forums and there have been many custom versions implemented and posted to solve this problem. We have introduced a Day/Night Control module to provide this ability as mentioned in an announcement a few weeks ago.
The module has been put into FreePBX version 2.3 and we hope by now has gotten plenty of testing. Some users were confused on how to use this module in conjunction with a Time Condition so we felt a short write-up in our technical series is in order.
The Day/Night Control module is similar to many other modules in the system. You can create multiple daynight feature codes and each can be used as a destination from within FreePBX as well as provide two destinations of their own. The feature code itself is nothing more than a two way toggle switch. You can change it to either DAY or NIGHT and the state is toggled each time you dial the feature code.
Let’s walk through a standard example of how one might use this in conjunction with an existing Time Condtion. You have an Inbound Route for your main Company DID, that points to a Time Condition set to ring your receptionist at queue 1200 during the normal business hours of 8:00am to 5:00pm Monday-Friday. After hours, it rings the After Hours IVR. You would like to provide an ability to override the Time Condition with a daynight feature code.
How do we do this when there is no reference to the Time Condition in the Day/Night Control module. Lets step through this example and see how:
- Create our new daynight feature code and give it index 0 (or what ever you prefer).
- Give this a useful name: Receptionist Override
- Set the current mode you want this to be in after hitting submit (probably Day).
- Provide an optional Password if you want to require password access to this feature code.
- Under DAY destination, choose the Receptionist Time Condition
- Under NIGHT destination, choose After Hours IVR
- Press Save
- Go to the Inbound Route that was pointing to the Time Condition and change it to point to your newly created Receptionist Override Day Night mode destination.
That’s it. What you have created looks like this:
Example of Day/Night Control Feature Code used with a Time Condition
Now you can dial *280, optionally entering a password if configured, and change between the Day mode, where the call continues to be controlled by the Time Condition, or the Night mode, where the call is routed around the Time Condition to the normal After Hours IVR.
Accessing the Day/Night Control from Outside
Down in the comments Dirk brought up and excellent question. He needs to be able to enable/disable the feature code from an outside line: "but how can I do this from an outside line?" Normally you would define a Misc Destination to this feature code and then point a DID or IVR option to that destination. However, it turns out this wasn’t really implemented quite right to allow you to do this (mental note – change that in a future release…). However, you can still use the Misc Destination module to accomplish this task. Here’s how:
- Go to the Misc Destinations Module
- Type in a meaningful description: Receptionist Override
- In the Dial Box type: *280
- Now use this Misc Destination as a destination for an Inbound Route, IVR selection, or other means.
The downside to this is that a change in the default Misc Destination feature code (from *28) will not reflect in this and you would have to go back and manually make the change here also. We will look at making this more standard, so that each feature code shows up in the Feature Code list in a future release.
There are plenty of other ways you can use the daynight feature code and there is no need to do it in conjunction with a Time Condition. It is simply a module that can be chosen as a destination by other modules and provides a two way toggle switch to continue the call routing to either its Day or Night destinations. As always, we hope that you enjoy these technical series and would very much like to see some suggestions of what you would like to read about (or we may decide no one is reading these and stop writing…).
–Philippe