02-29-2016 01:54 PM
I am looking to gather CUCM information, specifically IP addresses of nodes in the cluster via AXL API. I know this is possible via SNMP, but we have seen ccmTable show improper information in the past. Running a query against the processnode table shows server name, which is generally the IP address, but I would like to find the field specifically associated with IP address rather than server name. Does anyone know of a way to get this?
Thanks!
02-29-2016 04:45 PM
Hi Cole,
You can use RisReport to get all IPs address in the CUCM. The url for RisReport is
URL = https://YourCUCMIP:8443/realtimeservice/services/RisPort
Example:
.............
.............
//You need to set SOAPACTION (SOAPAction, http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice)
//
.............
.............
<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 xmlns:ns1="http://schemas.cisco.com/ast/soap/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">');
<CmSelectionCriteria href="#id0"/>');
</ns1:SelectCmDevice>');
<multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://schemas.cisco.com/ast/soap/" id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:CmSelectionCriteria">');
<MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>');
<Class xsi:type="xsd:string">Phone</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">');
if AIPAddress <> '' then
<item><Item> + AIpAddress + </Item></item> //If you want to find a particular IP address
else
<item><Item>*</Item></item> //Find all IPs
//
</SelectItems>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
......
Hope that would help you.
Regards
Thuy Doan
03-02-2016 11:35 AM
The Risport SOAP API is good for getting the IP address of phone devices (and some other things like CTI apps/gateways), however I don't believe that CUCM nodes are on the list.
In general, the host name in the process node table will either be an IP address (in which case you have the answer immediately) or a host name, in which case it is generally assumed that DNS will be the source of the host's actual (possibly varying) IP address. I imagine the best way to get the IP address from a CUCM host name is via a DNS lookup API (i.e. specific to your app's platform/OS.)
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