General question on identifying a phone by an XML application

Version 1
    This document was generated from CDN thread

    Created by: michael plagge on 09-11-2011 05:37:32 AM
    Hello,
     
    we are deploying an XML application for IP phones like Siemens OpenStage which work similar to the IP Phone Services - now we would like to also integrate Cisco phones.
     
    The most things in the API specification seem to be clear, but I am missing a critical point:
     
    -> How does a phone using the IP Phone Services identify itself to the XML application server?
     
    Is there some hidden information not mentioned in the documentation that gets sent withing the HTTP headers? Comparing this to the OpenStage mimic, I am missing the transmission of a unique (and fixed) token like the caller id / (primary) phone number / username / userid that is associated with the phone.
     
    Background information: we are offering building automation services like controlling the A/C, lighting etc. in an office building. Controlling this features with the phone is cool, but only makes sense if the phone processing the XML application can be clearly identified and bound to a room/user.
     
    Any hints are well appreciated!
     
    Thanks
    Michael

    Subject: RE: General question on identifying a phone by an XML application
    Replied by: Jeffrey Ness on 09-11-2011 06:01:01 PM
    In the Service URL you can use the special parameter #DEVICENAME# and the phone will send it's device name (typically SEP followed by the MAC address).

    Example service url: http://mywebsever/myapp.aspx?Phone=#DEVICENAME#

    The phones will supply their own name in place of #DEVICENAME#. If you wanted to get the phone number assigned to this phone you would have 2 options that come to mind: #1 query the phone or #2 query CUCM for the lines associated with that devicename using AXL or RIS (since if the phone is requesting it the real time data should be present)

    HTH
    Jeff

    Subject: Re: New Message from Jeffrey Ness in IP Phone Services (IPPS) - IP Phone Se
    Replied by: NIGEL WARBURTON on 09-11-2011 06:19:06 PM
    Snmp can also give up the device information such as ip and line information

    Kind Regards

    Nigel

    Nigel R. Warburton
    O2 Unify Team
    Snr Technical Voice/Security Solutions Architect
    CCIE#3836, CCSP, ASFE, WSFE
    Information Systems Security (INFOSEC) Professional
    Committee on National Security Systems (CNSS4013)

    2e2, The Mansion House, Benham Valence,
    Newbury, Berkshire, RG20 8LU, UK
    Office:  01635 568000
    DDI:  01635 265822
    Mobile:  07812 349663
    Email:  <mailto:nigel.warburton@2e2.com> nigel.warburton@2e2.com<mailto:nigel.warburton@2e2.com>
    Web Site: <http://www.2e2.com> http://www.2e2.com

    On 9 Nov 2011, at 23:01, "Cisco Developer Community Forums" <cdicuser@developer.cisco.com<mailto:cdicuser@developer.cisco.com>> wrote:

    .

    Example service url: <http://mywebsever/myapp.aspx?Phone=#DEVICENAME#> http://mywebsever/myapp.aspx




    This email is from 2e2 UK Limited.  The contents of this email and
    any attachments are confidential to the intended recipient. They may
    not be disclosed to or used by or copied in any way by anyone other
    than the intended recipient. If this email is received in error,
    please contact 2e2 UK Limited IT Support on +44 (0) 845 521 3232 quoting the name of the sender and the email address to which it has been sent and
    then delete it.

    Please note that neither 2e2 UK Limited nor the sender accepts any
    responsibility for viruses and it is your responsibility to scan or
    otherwise check this email and any attachments.

    2e2 UK Limited is a company registered in England with registered
    number 4090390 whose registered office business is: The Mansion House
    Benham Valence, Speen, Near Newbury, Berks RG20 8LU.  For further
    information, please refer to www.2e2.com or, for general enquiries, please telephone +44 (0) 1635 568000.

    Subject: RE: General question on identifying a phone by an XML application
    Replied by: michael plagge on 10-11-2011 03:22:15 AM
    Jeff, thanks a lot - this helped to clarify things for me!
     
    I came across those #DEVICENAME# remarks, but due to the lack of code examples I assumed that this token will be replaced by the device type, i.e. the model number of the phone.
     
    So I can rely on the uniqueness of the #DEVICENAME# value in a bunch of phones in an installation?
     
    Are there any examples of how to exactly query the phone or CUCM for the phone number assigned to a device with a given name / IP address? Our application lives in an C++ environment (no Java connectivity) but can use HTTP as a communication channel with other services (as the phones for notifications).
     
    Michael
     


    In the Service URL you can use the special parameter #DEVICENAME# and the phone will send it's device name (typically SEP followed by the MAC address).

    Example service url: http://mywebsever/myapp.aspx?Phone=#DEVICENAME#

    The phones will supply their own name in place of #DEVICENAME#. If you wanted to get the phone number assigned to this phone you would have 2 options that come to mind: #1 query the phone or #2 query CUCM for the lines associated with that devicename using AXL or RIS (since if the phone is requesting it the real time data should be present)

    HTH
    Jeff

    Subject: RE: General question on identifying a phone by an XML application
    Replied by: Jeffrey Ness on 10-11-2011 06:58:39 AM
    The DEVICENAME will be unique within any CUCM environment. It is how the phones distinguish themselves to the Communications Manager servers. If you don't have a lot of device replacements you could just use the devicename (that is what I do in a lot of my applications.) If you need to go the extra step of resolving that devicename to a directory (phone) number you would have to follow the AXL developer guide and query from your web server to the AXL service on CUCM (or RIS). If you are going for security in an application I probably wouldn't query the phone's DeviceInformation page or the phone via SNMP. I've not used SNMP with CUCM and don't know what that data entails. I do know working with the CUCM web services can be painful to get everything going (there used to be some .NET WSDL changes listed in the guides), but once you have the web server working you should be able to easily get the data from the API guides on developer.cisco.com for your version of CUCM. This would be the other downside going forward, there are changes from time to time with CUCM versions and most specifically the newer version specific AXL queries as it would require validation and possibly updates to the code with CUCM upgrades whereas the basic devicename functionality has been unchanged from 4.0 through 8.5 (my personal experience realm with CUCM). (The version specific schema is optional, but if there are changes affecting your code it would break as Cisco has said they are only supporting 2 versions backwards of the schema and unspecified query versions will be treated as the oldest. I'm not sure if there is a plan to require the version at some point instead of letting developers put code out there and hope it continues to work in the future at the cost of more application upgrades to support various versions of CUCM.

    I don't have anything developed for this in C++, but I believe the developer guides show how to rawly send and receive the XML for the AXL queries in C (or some variant.) Obviously, if you have the capability, using more native XML objects should result in ensuring a conforming query/response.