Minded Systems

Cisco XML Framework Documentation

With the start of 2011 came the official release of the CiscoIPPhone‘ PHP Framework. The framework is aimed at simplifying the creation and manipulation of the various Cisco XML service objects. Additions and updates are already in the works for the next release version of the framework. The following documentation will be kept as up to date as possible as the framework evolves and updates are issued. For more information and documentation on the use of the XML service objects with Cisco Systems, see www.cisco.com.

OBJECT CLASSES:

CiscoXMLService

CiscoIPPhoneMenu
CiscoIPPhoneText
CiscoIPPhoneInput
CiscoIPPhoneDirectory
CiscoIPPhoneImageFile
CiscoIPPhoneGraphicFileMenu
CiscoIPPhoneIconFileMenu
CiscoIPPhoneExecute

* NOTE: not all XML objects are included in the framework as they are not yet supported.

FUNCTION REFERENCE:

CiscoXMLService (abstract)

The base class for all Cisco XML service objects. This is an abstract superclass object only and contains global object functionality. Methods available to CiscoXMLService are inherently available to all other Cisco XML service object classes.

  • addSoftKey($name, $url, $position)
    Insert a custom softkey for the current service object pointing to $url in at slot $position and with the button titled $name.
  • applyXSLT($file)
    Returns the output of the service object after the XSLT stylesheet $file has been applied.
  • toXML()
    Returns the formatted XML output of the current service object. All subclasses implement a custom override method for of this and call this parent method to render any associated softkeys to the object.

CiscoIPPhoneMenu

  • __construct()
    Creates new instance of CiscoIPPhoneMenu.
  • setTitle($title)
    Specify a title for the current menu.
  • setPrompt($prompt)
    Add a prompt message to the current menu.
  • addItem($name, $url)
    Adds a new menu item to the current menu point to $url and identified by $name.
  • toXML()
    Returns formatted XML for the current menu.

CiscoIPPhoneText

  • __construct()
    Creates a new instance of CiscoIPPhoneText.
  • setTitle($title)
    Specify a title for the current text block.
  • setPrompt($prompt)
    Add a prompt message to the current text block.
  • setText($text)
    Insert block of ASCII, $text, into the text object.
  • toXML()
    Returns formatted XML for the text object.

CiscoIPPhoneInput

  • __construct()
    Creates a new isntance of CiscoIPPhoneInput.
  • setTitle($title)
    Specify a title for the current input object.
  • setPrompt($prompt)
    Add a prompt message to the input object.
  • setURL($url)
    Assign $url as the location to pass the information requested by the input object.
  • addItem($name, $param, $default = “”, $mask = “A”)
    Insert an input field into the current input object. The new item will be labelled $name and the value passed with the name $param. A default value can be specified by provided $default. An input mask can be applied by providing $mask as well (see Cisco documentation for valid input mask values).
  • toXML()
    Returns formatted XML for the input object.

CiscoIPPhoneDirectory

  • __construct()
    Creates a new instance of CiscoIPPhoneDirectory.
  • setTitle($title)
    Specify a title for the directory object.
  • setPrompt($prompt)
    Add a prompt message to the directory object.
  • addItem($name, $number)
    Insert a new directory entry identifed by $name and with a telephone number of $number. If directory entry with the same $name and $number already exists, the item will NOT be added.
  • toXML()
    Returns formatted XML for the directory object.

CiscoIPPhoneImageFile

  • __construct()
    Creates a new instance of CiscoIPPhoneImageFile.
  • setTitle($title)
    Specify a title for the image display object.
  • setPrompt($prompt)
    Add a prompt message to the image display object.
  • setImageURL($url)
    Specify the location, $url, of the image to display.
  • setPosition($x, $y)
    Provide a point of origin for the image display. The top-left corner of the image will be anchored to point ($x, $y) on the services display panel.
  • toXML()
    Returns formatted XML for the directory object.

CiscoIPPhoneGraphicFileMenu

  • __construct()
    Creates a new instance of CiscoIPPhoneGraphicFileMenu.
  • setTitle($title)
    Specify a title for the graphical menu object.
  • setPrompt($prompt)
    Add a prompt message to the graphical menu object.
  • setImageURL($url)
    Specify the location, $url, of the image file to display as the graphical menu.
  • setPosition($x, $y)
    Provide a point of origin for the image display. The top-left corner of the image will be anchored to point ($x, $y) on the services display panel.
  • addItem($name, $url, $area)
    Add a menu item to the graphical menu object. The $name provided is merely a placeholder and will not be displayed, common practice is to use the title of the current graphical menu object. The menu item will direct the user to $url when selected. The menu item will be selectable by touching the screen area defined by $area, an array of four integers. The first two integers are X1 and Y1; the top left corner of the touch area. The second two integers are X2 and Y2; the bottom right corner of the touch area for the menu item being added.
  • toXML()
    Returns formatted XML for the directory object.

