Andrew Thomas
2009-Jul-16 12:44 UTC
[asterisk-users] AGI to announce temperature from weather.com XMLfile
I have just the thing in PHP. Drop me a personal e-mail and I'll whiz it over. Andrew Thomas Technical Services Manager andy at datavox.co.uk DataVox Ltd Saddleworth Business Centre Huddersfield Road Delph, Oldham OL3 5DF -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Trevor Hammonds Sent: 16 July 2009 12:50 To: 'Asterisk Users List' Subject: [asterisk-users] AGI to announce temperature from weather.com XMLfile I would like to have the ability to have Asterisk announce the temperature -- not using TTS -- within the dialplan. For a non-Asterisk project, I have a cron job that periodically pulls down an XML file from weather.com containing local weather data (TWC's user agreement requires that data be cached locally). Using sed, I also create a text file that contains only the numeric value of the current temperature, created from that XML file (e.g. <tmp>65</tmp> in the XML file becomes a text file with 65 as its only contents). I am hoping someone on the list has an example of a lightweight AGI script that I may modify to either read the simple text file and set a dialplan variable to the current temperature, or hopefully a more-sophisticated one which will parse the XML file to set the dialplan variable. The end goal is to have Asterisk play the speech files "temperature" "sixty" "five" "degrees" or the equivalent non-English files per the channel's current language setting. Thank you. Any assistance will be greatly appreciated. Sincerely, Trevor Hammonds _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users