login | register
Wed 01 of Aug, 2007 [09:23 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.

Web www.voip-info.org
Shoutbox
  • Aykut, Wed 01 of Aug, 2007 [07:53 UTC]: Hi all, does anybody know about Thomson ST2030 SIP phone. I have upgraded it to latest version (1.56) but "Hold" and "Conf" features are not working after the upgrade ?? Do you know any solution or do you have Ver. 1.52 ?? Where can I find it?
  • Edward J Brown, Tue 31 of Jul, 2007 [23:33 UTC]: Has anybody experienced Choppy voice quality when using a Linksys SPA942 in an Asterisk Conference bridge? It works fine with my polycom and Cisco, but sucks with my Linksys.
  • www.astawerks.com, Fri 27 of Jul, 2007 [18:00 UTC]: does anyone use asterisk on top of clark connect? does it work good?
  • simon, Fri 27 of Jul, 2007 [14:16 UTC]: Hi All, Has anyone here managed to get the Cisco79x1 to successfully fail over to the backup proxy. I have 2 asterisk servers , handsets all register and function, except that backup proxy function doesn't work. Any working example would be very apprecia
  • Matthew Richmond, Thu 26 of Jul, 2007 [03:40 UTC]: using the page() application to page across our building...often the meetme conferences don't disconnect after the caller hangs up. Anyone else having this problem. (using Polycom phones)
  • Matthew Richmond, Wed 25 of Jul, 2007 [02:58 UTC]: thanks Nicholas Blasgen! I haven't worked with AGI before, but there's always a first! Thanks again!
  • Nicholas Blasgen, Tue 24 of Jul, 2007 [19:18 UTC]: Matthew Richmond, AGI will handle all that for you.
  • sam, Mon 23 of Jul, 2007 [16:39 UTC]: need help - certain voicemail extension will stop working and recording voicemail on asterisk - anyone know why and how to fix it? Thanks
  • john haji, Mon 23 of Jul, 2007 [14:55 UTC]: free calls to pakistan
  • bong, Sat 21 of Jul, 2007 [19:09 UTC]: hi good day to all can anyone help me how to configured the nortel sip to the signaling server and how to activate in mobile w/ sip compatible without mcs
Server Stats
  • Execution time: 0.53s
  • Memory usage: 2.27MB
  • Database queries: 32
  • GZIP: Disabled
  • Server load: 2.92

Asterisk Cisco 79XX XML Services

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.

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)


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.


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://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.


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 by vopp on Mon 22 of Jan, 2007 [14:10 UTC]

Comments Filter

Open 79XX XML Directory

by syburgh on Monday 15 of January, 2007 [19:34:54 UTC]
Found this project on SourceForge. It's a bit old and needs PHP+MySQL, but works fine with 79x0 and 79x1. Enables Web based set up of "Containers", "Contact Holders", and Contacts with several phone numbers (and SIP URIs). Useful for situations where there is no local LDAP directory.

The graphical menus are "bitmapped" (literally, using text) and don't display well on 79x1. I only use the directory features (ignoring the memo and RSS), so I set the directoryURL to http://servername/PhoneUI/menuItems.php rather than http://servername/PhoneUI/index.php.

Project is: http://web.csma.biz/apps/xml_xmldir.php

cisco 7960 cm_7-2-3 php-header

by tex on Wednesday 02 of August, 2006 [13:42:33 UTC]
if I serve these php / xml files with apache2 on my debian sarge server the phone just displays the files as text

I had to insert an additional header line

header("Cache-Control: private");

Now it works

I am not sure why ... hope it will help

Working script with > 32 entries.

by Steve Kirk on Thursday 08 of December, 2005 [18:06:51 UTC]
Since I'm a new to this stuff (and I'll add this is my first XML-output script EVER) I struggled a bit with the "http refresh header" thing; My company directory is over 100 entries, so doing "page navigation" stumped me - well, for about 10 mins. So to help out other newbs, here's the script I wrote (and works on my 7960/SIP v7.4) --> dir.php.

