[App_rpt-users] Weather Script

David KE6UPI dshaw at ke6upi.com
Fri Dec 10 14:22:17 UTC 2010


I have used this script. Works well.


asterisk at home festival weather configuration
MP3 Audio directly from NOAA! Updated URLs on 12-15-06

If you are in the San Diego NOAA Office area (and maybe others, check your
regional NOAA Office homepage from http://weather.gov/), you can get an
audio file of the current forecast for your zone and play it directly.

For the San Diego NOAA Office area, go to
http://newweb.wrh.noaa.gov/sgx/and click on the Audio selection under
Forecasts. Get the URL of the audio
file for your zone from the map.

Create an announcement in wav format from:
http://www.research.att.com/~ttsweb/tts/demo.php
I like the UK-Audrey voice, but try some others too.
Make something like:
  latest-forecast.wav  "Please wait while I download the latest forecast"
  select-weatherorvmc.wav  "Press 1 for voicemail press 2 for the
latest weather forecast"

You will have to convert the wav files from 16000Hz to 8000Hz and maybe
speed them up a bit (135%) and reduce the volume (60%) before you use them.
Put them in /var/lib/asterisk/sounds named latest-forecast.wav and
select-weatherorvmc.wav

Add something like this to your extensions.conf (maybe in the
rans<http://www.voip-info.org/wiki/view/rans>section) to get the
latest forecast when you dial whatever extension (like
865) that you choose.

My extensions.conf for audio weather:


exten => 865,1,Answer
exten => 865,2,Playback(latest-forecast)
exten => 865,3,System(/usr/bin/curl -s
http://www.wrh.noaa.gov/sgx/data/audio/LAXSAFC42.mp3 >
/tmp/LAXSAFC42.mp3)
exten => 865,4,Wait(1)
exten => 865,5,MP3Player(/tmp/LAXSAFC42.mp3)
exten => 865,6,System(rm /tmp/LAXSAFC42.mp3 -f)
exten => 865,7,Hangup



If you have trouble, make sure you have curl installed, change the path
above if necessary. find / -type f -name "curl" will find your curl
executable. I'm using MP3Player instead of Playback because I don't have a
sound card in the Asterisk box so mpg123 fails when it tries to use
/dev/dsp. I suppose there is a way to have a dummy dev, but I don't know
how. If you do use Playback instead of MP3Player, don't use the .mp3 file
extension in your extensions.conf.


http://www.voip-info.org/wiki/view/asterisk+at+home+festival+weather+configuration

David


On Thu, Dec 9, 2010 at 8:27 PM, Dwaine Garden <DwaineGarden at rogers.com>wrote:

> I would be interested in that.
>
> Dwaine
>
>
> "KB3ORS - Brian" <kb3ors at windstream.net> wrote:
>
> >I know there is weather scripts for irlp. But I am not having any luck
> >for allstar. I am wondering is there anyone who has one is willing to
> >help build one. What I am looking for just a weather alert script for
> >the severe alerts. I don’t want a full blown weather forcast.
> >
> >Any help appreciated
> >
> >KB3ORS – Brian_______________________________________________
> >App_rpt-users mailing list
> >App_rpt-users at qrvc.com
> >http://qrvc.com/mailman/listinfo/app_rpt-users
>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at qrvc.com
> http://qrvc.com/mailman/listinfo/app_rpt-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20101210/2ddbb957/attachment.html>


More information about the App_rpt-users mailing list