Tap here to compare the top VoIP providersTap here to hide the top VoIP Providers
Polycom XML browser scripts for asterisk
Simple php scripts for parked calls, meetme rooms, sip users, queues list and peers status.
Please see attachment (click on the question mark on the left).
Here's a simple php script adapted from the Asterisk FOT book that will grab the XML page from your local NOAA weather station and display a few lines of info on your Polycom.
The file is a word.doc where I took some screen shots of the view source in IE and a picture of the phone display. Underneath the phone display picture is the php code. Just copy all of the code from the <? to ?> tags and paste into notepad and save as weather_phone.html. Upload it to the home page of your web server and make sure the permissions are set to 644 and it is owned by your usual web page owner.
You can test it by navigating to your URL with IE and then doing a show page source. It should look like the source above the phone picture in the document and be formatted properly for the microbrowser in Polycom.
Then set the URL of your microbrowser to http://www.yourwebsite.com/weather_phone.html and set the refresh time to something reasonable like 900 or 1800 so it will refresh every 15 or 30 minutes if you put it on the idle screen. I wouldn't refresh any faster than that because each time it refreshes, it has to go out to the NOAA weather station site and download the latest XML file and you don't want to be hitting their server every few seconds.
You must change the name of the weather station in the php script to one in your locale. A web page to search for them is here: http://www.weather.gov/xml/current_obs/ Change the KTUS in the line $weatherURL="http://www.nws.noaa.gov/data/current_obs/KTUS.xml"; to the name of your local weather station as found by the NOAA URL above.
Feel free to clean up the php code as you see fit, this was a quick and dirty hack. I just copied it from the AGI application on my Asterisk server, deleted the stuff that normally makes it say the weather and added a few lines to print to the screen in a web browser instead. I'm not a programmer but I understand enough code to be able to modify someone elses scripts. ;-)
Here's a slightly prettier (though perl-based) script I adapted for my polycom 550. Has pretty pictures and whatnot.
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+