Asterisk Cisco 79XX XML Services

Business PBX Solutions
Provider Solution Details
3CX Software PBX for Windows
  • Windows Software Solution
  • Easy to Install and Manage
  • Auto Configures Phones & Trunks
  • Android, iOS, Windows & Mac clients
Details
Bicom VoIP Become an ITSP Now!
  • Become a serious competitor in VoIP Immediately
  • FULL Consultancy, Installation, Training & Support
  • Sell Hosted IP PBXs, Biz Lines, Call Centre
  • Turnkey Provisioning at your data center
Details
4PSA's VoipNow Cloud Communications Platform
  • Enjoy your custom licensing plan - Pay-As-You-Grow!
  • Your fastest go-to-market solution - from deployment to billing.
  • Professional support, training and knowledge base to help you grow your business
  • On your infrastructure or cloud-based, it's up to you.
Details

Introduction


The Cisco 79XX Phones include a mini-browser that allows the phone to interact with specially designed web services. These services can be developed as a CGI script on an HTTP server which outputs content using the XML syntax presented in this document.

A phone operator presses the "Services" button to access a menu of available services. Using the numeric key pad or the up/down button, a service is selected. The phone will then contact Apache to download an XML document which can contain the description of an object. These objects can be one of six different types.

This document will show you how to use PHP and Apache, all open source tools, to provide these services to your phones.

NB Currently, this document covers version 3.0 of CMXML. Current SIP firmware (6.1) for Cisco Phones will only work with the syntax below. CMXML 3.1 to 4.0 is supported only by SCCP phones.

XML Push is only supported with the SCCP image.
To achieve a dynamic page with the SIP image you can use the http header refresh directive.

XML applications written for Cisco 79XX IP Phones can be delivered to other types of IP Phones and IP Endpoints using a middleware technology from Millenigence called DashPhone CXP.

These services can also be delivered directly to the iPhone using a free simulator called MyServices.

Cisco Documentation


Perhaps a good place to start is the Cisco documentation -

Cisco IP Phone Services Application Development Notes (Cisco IP Phone XML Objects)
This is a callmanager document which also pertains to SIP.

For SIP image limitations see -
Cisco SIP IP Phone Administrator Guide, Versions 6.x and 7.x - Managing Cisco SIP IP Phones - XML Cards

XML Objects Types


When service applications send XML displays to the Cisco phone, they must ensure that Apache outputs the content with a MIME text/xml type, which can be accomplished with the PHP header() function.

The code sample below will send the necessary headers using PHP.

<?
header("Content-type: text/xml");
header("Connection: close");
header("Expires: -1");
?>


CiscoIPPhoneDirectory

This object is the same as the one used by the phone when you press the "Directory" button. Using this object will allow you to present a dialing directory of up to 32 entries.

Syntax


<CiscoIPPhoneDirectory>
<Title>Name Of Directory</Title>
<Prompt>Prompt text.</Prompt>
<DirectoryEntry>
<Name>Name of Person or Company</Name>
<Telephone>TelephoneNumber</Telephone>
</DirectoryEntry>
<DirectoryEntry>
<Name>Name of Person or Company</Name>
<Telephone>TelephoneNumber</Telephone>
</DirectoryEntry>
</CiscoIPPhoneDirectory>

Example PHP Source Code


<?
header("Content-type: text/xml");
header("Connection: close");
header("Expires: -1");

$mysql_conn = mysql_connect("localhost", "asteriskuser", "");
mysql_select_db("directory", $mysql_conn);
$result = mysql_query("SELECT name,tel FROM lunchdir", $mysql_conn);

print("<CiscoIPPhoneDirectory>\n");
print("\t<Title>Lunch Time Essentials</Title>\n");
print("\t<Prompt>Who will deliver food today?</Prompt>\n");

while($row = mysql_fetch_row($result))
{
print("\t<DirectoryEntry>\n");

print("\t\t<Name>");
print($row[0]);
print("</Name>\n");


print("\t\t<Telephone>");
print($row[1]);
print("</Telephone>\n");

print("\t</DirectoryEntry>\n");
}
print("</CiscoIPPhoneDirectory>\n");

?>


vCard to Cisco IP Phone CMXML Directory Script for PHP

Other open-source integration scripts are available to retrieve directory content from relational databases or LDAP servers. These are great methods, but some of us don't want the hassle of running yet another directory server or database since all the contacts we want are stored in our local address book and not in a web-connected database or LDAP server.

