[asterisk-dev] touch utility and app_spool

Vadim Lebedev vadim at mbdsys.com
Wed Apr 22 08:47:59 CDT 2009


Folks,

I've was bitten by following issue.
I've integrated asterisk for a client on ARM based emebbed device.
The client needed to schedule calls using .call files  so i'ive 
developped a small shell script creating the .call file and using touch 
command to modify the access time to some time in the future.

While it worked perfectly well on normal asterisk installation it didn't 
work on the client target device. After pulling a lot of hair out of 
various parts of my body i've
discovered that the problem was touch utility on the device:  it is not 
standard linux touch  but one based on busybox package and it does not 
accept -t command line argument. 
So i've developped small ftouch utility which i'm attaching with hope 
that it can be useful for other people too (it even could be nice 
addition to standard asterisk distro i think)
It used like:
ftouch 40  filenme(s)  #  set acces time to 40 secs in the future

But it got me thinking about adding a Spool dialplan command wit 
following arguments
Spool(filename, filecontents, timeoffset)

Wich will create a .call file, fill it with file contents, and modify 
access time according to timeoffset

Any comments?

Thanks
Vadim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftouch.c
Type: text/x-csrc
Size: 430 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20090422/f6c96123/attachment.c 


More information about the asterisk-dev mailing list