BBC Weather on CISCO 7961

My another script, less useful but quite cool 8)

  1. Set up one of the buttons to service mode in SEPXXXXXXXXXXXX.cnf.xml so it will look like this

<sipLines> <line button="1"> ... </line> <line button="2"> <featureID>20</featureID> <featureLabel>BBC Weather</featureLabel> <serviceURI></serviceURI> </line> </sipLines>
[size=85] is the IP of the asterisk server
When we press button 2 it will load weather.xml file which we need to prepare[/size]

  1. The script generates that file in a format proper to Cisco 7961

[code]#! /bin/sh

wget -q -N

echo "

BBC - Forecast for London City" > /var/www/html/services/weather.xml cat Next3DaysRSS.xml | grep lastBuildDate >> /var/www/html/services/weather.xml sed -i 's/lastBuildDate/Prompt/g' /var/www/html/services/weather.xml sed -n '//,/<\/item>/p' Next3DaysRSS.xml >> /var/www/html/services/weather.xml sed -i '/<link/d' /var/www/html/services/weather.xml sed -i '/<guid/d' /var/www/html/services/weather.xml sed -i '/<geo/d' /var/www/html/services/weather.xml sed -i '/<pub/d' /var/www/html/services/weather.xml sed -i '/<desc/d' /var/www/html/services/weather.xml sed -i 's/title/Name/g' /var/www/html/services/weather.xml sed -i 's/item/MenuItem/g' /var/www/html/services/weather.xml sed -i 's/°//g' /var/www/html/services/weather.xml sed -i 's/Temp/T/g' /var/www/html/services/weather.xml echo "" >> /var/www/html/services/weather.xml [/code] [size=85] Please note: - [b]wget[/b] is required on the server to download RSS from BBC website - to change the city you need to find a 4-didgit code, i.e Chicago is 0107: [ ... aysRSS.xml]( - there is a list here []( [/size]

3. weather.xml should be placed in the location accessible for the handset via html (in my case apache is running on the asterisk server and the /var/www/html/services/ is accessible from outside)

  1. Run the script every morning at 8am (crontab -e)

### Update weather on CISCO 7961 0 8 * * * /var/www/html/services/

When you press the weather button, after short while you get this on the handset:

That’s it.