I found an easier way to address this issue by looking at and modifying the pending events for our phone hold pickup event definition before the pending events are processed.
So this ticket can be closed, I'm not going to try and adjust the pbx-allocator scripts to do the same thing.
So before processing the pending items, we run a script that invalidates with a custom user_data value any pending events where a completed event exists for that same customer in the last 12 hours.
Then once a day, move all the invalid events back to pending status so they can get evaluated again.
I found an easier way to address this issue by looking at and modifying the pending events for our phone hold pickup event definition before the pending events are processed.
So this ticket can be closed, I'm not going to try and adjust the pbx-allocator scripts to do the same thing.
So before processing the pending items, we run a script that invalidates with a custom user_data value any pending events where a completed event exists for that same customer in the last 12 hours.
Then once a day, move all the invalid events back to pending status so they can get evaluated again.
I placed my scripts in a gist in case anyone else want to see them. /gist.github. com/stompro/ c1795afd55d2828 9b4ecd7e325e80e a3
https:/
This method could also be used to attack the problem in other ways that might be useful.
1. Only place calls for a pickup location after no more items have been placed on that locations holdshelf for x number of minutes.
2. Only place calls for a specific user once no more new events have been created for x number of minutes.
Josh