[OPEN-ILS-DEV] ***SPAM*** Telephony patch

Lebbeous Fogle-Weekley lebbeous at esilibrary.com
Fri May 21 11:36:39 EDT 2010


Hi everyone,

Here's a large patch against trunk to provide a foundation for telephone 
notification in Evergreen.  This patch contains much of the same code as 
a patch posted here in November 2009, with a few later improvements 
mostly by Joe Atzberger.

If there are no objections, I'd like to commit this to trunk soon to 
facilitate everyone's access to the code and to enable collaboration, 
more testing, and so on.

So far this code can provide very very basic overdue notifications. 
Work remains to be done to ensure that redundant notifications don't 
pile up, that other types of notifications get dealt with, etc.

This code relies on the action_trigger component of Evergreen to do its 
work.  It also requires an Asterisk server configured to make outbound 
telephone calls, and you'll have to run one daemon there as well as 
another cronned process.

The basic steps would be these (I would, of course, highly recommend 
starting with a test system):

0) apply the attached patch to Evergreen
1)
    a) Put the attached .gsm files in your Asterisk installation's sound 
directory
    b) Add an extension to Asterisk's extensions.conf according to the 
example included in the Evergreen patch
    c) Install Festival on your Asterisk server if it's not already 
installed, and start the Festival server so that it runs in the default 
manner.
2) run the xxxx.sql database upgrade script
3) edit opensrf.xml according to the included example file so that 
Evergreen knows how to reach your asterisk server, and restart Evergreen
4) run the eg-pbx-mediator.pl daemon on your asterisk server, making 
sure it can be reached by TCP connection from Evergreen
5) Enable the "Telephone Overdue Notice" action trigger event definition
6) Make some overdue circulations
7) Run /openils/bin/action_trigger_runner.pl --run-pending 
--process-hooks  (you'll want this to be run occasionally by a cron job 
if it isn't being run already)
8) Examine syslog on your Asterisk server for notice-level messages of 
the form "Left $stage_name for allocator" where $stage_name will be some 
path to a file.  Also look in your Evergreen database in the 
action_trigger.event table for new rows that indicate successful running 
of telephone overdue notice events.
9) If everything seems to have gone well so far, and you run the 
eg-pbx-allocator.pl script on the Asterisk server, this should actually 
place a phone call to the daytime phone number of whatever patrons 
you're testing with.  So be careful here.  You will actually be placing 
phone calls.
10) Try cronning the eg-pbx-allocator.pl script to run at short 
intervals during a reasonable calling window (the hours during which it 
would be appropriate to phone patrons).

Those instructions are admittedly very rough, but atz and senator (me) 
will be available by IRC to assist any adventurous souls who want to try 
it out.

-- 
Lebbeous
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: asterisk_now_3.patch
Url: http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100521/ddcbfb3d/attachment-0001.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-greeting.gsm
Type: application/octet-stream
Size: 5082 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100521/ddcbfb3d/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-overdue-plural.gsm
Type: application/octet-stream
Size: 1650 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100521/ddcbfb3d/attachment-0005.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-overdue-singular.gsm
Type: application/octet-stream
Size: 1485 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100521/ddcbfb3d/attachment-0006.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-thanks.gsm
Type: application/octet-stream
Size: 660 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100521/ddcbfb3d/attachment-0007.obj 


More information about the Open-ils-dev mailing list