Improvement for telephony: just-in-time event revalidation
One of the shortcomings with using the Action/Trigger based telephony in
Evergreen until now was that while you might have overdue notices
generated and sent to a system where Asterisk runs for later calling,
but if the notice was generated on a Saturday night, and you have Asterisk
set up not to place any calls again until Monday morning, Asterisk has
no way of revalidating that call at the last minute. That is, the
system could not determine whether the items that were overdue on
Saturday night are still overdue on Monday morning, and whether the call
should still be made.
Now we have a workable solution to that.
The eg-pbx-allocator.pl script, which takes call files for Asterisk from
a "staging" directory and slowly drips them onto Asterisk's spool can
now consult an open-ils.justintime which in turn asks open-ils.trigger
whether given events, enumerated within the call files themselves, are
still valid.
open-ils.trigger is designed to run as a private service, so that's why
we need a public service that doesn't do anything too sensitive.
This open-ils.justintime service can potentially be extended to offer other
just-in-time information to the allocator right before a call goes onto
Asterisk's spool. For example, that might be a good time to check the time
of day and make a late decision on which phone number to use for a given
user (day_phone, evening_phone, other_phone).
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>