10-04-2016 01:13 AM
Am trying to fetch the list of all configured devices from CUCM (10.x and above) through two approaches:
1. Export Tool in CUCM -> export list for phone and customization template does not provide me an option to get registered IPv4/IpAdress and Admin Access/Password fields for the phones. How to add these parameters to be fetched along with phone list?
2. AXL API of CUCM -> doesnt return these fields. What are the constraints that I need to do to get list of all configured devices on cucm with DN, HostName, IP address, Accessid/password,EndUser Configurations ?
Any information on this would be helpful.
10-04-2016 08:35 AM
You need to look at the RisPort API: https://developer.cisco.com/site/sxml/documents/api-reference/risport/
SelectCmDevices will get you the IP address and registration state. So you extract your phones, then you do a SelectCmDevices for the devicenames you're interested in and that will get you the IPs.
As for the rest.. if they are there at all, they should be in the vendorConfig tag. I could imagine though that passwords are left out on purpose.. it's bad security practice to allow people to recover passwords.
to go from phone to dn, you look in the <lines> tags.. the phone will just give you the identifier of each line (dn and pattern, and pkid), so you can extract that doing getLine in AXL. And as for the enduser.. the phone has the ownerUserId tag.. which contains pkid and userid of an enduser. So you can then do a getUser command with that data to find the enduser who "owns" the phone.
I don't understand what you mean with hostname.. though looking at my DHCP servers.. they show the device name of each hardphone.. so perhaps that's what you mean.. how the phones register in the network? Of course, if you have jabber devices, that won't fly..
10-05-2016 03:48 PM
As Stephen suggest, you may need to use a combination of APIs to get the complete set of data you are looking for (minus the SSH password, see below:)
- AXL API: you can use this to retrieve the complete list of devices configured on the system, e.g. via <listPhone>
- AXL: you can retrieve the SSH access password for a specific device via the <getPhone> request - however note only the SSH username is provided, by design the password is not returned (or otherwise retrievable)
- Risport: useful for retrieving registration status and current/latest IP address of phones - note, phones that are configured but have never registered (since last CUCM restart) will not have records in Risport
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