Wishlist: Telephony - eg-pbx-allocator.pl limit calls to a phone number per day
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Wishlist
|
Unassigned |
Bug Description
Hello, we would like the pbx-allocator.pl to be a little smarter about how often a patron gets called.
We want calls to go out quickly, so customers can get their items as soon as possible. But we don't want customers to get one call per copy that goes on the holdshelf for them that day.
So I would like to propose that the pbx-allocator.pl, the script that moves calls from the call file staging directory to the asterisk outgoing call folder keep track of which phone numbers it has queued, and delay new calls for x number of hours if the phone number has been seen in the last x hours.
For our purposes just tracking the phone number would be enough, we don't identify the patron in the phone message, so there is no reason to track the specific patron id.
So how it might work would be.
For each call file that the pbx-allocator moves to the outgoing folder, record the call file name, phone number, context and timestamp.
For each call file that the pbx-allocator considers for moving to the outgoing folder, check to see if the phone number and context are in the data file. If there is an entry, check if the call file name is the same (which would mean smart-retry is in use, allow it) If it is a different call for the same number and context, change the modification time of the call file so it will be reconsidered the next day.
When the script loads the data file, it can delete all entries that are expired and exclude them when it gets overwritten.
For a phase 2 project, I would like to see about combining call files that are for the same number. That could be a separate script that gets run before calls start for the day.
Josh
Lake Agassiz Regional Library
Northwest Regional Library
summary: |
- Wishlist: Telephony - eg-pbx-allocator.pl limit calls to a specific - number per day + Wishlist: Telephony - eg-pbx-allocator.pl limit calls to a phone number + per day |
tags: |
added: actiontrigger patron removed: wishlist |
Changed in evergreen: | |
importance: | Undecided → Wishlist |
You can generate a single call file for multiple related events via the group context field in the action trigger setup. For example, I group hold pickup calls by usr. I think you could add usr.day_phone to the trigger environment and group by that.