[arm-allstar] playnews

W2YMM w2ymm1 at gmail.com
Sun Sep 3 13:54:18 EST 2017


Here are some notes I took while installing playnews on one of my nodes
the script wasn't installed with the original image, it is a separate
script.



*Installing and using Playnews script from HamvoipThis was what I did to
install it on one of my nodes.*
Change directory to /etc.asterisk/local
Download the script wget http://hamvoip.org/downloads/playnews-0.11.tar.gz
unzip it tar -zxvf playnews-0.11.tar.gz
make it executable chmod +x playnews-0.11 (or maybe chmod 750 file name)
add lines to cron to play automatically
Edit cron by using crontab -e
# CRON EXAMPLE
# Prime news for play every Tuesday at 8:30PM - actual playtime set by
defined
# comand line TIME parameter. If Playtime is 9PM (2100)
# This would send pre warnings at 8:50 and 8:55 PM.
#
# Start a cron job every tuesday at 7:30 PM to run at 8 PM the same day
# and play ARRL news on node 41899, globally
#
30 19 * * 2 /etc/asterisk/local/playnews/playnews-0.11 ARRL 20:00 41899 G
&> /dev/null 2>&1
#
# Play ARN news on Thursday at 8PM on node 41899, Start playnews at 7 PM,
Play locally
#
00 19 * * 4 /etc/asterisk/local/playnews/playnews-0.11 ARN 20:00 41899 G &>
/dev/null 2>&1
Save your changes then exit.
Confirm changes by typing crontab -l


You can also assign a code in rpt.conf to play via touchtone.
Or execute from the command line. You will need to press any key to continue
Example
>From the command line play NEWSLINE immiteately Globally
# /etc/asterisk/local/playnews/playnews-0.11 ARN now 40000 (Change 40000 to
your node)
ARRL AUDIO NEWS
/etc/asterisk/local/playnews/playnews-0.11 ARRL now 41899
[root at as41899 scripts]# /etc/asterisk/local/playnews/playnews-0.11 ARN now
41899
Starting Download of ARN Audio News @ 22:12:55
--2017-04-06 22:12:55-- https://www.arnewsline.org/s/news.mp3
Resolving www.arnewsline.org (www.arnewsline.org)... 198.49.23.144,
198.185.159.145,
198.49.23.145, ...
Connecting to www.arnewsline.org (www.arnewsline.org)|198.49.23.144|:443...
connected.
HTTP request sent, awaiting response... 302
Cookie coming from www.arnewsline.org attempted to set domain to
squarespace.com
Location:
https://static1.squarespace.com/static/58b08985be65947bf171e05e/t/58e6d1a83e00be61768e5f2f/149
1521969045/news.mp3 [following]
--2017-04-06 22:12:57--
https://static1.squarespace.com/static/58b08985be65947bf171e05e/t/58e6d1a83e00b
e61768e5f2f/1491521969045/news.mp3
Resolving static1.squarespace.com (static1.squarespace.com)...
151.101.20.238
Connecting to static1.squarespace.com
(static1.squarespace.com)|151.101.20.238|:443...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 4626169 (4.4M) [audio/mp3]
Saving to: '/tmp/news.mp3'
news.mp3 100%[=====================================>] 4.41M 6.34MB/s
in 0.7s
2017-04-06 22:13:02 (6.34 MB/s) - '/tmp/news.mp3' saved [4626169/4626169]
Download complete @ 22:13:02
Converting from MP3 to individual ulaw format files
Creating /tmp/news.part1.wav
Creating /tmp/news.part2.wav
Creating /tmp/news.part3.wav
Creating /tmp/news.part4.wav
Creating /tmp/news.part5.wav
Creating /tmp/news.part6.wav
Creating /tmp/news.part7.wav
Creating /tmp/news.part8.wav
Converting to /tmp/news.part1.ul
Converting to /tmp/news.part2.ul
Converting to /tmp/news.part3.ul
Converting to /tmp/news.part4.ul
Converting to /tmp/news.part5.ul
Converting to /tmp/news.part6.ul
Converting to /tmp/news.part7.ul
Converting to /tmp/news.part8.ul
ARN news will start now and use playback (global) mode on node - 41899
Press any key to start news...
Starting in 10 seconds - Hit Ctrl C to interrupt
10 9 8 7 6 5 4 3 2 1
Playing file /tmp/news.part1.ul
Playing file /tmp/news.part2.ul
Playing file /tmp/news.part3.ul
Playing file /tmp/news.part4.ul
Playing file /tmp/news.part5.ul
Playing file /tmp/news.part6.ul
Playing file /tmp/news.part7.ul
Playing file /tmp/news.part8.ul
[root at as41899 scripts]#



To Play from the command line.
975=cmd,/etc/asterisk/local/playnews/playnews-0.10 ARRL now 41899 G &>
/dev/null 2>&1 ;ARRl Audio News
976=cmd,/etc/asterisk/local/playnews/playnews-0.10 ARN now 41899 G &>
/dev/null 2>&1 ;Newsline


Hopefully this helps you out.
The script seems to work fine as long as the ARRL names the file correctly.


Bob W2YMM

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Robert Prybyzerski Jr
W2YMM
631-960-1051
http://www.w2ymm.com

On Sun, Sep 3, 2017 at 2:28 PM, "James R. Pilgram via arm-allstar" <
arm-allstar at hamvoip.org> wrote:

> Is  PLAYNEWS   installed on the latest RPI2/3 update or do I need to
> install it? I'm looking at the readme in playnews v0.11 in the howto's and
> I'm missing something.
>
> Jim NH6HI
>
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org


More information about the arm-allstar mailing list