Australian Weather AGI for Asterisk
submitted by Dan Roe (nov 2006) – updated (sep 2007)
This Perl AGI downloads the latest observation data from www.bom.gov.au
It then reads it out to the caller and hangs up.
HOWTO
First we create a small macro in extensions.conf
… so it’s nice and neat to call
[macro-applicationWeather]
exten => s,1,Answer()
exten => s,2,Wait(1)
exten => s,3,AGI(bom.agi)
exten => s,4,Hangup()
Next in your main context, along with all your other numbers.
Call the macro like so: (dial 6)
exten => 6,1,Macro(applicationWeather) ; Weather Application
The only thing left to do is customize the Perl AGI script.
Save it to /var/lib/asterisk/agi-bin/bom.agi