Asterisk Waster work-hours setup
Asterisk Waster work-hours setup
No FreePBX, no TrixBox—only /etc/asterisk/!
- A tool for determining work and non-work time in Asterisk extensions.
- Rules are processed from higher to lower priority.
- If the current time matches a rule, processing ends and the comment contains the ID of the rule that produced it.
- If no rule matches, the final result is non-work time (
value=0) with the comment "default last rule." - Returned data format: plain text:
$ curl "http://waster.dev.local/api/isworktime?datetime=2017-12-22 17:00&case=callcenter"
status done
value 0
comment default last rule

Example script that creates a flag file: /sh.sample/asterisk_worktime.sh
The schedule identifier is the flag-file name.
Verification:
