Get Device Serial Number

Version 1
    This document was generated from CDN thread

    Created by: Mayank Sharma on 12-01-2009 03:56:36 PM
    Hi again,

    Is there a way to access the device information like Serial Numbers? I could not find any table that stores that.

    I am using CUCM 6.1.

    Thanks,
    Max

    Subject: Re: Get Device Serial Number
    Replied by: EDWARD BROWN on 12-01-2009 04:22:34 PM
    As far as I know that is not included in the database at all.
    I know there are commercially available tools that do an HTML get from the phone and parse the response to get that type of information.

    Subject: Re: Get Device Serial Number
    Replied by: Mayank Sharma on 12-01-2009 04:27:02 PM
    Thanks a lot for your response.

    I wish that information was in the database or somewhere readily accessible .

    You mentioned there are some commercial tools available.

    I wonder if there are any CISCO APIs that can do that?

    Thanks,
    Max

    Subject: Re: Get Device Serial Number
    Replied by: David Staudt on 14-01-2009 02:22:25 AM
    If an individual phone's internal web server is enabled (default) you can request


    This will return an XML object with information including the serial number.

    Subject: Re: Get Device Serial Number
    Replied by: Mayank Sharma on 14-01-2009 02:47:18 PM
    Thanks David.
    That looks interesting. How do I get all the IP addressess of phones in my network?

    Subject: Re: Get Device Serial Number
    Replied by: David Staudt on 14-01-2009 07:35:44 PM
    Note what you ask can require a lot of database and CPU resources to present on systems with large numbers of phones. Something like this is the usual approach:

    Use Admin AXL <listPhoneByName> with <searchString> of % to get all phones in the CUCM cluster:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/1.0">
    <soapenv:Header/>
    <soapenv:Body>
    <ns:listPhoneByName sequence="1">
    <searchString>%</searchString>
    </ns:listPhoneByName>
    </soapenv:Body>
    </soapenv:Envelope>

    This list may contain phones that do not have a web server to query, so you will want to filter out those devices.

    Then use AXL Serviceability <SelectCmDevice> to query for the real time statistics - including registration status and last IP address - of phones by device name. This request can only return 200 devices at a time, and devices can have duplicate entries if they have registered to more than one CUCM node in the past, so you can try requesting 100 at a time:

    <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">200</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[2]" 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">SEP00070EB9C4B4</Item>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>

    Subject: Re: Get Device Serial Number
    Replied by: Mayank Sharma on 15-01-2009 01:04:22 PM
    Thanks so much David. This is exactly what I was looking for. I really appreciate all your help.

    Thanks,
    Max