This script from VOSTROM gives you the ability to search your vCard file by name or browse through your vCard file name-by-name using your 79XX IP Phone's External Directory feature. You can simply tap Dial to call any entry. But unlike many other scripts, this this supports paging (Next page, ...) to get around the phone's silly limitation on number of entries per page (32), reformats phone numbers automatically to work with the IP Phone, and even labels entries with Work, Mobile, Home, or Main for contacts with multiple phone numbers. Easy to integrate (no database or LDAP server required), and also easy to use as a basis for adding your own SQL queries or LDAP queries if you have names stored there--See the addEntry() function. View the PHP source code here. There is some documentation here including a 3-step, 5-minute setup process.


CiscoIPPhoneGraphicMenu


Syntax


<CiscoIPPhoneGraphicMenu>
<Title>Title of Graphic Menu</Title>
<LocationX>Position - X Coordinate</LocationX>
<LocationY>Position - Y Coordinate</LocationY>
<Width>Width of Image</Width>
<Height>Height of image</Height>
<Depth>Pixel Depth of image</Depth>
<Data>Image Data (Hex)</Data>
<Prompt>Prompt text.</Prompt>
<MenuItem>
<Name>Name of Menu Item.</Name>
<URL>http://url.of.site.com/services/command.php</URL>
</MenuItem>
<MenuItem>
<Name>Name of Menu Item.</Name>
<URL>http://url.of.site.com/services/command.php</URL>
</MenuItem>
</CiscoIPPhoneGraphicMenu>


CiscoIPPhoneImage

Syntax


<CiscoIPPhoneImage>
<Title>Title of Image</Title>
<LocationX>Position - X Coordinate</LocationX>
<LocationY>Position - Y Coordinate</LocationY>
<Width>Width of Image</Width>
<Height>Height of image</Height>
<Depth>Pixel Depth of image</Depth>
<Data>Image Data (Hex)</Data>
<Prompt>Prompt text.</Prompt>
</CiscoIPPhoneImage>

CiscoIPPhoneInput

Syntax


<CiscoIPPhoneInput>
<Title>Title</Title>
<Prompt>Prompt text.</Prompt>
<URL>http://url.of.site.com/services/command.php</URL>
<InputItem>
<DisplayName>Name of field.</DisplayName>
<QueryStringParam>TelephoneNumber</QueryStringParam>
<InputFlags></InputFlags>
<DefaultValue>Value</DefaultValue>
</InputItem>
</CiscoIPPhoneInput>


CiscoIPPhoneMenu

Syntax


<CiscoIPPhoneMenu>
<Title>Title of Menu</Title>
<Prompt>Prompt text.</Prompt>
<MenuItem>
<Name>Name of Menu Item.</Name>
<URL>http://url.of.site.com/services/command.php</URL>
</MenuItem>
<MenuItem>
<Name>Name of Menu Item.</Name>
<URL>http://url.of.site.com/services/command.php</URL>
</MenuItem>
</CiscoIPPhoneMenu>



CiscoIPPhoneText

Syntax


<CiscoIPPhoneText>
<Title>Title Here.</Title>
<Text>Text message to display.</Text>
<Prompt>Prompt text.</Prompt>
</CiscoIPPhoneText>


CiscoIPPhone PHP Classes

http://www.kludgebox.com/index.php?p=8

Working Examples


A working example of some XML Services can be found at the following addresses:

BT Exact IP Phone Services:

http://193.113.58.136/xml/ - NOTE: Doesn't work on current SIP firmware
http://193.113.58.136/bt/ - Non-Graphical version of above which DOES work.
These pages are generated with ASP
(times out on 18/01/2006 06:36 GMT)


PBX-In-A-Box XML Services:

http://www.pbxinabox.com/ciscoservices.php - Nice working Graphical menu with useful US stuff, Weather, Stocks, News
These pages are generated with Perl, and PHP, for information on setup, visit http://www.pbxinabox.com/consulting.htm#2


Berbee XML Services:

http://phone-xml.berbee.com/menu.xml - Nice working Graphical menu with useful stuff
These pages are generated with Perl



McFadden XML RSS News Service:

http://xmlsvc.csma.biz/ - (Live) PHP Script for displaying news headlines from RSS feeds. Can be used via this site or downloaded for local installation.


Open 79XX XML Directory:

Open79XXDir - Open PHP/MySQL XML Services content management system for Cisco 79XX XML Phones.


cxs:

http://www.btinternet.com/~andrewjk/cxs - Flexible and extensible directory service for Cisco 7900 series IP phones

Written in C# and utilising the Microsoft .NET Framework cxs allows access to a number of directories through a standard provider interface allowing other further directory services to be added with ease. Currently supported directories are LDAP, Microsoft Outlook Business Contact Manager and OLE DB compatible databases.


Australian Cisco Services:

http://cisco.internect.net - Live feeds of Australian News, Weather and Share Prices, for Cisco IP Phone users in Australia.


