cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13058
Views
13
Helpful
16
Replies

How to query CUCM DB or one of the AXL APIs to list phone image load information

Victoria Taxdal
Level 1
Level 1

Is there a simple way to list phone name, model, and image load information for all phones in the CUCM system?

Could some kind soul please tell me if this is even possible (list phone versions, preferably with name and model)?

 

I see that I can do it for a single phone using getPhone and specifying the loadInformation tag.

But I cannot do it as a list for all phones using listPhone.  And I don't have enough familiarity with the database and have run out of stamina looking through the database dictionary trying to figure out how to do this with a sql query.

 

Here is as far as I have gotten, using just getPhone -- I hope the answer is not going to be to execute this query thousands of times, once for each phone?

XML query file:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">
    <soapenv:Header/>
    <soapenv:Body>
        <ns:getPhone sequence="?">
        <!--You have a CHOICE of the next 2 items at this level-->
            <name>SE123456ABCDEF</name>
            <returnedTags>
               <name></name>
               <model></model>
               <loadInformation></loadInformation>
            </returnedTags>
        </ns:getPhone>
    </soapenv:Body>
</soapenv:Envelope>

 

CLI query syntax:

 curl -kqs -u <username> -H "Content-type: text/xml;" -H "SOAPAction:CUCM:DB ver=8.5" -d @getPhone.xml https://<cucmservername>:8443/axl/ | xmllint --format -

 

Response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <ns:getPhoneResponse xmlns:ns="http://www.cisco.com/AXL/API/8.5">
      <return>
        <phone ctiid="515" uuid="{12AF9876-FE0A-ABCD-1234-AB1234BA987A}">
          <name>SEP123456ABCDEF</name>
          <model>Cisco 8945</model>
          <loadInformation special="false">SCCP894x.9-4-2SR1-2</loadInformation>
        </phone>
      </return>
    </ns:getPhoneResponse>
  </soapenv:Body>
</soapenv:Envelope>

 

Vikki (still very much a novice with the APIs)

16 Replies 16

B - run sql SELECT typemodel.name, typedeviceprotocol.name, defaults.loadinformation, defaults.inactiveloadinformation FROM defaults, typemodel,typedeviceprotocol WHERE defaults.tkmodel = typemodel.enum AND defaults.tkdeviceprotocol = typedeviceprotocol.enum ORDER BY typemodel.name

Please rate all helpful posts.

i am in initial stage thus using postman to check the response. i am getting the response as below can you please guide me what and where i am doing mistake, what i am understanding is it is working till authorization, but later it is not accepting soap request.

below is my request and response.

 

Request : 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getPhone sequence="?">
<!--You have a CHOICE of the next 2 items at this level-->
<name>SE123456ABCDEF</name>
<returnedTags>
<name></name>
<model></model>
<loadInformation></loadInformation>
</returnedTags>
</ns:getPhone>
</soapenv:Body>
</soapenv:Envelope>

 

Response: 

<html>
<head>
<title>Cisco CallManager: AXL Web Service</title>
</head>
<body>
<h1>Cisco CallManager: AXL Web Service</h1>
<p>The AXL Web Service is working and accepting requests.
Use HTTP POST to send a request.</p>
</body>
</html>