12-04-2023 08:49 AM
Hi, I am trying to write a SQL query for the device name, last active, and last known IP address. However, IP address is not showing. The phones do show their IP addresses in CUCM. What can I do to fix this?
12-04-2023 11:09 AM - edited 12-04-2023 11:47 AM
AFAIK the registrationdynamice table is only supposed to work for IP addresses as of CUCM 12.5SU2+ (corrected)..even so I have not had much luck in getting it to show more than a few phone IPs.
The Risport70 web API is designed for this kind of registration/IP query, and would be the route I would recommend, since it's supported for all extant CUCM versions: https://developer.cisco.com/docs/sxml/#!risport70-api
Some samples in this repo: https://github.com/CiscoDevNet/serviceability-python-zeep-samples
12-04-2023 11:11 AM
According to this post, Solved: Which table of CUCM DB store the IP address of IP Phones? - Cisco Community It said 12.5SU2+.
12-04-2023 11:48 AM
Ah, you are correct...I've edited my post.
12-06-2023 06:40 AM
I don't see Risport70 web API able to search by and display the DevicePool information.
12-06-2023 10:54 AM
This is true...you would need to use AXL <getPhone> to obtain the device pool of a given phone: https://pubhub.devnetcloud.com/media/axl-schema-reference/docs/Files/AXLSoap_getPhone.html#Link698
The AXL <listPhone> request allows searching for phone by device pool: https://developer.cisco.com/docs/axl-schema-reference/
So the workflow could be something like:
* Obtain a list of phones for a particular device pool via AXL <listPhone>
* Retrieve the RIS status of the devices via Risport70 <SelectCmDeviceExt>, with <SelectBy>Name</SelectBy> providing each phone device name as an <Item> entry
12-06-2023 08:07 AM
I have used the CLI commands "show risdb query [phone|gateway|sip]" and then scraped what I needed from the text output. That worked for me on CUCM 10.5 and 12.5.
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