[OPEN-ILS-DEV] Asterisk scheduling controls

Niles Ingalls nilesi at zionsville.lib.in.us
Tue Dec 15 13:01:01 EST 2009


On Dec 15, 2009, at 12:36 PM, Joe Atzberger wrote:

> In the course of integrating Asterisk telephony with Evergreen's action/trigger notice structure, we have encountered a problem that you may have already come across, or possibly even solved.  The question is basically how to schedule call times (on the asterisk side), i.e. start at 9AM, stop at 9PM.  
> 
> We are generating callfiles that are queued by moving them into the Asterisk spool directory.  We can tell Asterisk not to call before a certain time by setting the file's date modified time in the future.  So we have a mechanism for the "begin" time.  What we don't have is a mechanism to tell asterisk *not* to call after a given "end" time.  Anything that is in the dialplan logic itself does not appear suitable because that still processes the callfile and either succeeds or fails.  What we want is to *not* process the callfile, deferring it until the next start time.  
> 
> The reason there has to be a cutoff is that EG might spool up several thousand calls to fire at the "begin" time, and it is conceivable that not all calls would be completed by the intended end.  
> 
> Things we've ruled out:
> just turning off/on asterisk -- can't do that since local voicemail, incoming calls and desktop phones might depend on asterisk
> trying to adjust callfile date modified time inside dialplan -- doesn't work, because the file is still processed, i.e. moved to the "done" dir at the end
> So are there any solutions you guys have encountered?  This problem is very similar to print queue management on unix, so there may be products/packages in that problem-space that would work for us.  
> 
> --Joe


I recommend that you throttle the number of call records placed into /var/spool/asterisk/outgoing to a number no greater than total available channels.
You should already be creating the call records in a temporary folder, and moving them into the outgoing directory.  You can place the scheduling logic into the
process that is moving these files into the outgoing folder, allowing only a small and fixed number of attempted calls after you "shut of the switch".


Niles Ingalls
UNIX & Web Administrator
Hussey-Mayfield Memorial Public Library
250 N. Fifth Street
P.O. Box 840
Zionsville, IN. 46077

Phone   317-873-3149 x13280
Fax     317-873-8339

"Confidence is what you have before you understand the problem." - Woody Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20091215/2f01d04e/attachment.htm 


More information about the Open-ils-dev mailing list