Correction in XML php mysql script

by Mark Rounds on Wednesday 19 of October, 2005 [01:38:40 UTC]
I noticed that there was a small problem with the php mysql directory script. I was getting extra characters before and after the number on my 7940 phone. I have posted an updated script that works a little better. The 9 infront of the telephone number is my dialout number. You can ignore if you like, I won't loose sleep over it.

And Remember, printf is your friend!!

<?
header("Content-type: text/xml");
header("Connection: close");
header("Expires: -1");
echo "<" . "?xml version=\"1.0\" ?".">\n";

?>
<CiscoIPPhoneDirectory>
   <Title>IP Telephony Directory</Title> 
   <Prompt>1340Media Phone List</Prompt>                     
<?

$database = 'contacts';

$db_server = 'my server';
$db_user = 'my user';
$db_pass = 'my password';

$link = mysql_connect($db_server, $db_user, $db_pass);

if (!$link) {
       die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db($database, $link);

if (!$db_selected) {
       die('Can\'t use database $database : ' . mysql_error());
}



$result = mysql_db_query ($database, "select * from phonelists ORDER BY `name`");

while ($row = mysql_fetch_array ($result)) {

   printf("\t\t<DirectoryEntry>\n");
   printf("\t\t\t<Name>%s</Name>\n",$row"name");
   printf("\t\t\t<Telephone>9%s</Telephone>\n",$row"phone");
   printf("\t\t</DirectoryEntry>\n");

}

mysql_free_result ($result);

mysql_close($link);

?>
</CiscoIPPhoneDirectory>

Edit

wrong url ?

by Anonymous on Thursday 13 of January, 2005 [09:55:26 UTC]
http://cvs.largeone.net/index.cgi/*checkout*/asterisk/scripts/status.cgi doesn't not work, unable to reach the webmaster by mail (:sad:)
Edit

Correction on XML Directory script from sip.conf

by Anonymous on Wednesday 05 of January, 2005 [03:08:19 UTC]
After trying to apply an Asterisk Directory PHP script on my system, php didn't like the following expression on line 13.
if (isset($vcallerid>'callerid'))

After a bit of research, I figured out that wiki eats up a square bracket (sorry, I am a newbie here). I am offering below a modified version, which I have just verified to work on my Cisco 79X0's with SIP 7.3 firmware.
Enjoy. Serge Vecher

kb_directory.php
/* PHP Script for Creating XML Directory
   for Cisco 79X0 Phones at KB Studio
   implemented by SAV, last update 1/5/04
   based on howto at
   www.voip-info.org/wiki-Asterisk+Cisco+79XX+XML+Services
  • /
header("Content-type: text/xml");
header("Connection: close");
header("Expires: -1");

// location of asterisk config files
$location = "/etc/asterisk/";
$dirname = "KB Studio Directory";

// parse sip.conf
$sip_array = parse_ini_file($location."sip.conf", true);
while ($v = current($sip_array))
{ if (isset($v['callerid']]))
 { $directory[] = "\n".$v['callerid']]."\n". "".key($sip_array)."\n\n"; }
 next($sip_array);
}

echo "\n";
echo "".$dirname."\n";
foreach ($directory as $v)
{ print_r($v); }
echo "select entry\n";
echo "\n";
?>

Edit

7905 SIP XML Support

by Anonymous on Tuesday 16 of November, 2004 [12:42:56 UTC]
Is it possible to use the xml features on a 7905. The SIP Image (Software Version 1.02.00(040406A) ) I'm using now does not seem to support it.
Edit

SoftKeys

by Anonymous on Thursday 23 of September, 2004 [04:16:55 UTC]
(:evil:) The softKeys found in many examples do not appear to work with the SIP 7.2 firmware. I've confirmed this by poking around in the SIP image, and also looking at the debug messages on the console. It ways SoftKeyItem element not found..

So, we are out-of-luck....

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2007 Arte Marketing, Inc.

Powered by bitweaver