[Asterisk-Users] Extra sounds (Weather)

Whisker, Peter Peter.Whisker at logicacmg.com
Mon Feb 21 07:34:46 MST 2005


Hi

This is my script for my local forecast for SE England. I have had
problems getting festival to work integrated so I have cron run this
script every 3 hours and use Playback to play it in Asterisk:

Script
------

#!/bin/sh
cd /var/lib/asterisk/sounds
curl
"http://www.bbc.co.uk/weather/ukweather/printables/print_regional_outloo
k.shtml?pmslondon" 2>/dev/null \
| (sed -n '/print area open/,/print area close/ { s/<.*>//;s/deg
C/Celsius/;s/deg F/Fahrenheit/;s/ deg$/ /;s/^C /Celsius
/;s/^F)/Fahrenheit)/;p }' && date +'B B C forecast, %A %e %B at %l %p')
\
| /usr/local/bin/text2wave -f 8000 - -o wx.tmp.wav
sox wx.tmp.wav -r 8000 -c 1 wx.tmp.gsm
mv wx.tmp.gsm wx.gsm;rm -rf wx.tmp.wav

Extensions.conf
---------------

;Weather forecast for SE England 0_0 WX  (199)
exten => 199,1,Answer
exten => 199,2,Playback(wx)
exten => 199,3,Hangup 

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Liaan vd
Merwe
Sent: 16 February 2005 11:57
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Extra sounds (Weather)

Hi Trevor
This i know
I just send you a other script doing the same task this will give you a
guideline to make you own
----- Original Message -----
From: "Trevor G. Hammonds" <trevor at skyhost.net>
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" 
<asterisk-users at lists.digium.com>
Sent: Wednesday, February 16, 2005 1:50 PM
Subject: RE: [Asterisk-Users] Extra sounds (Weather)


> Liaan vd Merwe wrote on Wednesday, 16 February 2005
2:53 AM:
>
>> This is the example script (extracted from that
link) you will need
>> to find a weather page for your region an then
change the urls and
>> grep statements chow L
>
> Once again, this is NOT the script mentioned at Eric
Wieling's former 
> site,
> http://www.fnords.org/~eric/asterisk/, referenced it
the message in the
> archives at
>
http://lists.digium.com/pipermail/asterisk-users/2003-November/025983.ht
ml.
>
>
> Sincerely,
> Trevor Hammonds
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
>
http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>  
http://lists.digium.com/mailman/listinfo/asterisk-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



More information about the asterisk-users mailing list