Phil's XML Portal:

http://flame.tiefighter.org/fwd/xml/ 404s on 18/01/2006 06:36 GMT
My own portal which links to the above two sites, and also has a work in progress of the above PHP code, using a mysql db to serve up a phone directory



AM-Web
Asterisk Manager interface for the Services button
just says 'face' on 18/01/2006 06:36 GMT





http://github.com/flebel/cisco79xx_phone_directory
Script to display Google Contacts on the phone's external directory.



http://www.albany.edu/~rs2814/
allows basic administration of asterisk



http://www.dontpokebadgers.com/RSS2Cisco/
This script will take RSS feeds and convert them to be displayed on Cisco's IP based phones such as the 7940 and 7960.





http://cvs.largeone.net/index.cgi/*checkout*/asterisk/scripts/status.cgi
Directory for internal numbers that uses the asterisk manager interface to show whether someone is on the phone



http://llg.cubic.org/tools/cisco.html
Links to 5 XML services (some german). The site also provides an enhanced version of the rss2cisco script from dontpokebadgers.



http://www.tjir.za.net/rss.html
An updated version of the rss2cisco.pl script from above that supports the XML browser on CISCO 796x, 794x and 797x IP Phones running SIP images and provides some debug/phone information.


CiscoXMLServices
http://www.ciscoxmlservices.com
Directory, FeedRSS, Fortune, Flickr images, Zimbra integration and other utilities...


Microsoft/Open LDAP get users with phone numbers
http://www.xens.net/content/asterisk-ldap-project
A simple script (or a good starting point) for people looking to lift numbers directly from an LDAP directory (like Microsoft AD)


Cisco XML Services for displaying outlook business and mobile contacts
http://www.visualviewmail.com
Search for outlook contacts, active directory users, display room calendars and view your voice mail on your Cisco IP phones.


MPD (Music Player Daemon) basic client (*unsecure*, you have to use .htaccess)
main.xml :
<CiscoIPPhoneMenu>
<Title>MPD</Title>
<Prompt>Play Music NOW !</Prompt>
<MenuItem>
<Name>Status</Name>
<URL>http://host.tld/cisco/mpd/cmd.php?cmd=</URL>
</MenuItem>
<MenuItem>
<Name>Play - Pause</Name>
<URL>http://host.tld/cisco/mpd/cmd.php?cmd=toggle</URL>
</MenuItem>
<MenuItem>
<Name>Stop</Name>
<URL>http://host.tld/cisco/mpd/cmd.php?cmd=stop</URL>
</MenuItem>
<MenuItem>
<Name>Next</Name>
<URL>http://host.tld/cisco/mpd/cmd.php?cmd=next</URL>
</MenuItem>
<MenuItem>
<Name>Previous</Name>
<URL>http://host.tld/cisco/mpd/cmd.php?cmd=prev</URL>
</MenuItem>
</CiscoIPPhoneMenu>

cmd.php :
<?php

$cmd = $_GET["cmd"];

exec("mpc $cmd", $ret);

header("Content-type: text/xml");
header("Connection: close");
header("Expires: -1");
if ($cmd != "status")
header("Location: http://host.tld/cisco/mpd/cmd.php?cmd=status");
else
header("Refresh: 2");

if ($cmd == "status")
{
echo "<CiscoIPPhoneText>\n";
echo "<Title>MPD</Title>\n";
echo "<Text>";
foreach ($ret as $r)
echo "$r\n";
echo "</Text>\n";
echo "</CiscoIPPhoneText>\n";
}
?>





Asterisk Directory


Use this PHP script to generate an Asterisk sip.conf, skinny.conf, and iax.conf based directory.
NOTE: Only entries which use the 'name' key are considered. Previously used 'callerid', but ran into problems parsing callerid if the extension was included. For each user you want added to the directory add 'name=User' to their respective profile. Change the
$location and $dirname variables depending on your configuration.

Verified to work with P0S3-07-5-00
Verified to work with P0S3-08-2-00 3-9-06 --ctwohig
http://users.marshall.edu/~twohig5/directory.php.txt


P0S3-08-2-00 is listed on Cisco's site but not with the rest of the SIP images,
on the voice downloads page follow the link for Cisco IP Phone FW 7900 Series.
It is listed as a download for CCM v5.0
http://www.cisco.com/cgi-bin/tablebuild.pl/ip-7900ser

tc0nn: P0S3-08-2-00 zip file (instead of the "cop" file) is listed on this page:
http://www.cisco.com/cgi-bin/tablebuild.pl/sip-ip-phone7960






Created by: rjlawr, Last modification: Sun 13 of May, 2012 (20:43 UTC) by admin


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+

Page Changes | Comments

 

Featured -

Search: