[App_rpt-users] app_rpt script execution

Bryan D. Boyle bdboyle at bdboyle.com
Sun Mar 9 16:29:31 UTC 2014


On 3/9/2014 12:08 PM, Bob wrote:
> I'm working on a node that downloads a file from the internet weekly, but
> the time seems to vary. I want to change this to a specific day and time
> each week, but cannot determine what is activating the script. The script is
> located in /etc/asterisk/. rpt.conf uses the file per its [schedule] stanza.
> I have two questions:
> 
>  
> 
> Does the server only load/execute files in /etc/asterisk each time asterisk
> is started?
> 
> How can I setup the system so it executes this script at a given time each
> week? 

Read up on the 'cron' command.

Use asterisk to do what asterisk does (interface and manage the radios).
Use the operating system to do what operating systems do (download
files, manage network connections, disk I/O, etc.)

Write a shell script that downloads the file on a regular schedule and
save the mp3 or wav or whathaveyou file to disk (wget/curl is your friend).
Write a shell script to play the script, assign it to a dtmf command in
rpt.conf
use the schedule stanza inside asterisk to execute the dtmf command you
assigned to the shell script at the requisite time.

Again, use asterisk to do what aterisk does.
Use the OS to do what it's supposed to do.

Simplifies things immensely.






More information about the App_rpt-users mailing list