We need the same functionality, but on a per-department basis.
The 'ForcePBXHours' example scripts look like what we need, however it overrides for *all* departments and not just the current department which doesn't make much sense given that office hours are per-department in v20.
Checking the scripts the "ps.GetAll<Group>().Where(x=>x.AllowCallService).Select(x=>" line seems to be what we would need to change as i'm assuming Group == Department.
In theory, we just need to modify that to limit it to whatever the current department is based on the current call in progress - i'm struggling to find any kind of documentation on how to accomplish this however?
The included HTML help in the call control API zipfile isn't really much help, it's just autogenerated class docs with some very brief descriptions but nothing on how it all hangs together.
Anyone got links to better documentation or pointers on how to accomplish this?