[App_rpt-users] App_rpt-users Digest, Vol 95, Issue 39

Buddy Brannan buddy at brannan.name
Fri Jan 27 14:55:48 EST 2017


Wait a sec...

I'm tuning in late. 

So, OK, you want an announcement to play at specified intervals, so you've got a shell script that's called by crontab? 

There's a disconnect here someplace. Your last line below says:
>  asterisk -rx "localplay 42996 /etc/asterisk/scripts/ann01"   

The localplay command takes as an argument a sound file relative to /var/lib/asterisk/sounds 

So it needs to be called something like
asterisk -rx "rpt localplay 42996 meetingannounce"

Where meetingannounce is the filename of your sound file, minus the .gsm or .ul or .wav extension. Bear in mind that your file has to be the right bit rate and so forth or it will sound just bad. You can't, in other words, pass your shell script to localplay. 

In fact, you should be able to run the localplay command right fron crontab without an intervening shell script. 
--
Buddy Brannan, KB5ELV - Erie, PA
Phone: 814-860-3194 
Mobile: 814-431-0962
Email: buddy at brannan.name




> On Jan 27, 2017, at 2:28 PM, DuaneVT . <selkie2 at comcast.net> wrote:
> 
> Re: crontab schedule repeater announcements
> 
> I corrected earlier issues with not calling ann01.sh script from crontab. I can now cron into annun01.sh and ann01.sh works fine IF I say send a text to a file. 
> echo "Hello World" >> test 
> 
> It errors with "can not open file" if the ann01.sh script is trying to run a command line command or "localplay" to run a recorded voice file.
> asterisk -rx "rpt fun 42996 *970"                           
> /usr/sbin/asterisk -rx "rpt fun 42996 *970"
>  asterisk -rx "localplay 42996 /etc/asterisk/scripts/ann01"   
> 
> Thanks,
> Duane
> 
> 
> On Fri, Jan 27, 2017 at 12:00 PM, <app_rpt-users-request at lists.allstarlink.org> wrote:
> Send App_rpt-users mailing list submissions to
>         app_rpt-users at lists.allstarlink.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
> or, via email, send a message with subject or body 'help' to
>         app_rpt-users-request at lists.allstarlink.org
> 
> You can reach the person managing the list at
>         app_rpt-users-owner at lists.allstarlink.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of App_rpt-users digest..."
> 
> Today's Topics:
> 
>    1. Re: crontab schedule repeater announcements (David KE6UPI)
> 
> 
> ---------- Forwarded message ----------
> From: David KE6UPI <dshaw at ke6upi.com>
> To: Users of Asterisk app_rpt <app_rpt-users at lists.allstarlink.org>
> Cc: 
> Date: Fri, 27 Jan 2017 07:41:58 -0800
> Subject: Re: [App_rpt-users] crontab schedule repeater announcements
> Hello Duane, I would try this in crontab -e
> 
> * * * * * /etc/asterisk/scripts/announcements01.sh
> 
> David
> 
> On Fri, Jan 27, 2017 at 6:43 AM, DuaneVT . <selkie2 at comcast.net> wrote:
> I finally got to the root mail to see what errors crontab was finding with running this script. I have crontab calling ann01.sh script and the script is running. 
> The ann01.sh and prompt01.gsm files are in /etc/asterisk/scripts. Both files and the scripts folder are set as executable.
> The ann01.sh script is as below:
> 
> #!/bin/bash
> # Script plays prompt01 audio files over local node (repeater)
> # Runs "localplay prompt01.gsm via IAX or radio *970
> 
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin/asterisk/
> 
> /usr/sbin/asterisk -rx "rpt localplay /etc/asterisk/scripts/prompt01"  # error "can't open ann01"
> 
> 
> sudo asterisk -rx "rpt fun 42996 *970"                             # error "can't open ann01"
> asterisk -rx "rpt fun 42996 *970"                                      # error "can't open ann01"
> /usr/sbin/asterisk -rx "rpt fun 42996 *970"                       # error "can't open ann01"
> echo "Hello World" >> test                                               # runs fine!
> 
> ---------------------------------------------
> I can hit *970 on the radio and hear the localplay run the prompt01 speech.
> I can type ann01 via ssh and the prompt01 is heard.
> I just can't get the ann01.sh script to run from cron!
> 
> Help!
> Duane KA1LM
> 
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at lists.allstarlink.org
> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
> 
> To unsubscribe from this list please visit http://lists.allstarlink.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 at lists.allstarlink.org
> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
> 
> 
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at lists.allstarlink.org
> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
> 
> To unsubscribe from this list please visit http://lists.allstarlink.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.



More information about the App_rpt-users mailing list