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

James Golovich james at wwnet.net
Tue Jun 1 12:39:11 MST 2004


On Tue, 1 Jun 2004, Rob Fugina wrote:

> On Tue, Jun 01, 2004 at 06:54:02PM +0300, Apollon Koutlides wrote:
> > Rob Fugina wrote:
> > >It has occurred to me that the two AGI scripts could be rewritten as real
> > >compiled asterisk applications, but then it always hits me that without
> > >some kind of cron-line built-in scheduler, or changes to the outgoing
> > >call queueing that would allow a call to be scheduled for the future,
> > >there would still be that external cron-driven shell script.  Ugly.
> > > 
> > >
> > Actually, there's no need for anything like that. Set the file's
> > modification time to the value you require, and watch asterisk do all
> > the dirty work for you.
> 
> Sounds like a race condition to me...  Creating the file, then modifying
> the timestamp to a future time, hoping that * doesn't grab it away in
> the mean time...  I'll look further into this one, though...
> 

The old app_qcall would flock the file, assuming the app that drops the
file in would also flock the file then there wouldn't be any problem.  It
would be trivial to add this same functionality to pbx_spool

On occasion I've seen pbx_spool start processing a file before the write
has been complete.  To get around this I build the file in an alternate
directory (on the same filesystem) and then move the file over.

James




More information about the asterisk-users mailing list