Restrict outbound calls based on time of day

I would like to be able to restrict certain extensions from making calls based on the area code and the time of day. This is mainly to force compliance for our collections department to prevent them from calling a customer before we are legally allowed to call them.

I see I can use time groups and assign that to an outbound route but my understanding is that it would prevent anyone, not just the collections department from calling out on that route.

I’m using freepbx

I figured out a strategy to accomplish what I’m trying to do. Serendipitoiusly we had configured our extensions such that all corporate administrative users use extensions 2XX while Customer Service, Collections, and Sales uses 12XX. We have a lot of outbound routes so that when we call a specific area code or sets of area codes, we present a specific CID. This is also known as CLIP.

I created a new outbound route called “CorporateOut” and set the dial patterns to:

I then set this as the highest priority route below my EMERGENCY route.

Then for the outbound routes used by CLIP, I set the dial patterns so that they used /12XX for the Caller ID. I then created time groups that defined the appropriate times for each route.

Lastly, I deleted the final catch-all route from the bottom of my outbound routes so that calls from these departments wouldn’t go out that “generic” route.

If anyone has suggestions on making this cleaner or more efficient, please sound off. Otherwise, I hope this helps others seeking to do something similar.