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? Thanks, Bob kk6ecm _____ From: app_rpt-users-bounces@ohnosec.org [mailto:app_rpt-users-bounces@ohnosec.org] On Behalf Of mike@midnighteng.com Sent: Sunday, March 09, 2014 8:24 AM To: app_rpt-users@ohnosec.org Subject: Re: [App_rpt-users] DTMF A B C D Yes Angelo, you can use them but, just keep in mind the full implications of using them for control op commands because you probably do not have ABCD on your phone control system. ...mike/kb8jnm -------- Original Message -------- Subject: [App_rpt-users] DTMF A B C D From: Angelo Glorioso <n5uxt@hotmail.com> Date: Sun, March 09, 2014 9:02 am To: "Allstar app_rpt-users Group" <app_rpt-users@ohnosec.org> Hi all, I realized this has never been asked or I just can't find the answer. Can the A B C D on the DTMF pad be used for control codes?? 73 de Angelo _____ _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.
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.
Understand, thanks. This is basically what I have... cron schedule in rpt.conf to send the file to the radio, and a shell script to download the file from the Internet using wget... Was not seeing how rpt.conf was playing the script... Think I may have found my problem with how the DTMF command was configured to play it... Hence my confusion. Thanks much, Bob kk6ecm Sent from iPad On Mar 9, 2014, at 9:29 AM, "Bryan D. Boyle" <bdboyle@bdboyle.com> wrote:
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.
_______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.
Bob, The easiest way to execute scripts that command app_rpt is outside of rpt.conf in this way.... Create a script and store it somewhere (example) - #! /bin/bash /usr/sbin/asterisk -rx "rpt fun 27225 *7128190" sleep 10 /usr/sbin/asterisk -rx "rpt fun 27225 *7327133" I call this script alaska_connect and it is in /etc/asterisk/wa3dsp Make sure it s executable - chmod 750 <filename> Then create a cron job to tell when to execute it - 44 12 * * 1-6 /etc/asterisk/wa3dsp/alaska_connect This says execute /etc/asterisk/wa3dsp/alaska_connect at 12:44 (PM the clock is 24 hour) on Monday through Saturday Use crontab -e to edit cron or crontab -l to list what is there. Google cron or crontab to see cron options. As you can see this has nothing to do with anything inside of rpt.conf Remove any scheduled jobs in rpt.conf especially if they conflict with doing it in this way externally. The script can be any system command or anything you could do from the command prompt, download a file, reboot the system, send commands to app_rpt, restart asterisk, whatever. 73 Doug WA3DSP http://www.crompton.com/hamradio From: kk6ecm@gmail.com To: app_rpt-users@ohnosec.org Date: Sun, 9 Mar 2014 09:08:26 -0700 Subject: [App_rpt-users] app_rpt script execution 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? Thanks, Bob kk6ecm From: app_rpt-users-bounces@ohnosec.org [mailto:app_rpt-users-bounces@ohnosec.org] On Behalf Of mike@midnighteng.com Sent: Sunday, March 09, 2014 8:24 AM To: app_rpt-users@ohnosec.org Subject: Re: [App_rpt-users] DTMF A B C D Yes Angelo, you can use them but, just keep in mind the full implications of using them for control op commands because you probably do not have ABCD on your phone control system. ...mike/kb8jnm -------- Original Message -------- Subject: [App_rpt-users] DTMF A B C D From: Angelo Glorioso <n5uxt@hotmail.com> Date: Sun, March 09, 2014 9:02 am To: "Allstar app_rpt-users Group" <app_rpt-users@ohnosec.org> Hi all, I realized this has never been asked or I just can't find the answer. Can the A B C D on the DTMF pad be used for control codes?? 73 de Angelo _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.
participants (5)
-
Bob -
Bryan D. Boyle -
Doug Crompton -
kk6ecm -
mike@midnighteng.com