Get Device Information of the Phone Dynamically

Version 1
    This document was generated from CDN thread

    Created by: Saneesh Kumar on 26-01-2009 01:50:02 PM
    Can anyone tell me what is the way to get the Device Information of the phone using Java SDK.

    I need some detailed information - Java API documentation for the CISCO IP Telephony development. I am currently trying to reuse a single JSP page on all the available IP Phones, with the contents changed dynamically according to the phone details.

    What are the APIs to retrieve Device Information from the phone at runtime?

    Please advise. It would be better if you could send me the whole CISCO Java SDK, as the version I work on doesn't have any of these details.

    Regards,
    Saneesh Kumar

    Subject: Re: Get Device Information of the Phone Dynamically
    Replied by: Anitha V on 27-01-2009 04:57:50 AM
    Hi Saneesh,

    You can use AXL Serviceability API to get the device information of the phone dynamically.

    Please use the following Selectcmdevice SOAP Request:

    ?xml version="1.0" encoding="utf-8"?>
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:SelectCmDevice
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns1="http://schemas.cisco.com/ast/soap/">
    <StateInfo xsi:type="xsd:string"/>
    <CmSelectionCriteria href="#id0"/>
    </ns1:SelectCmDevice>
    <multiRef id="id0" soapenc:root="0"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="ns2:CmSelectionCriteria"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns2="http://schemas.cisco.com/ast/soap/">
    <MaxReturnedDevices
    xsi:type="xsd:unsignedInt">10</MaxReturnedDevices>
    <Class xsi:type="xsd:string">Any</Class>
    <Model xsi:type="xsd:unsignedInt">255</Model>
    <Status xsi:type="xsd:string">Registered</Status>
    <NodeName xsi:type="xsd:string" xsi:nil="true"/>
    <SelectBy xsi:type="xsd:string">Name</SelectBy>
    <SelectItems soapenc:arrayType="ns2:SelectItem[1]"
    xsi:type="soapenc:Array">
    <item href="#id1"/>
    </SelectItems>
    </multiRef>
    <multiRef id="id1" soapenc:root="0"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="ns3:SelectItem" xmlns:ns3="http://schemas.cisco.com/ast/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <Item xsi:type="xsd:string">SEP0003E3340B87</Item>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>

    Go through this link to know more about AXL Serviceability: http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/devguide/6_0_1/ccmdvCh2.html

    Thanks and Regards,
    Anitha

    Subject: Re: Get Device Information of the Phone Dynamically
    Replied by: Saneesh Kumar on 27-01-2009 11:17:26 AM
    Anitha,
    Thanks a ton!.

    Don't you think there is a better way to do this? There would be a delay in sending the SOAP request, getting the response, processing it etc., ?

    As in my case, based on the Device information, I need to identify contents on the JSP page.

    Regards,
    Saneesh Kumar

    Subject: RE: Re: Get Device Information of the Phone Dynamically
    Replied by: SENOL KARAHASAN on 02-04-2009 12:52:49 PM
    Hi,
     
    ¿f you want to get device informations like (MAC, modelnumber, DN etc.) you can get all this from http://ipofyourphone/DeviceInformationX . All you make to do is get phone ip adress and call XML ,information pages and parse:
     
    getValuesFromXMLPage("http://" + Request.ServerVariables["REMOTE_ADDR"] + "/DeviceInformationX");
     
    -----------------------------------------------
    <DeviceInformation>
    <MACAddress>002290045895</MACAddress>
    <HostName>SEP002290045895</HostName>
    888434000
    <appLoadID>jar42sccp.8-3-3-17.sbn</appLoadID>
    <bootLoadID>tnp42.8-3-1-21a.bin</bootLoadID>
    <versionID>SCCP42.8-3-4SR1S</versionID>
    <hardwareRevision>6.0</hardwareRevision>
    <serialNumber>FCH12298YUG</serialNumber>
    <modelNumber>CP-7942G</modelNumber>
    <MessageWaiting>No</MessageWaiting>
    ¿
    <udi>
    phone
    Cisco Unified IP Phone 7942G, Global
    CP-7942G
    V03
    FCH12298YUG
    </udi>
    <time>12:35:01</time>
    <timezone>Greenwich Standard Time</timezone>
    <date>04/02/09</date>
    </DeviceInformation>
    -----------------------------------------------
     
    if you want detailed device information, you must get it from call manager with using AXL.
     
    Thanks,
    Bilgehan.