[asterisk-users] Paging for Praying

Steve Edwards asterisk.org at sedwards.com
Fri Dec 28 19:13:02 CST 2012


Please don't top-post. If you don't know what that means, please consult 
Google.

On Fri, 28 Dec 2012, bilal ghayyad wrote:

> I have one more question:
>
> What was u meaning by call file and why it is required to place them in 
> the 'astspooldir.'?

There are 2 methods of originating a call external to Asterisk: call files 
and the Asterisk Manager Interface (AMI).

A call file is a text file that you create. The format is very specific. 
It could contain (in the context of your needs) the phone number to dial 
and the path of the file to play. A call file is kind of like a 'message 
in a bottle.' You cast it into the sea and hope for the best. When this 
file is "mv'ed" into the directory specified in the Asterisk astspooldir 
variable, Asterisk will read it and try to do what you want. You can 
'schedule' a call file to be processed in the future by setting the file's 
'mtime.'

The Asterisk Manager Interface (AMI) is a TCP connection between your 
program and Asterisk. You can issue commands (like originate) and receive 
responses. AMI is more robust because you can make decisions based on the 
response.

If robustness is not of primary importance, a script scheduled by cron to 
run after midnight could create the 5 call files for that day, setting the 
'mtime' of each file before "mv'ing" the file to the directory specified 
by astspooldir -- usually /var/spool/asterisk/outgoing/

How many customers will be receiving these reminders?

What religion is this targeted to?

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list