CiscoIPPhoneIconFileMenu

  • __construct()
    Creates a new instance of CiscoIPPhoneIconFileMenu.
  • setTitle($title)
    Specify a title for the icon menu object.
  • setPrompt($prompt)
    Add a prompt message to the icon menu object.
  • addIcon($url, $index)
    Add an icon item to the icon menu object. The location of the icon image is given by $url. Each icon must also be provided an $index value between 0 and 9. Icon indices are used to associate menu items to icon items.
  • addItem($name, $url, $icon)
    Add a menu item to the icon menu object. The menu item will be identified by $name, and direct users to $url when selected. The menu item will display the icon associated to icon item $index.
  • toXML()
    Returns formatted XML for the directory object.

CiscoIPPhoneExecute

  • __construct()
    Creates a new instance of CiscoIPPhoneExecute.
  • addItem($url, $priority = 0)
    Adds an item to be executed by the destined Cisco device. The device will attempt to execute $url and return response codes based on the success or failure of the execution. If a $priority value is not specified, 0 is used to cause the execution to happen immediately. See Cisco documentation for valid priority values.
  • toXML()
    Returns formatted XML for the directory object.

The most recent version of the CiscoIPPhone Framework is available at http://www.minded.ca/default/2010-12-29/cisco-xml-services-framework/.

This looks interesting but I am a litle confused. Can I us this Framework to modify the default menus on the 7960/7970 phones for use with Asterisk or this just for Call Manager instllations..

I have been looking for a way to remove the DND and CFwdALL from the 79xx home screens, and add a Xfer / BXfer to the top level options available when on a Call..

January 7, 2011 Phonebuff

@Phonebuff
Sorry, the framework is really only for additional service objects and custom applications. Doesn’t really sound like what you need.

Are you using SIP or SCCP to connect the phones to asterisk? If you are on SCCP (or willing to try it), it has the ability to modify the softkey sets in the firmware. I can lend a hand with this if it helps too. I don’t believe that the SIP firmware has the ability to modify the softkey sets at this time.

January 7, 2011 Tyler Winfield

Tyler,

I use SIP on most of my installs, SCCP was really not stable (for me) in the Asterisk world. Although if I beleive what I read it’s getting better.

I have a 7970 and I think 7960 here as spares for customer deployment, so I would be willing to work with you to see what we can do.. The phone is great, the audio quality is even better, the lack of ability to configure softkeys has pushed me to Aastra products mostly these days.

Since, I want to play with 8.2 how would that be for a base to start from ??

———

January 15, 2011 Phonebuff

@Phonebuff
Yes, the old implementations weren’t that reliable, however your reading supports my observations. I’ve been using the latest version of Chan_SCCP-B (from http://sourceforge.net/projects/chan-sccp-b/files/V3/) for several months now with a 7970, 7945 and several 7960s without any issues that can be blamed directly on poor driver functionality. Not to mention, we all can probably agree that Cisco phones themselves are much more stable when using the SCCP images. I don’t believe I used any build arguments when building the sccp driver, its pretty straight forward. As per usual, remember to add the noload => chan_skinny.so and load => chan_sccp.so to modules.conf. The config file (sccp.conf) has had its formatting modified a bit (for the better), if you need an example file, let me know.

I’ve also noticed much less maintenance of individual phone config files in the TFTP when making changes, instead working with sccp.conf most of the time. As well, all of the asterisk command line ‘sccp’ commands seem to work without issue. Its nice being able to restart devices remotely.

January 16, 2011 Tyler Winfield

Tyler – can you contact me – I’m interested in your services for developing a crm integrating dialing through cisco 504g phones.

October 22, 2012 Sam Weber

Tyler Winfield hello, please add an example that shows how to use this class, for making adderess book for Cisco IP Phone 79XX.

January 20, 2014 nahman zeev
Please provide a valid email address

Trackback URL

http://www.minded.ca/2011-01-05/cisco-xml-framework-documentation/trackback/