09-14-2015 08:37 PM - edited 03-19-2019 10:05 AM
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)
Solved! Go to Solution.
09-15-2015 11:51 PM
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
03-05-2019 09:03 PM
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>
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide