[Asterisk-Users] Some (lack of) answers regarding the wakeup call application...

Rob Fugina robf at geekthing.com
Tue Jun 1 13:06:08 MST 2004


On Tue, Jun 01, 2004 at 10:57:22AM -0500, Steven Critchfield wrote:
> A question, I don't like the idea of a cron-scheduler in asterisk but I
> don't have a really good reason not to like it. I do however think that
> by adding some form of date parser and a new configuration option to the
> sample.call file wouldn't be too bad of an idea. I am only slightly
> concerned that the reading of the file regularly might cause delays in
> asterisk.
>
> Consider this, you add the time-of-call config to sample.call, then you
> have a few 100 calls queued, what is the time to open, read, and parse
> the date string before deciding to act or not. Is this behavior going to
> be likely to cause calls to go out late. What is an acceptable amount
> late for a call to be processed.

I'm not really asking for a fully-functional copy of cron inserted into
asterisk.  If there were a way of scheduling something to run every
minute, or every 5 minutes...  The wakeup application isn't going to
be all that demanding on timing (depends on the customers, I guess),
but if the scheduler were added as a generic feature, who knows how much
precision would be desirable for other applications...

> Otherwise I think the idea of placing the time in the file and letting
> it poll and then fire it off is a good idea. 

I have to admit to not ever having looked at this part of the asterisk
source.  How is it looking for call files now?  Polling on an interval?
What about select(2)ing on the directory?  It could re-scan the directory
every time the directory is modified, including reading the call files
themselves, and keeping track of the call time specified in the file...
Or maybe it could be done more like I handle the wakeup call files...
The filenames look like HHMM.XXX.call, where HHMM is the 24-hour time
that the wakeup call should be made (wakeup calls can't be made more
than 23:59 in advance), and XXX is the extension that requested the
wakeup call.  In general, the XXX wouldn't be useful -- the dialing
instructions are in the file itself.  But it makes my life easier
when it comes to confirming and canceling a wakeup call.  Could we
just decide that the filenames of the call files have significance,
and decide on a way to encode the date and/or time into the filename?
The outgoing call queue scanner wouldn't have to parse the files out,
and there's no race condition while the call files are being created,
either (as could happen, I think, using the file timestamps).

Rob

-- 
Rob Fugina, Systems Guy
robf at geekthing.com -- http://www.geekthing.com
My firewall filters MS Office attachments.

I wish Noah had swatted those two mosquitoes.....



More information about the asterisk-users mailing list