cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2442
Views
10
Helpful
4
Replies

CUCM API query for retrieving the configured phone detail

geeta.kumari1
Level 1
Level 1

Hi Cisco Team,

 

Is there any API query which can provide below information from CUCM 11.x -

 

Device Name
Description
Device Pool
IPV4 Address
Directory Number
Device Type
Active Load ID
Owner User ID

 

Regards,

Geeta

4 Replies 4

Jaime Valencia
Cisco Employee
Cisco Employee

Look for that information over at DevNet, product APIs are covered there.

HTH

java

if this helps, please rate

If you are just looking for the data, you can also use the Bulk Administration Tool > Phones > Phone Reports to pull the data from CUCM. It is not an API, obviously, but will get you the data you are looking for.

Maren

davidn#
Cisco Employee
Cisco Employee

Geeta,

 

You can use SOAP to retrieve those info. Check out some python sample apps from our Code Exchange repository:

 

https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/serviceability-python-zeep-samples


More info about RisPort API -> https://developer.cisco.com/docs/sxml/#!risport70-api-reference/selectcmdevice

Hope that helps.


David

JasunKAR
Level 1
Level 1

If you are using PYTHON to hit your API you can do something like this:

# Enter phone MAC as you have to find it somehow
print('')
phoneMAC=input('Enter MAC address of phone here: ')
print('')

# Run the get phone request
resp = service.getPhone ( name = ( f'SEP{phoneMAC}' ) )

# Uncomment this to see everything in the response
#print(resp)
phoneMAC = resp["return"]["phone"]["name"]
phoneDevicePool = resp["return"]["phone"]["devicePoolName"]["_value_1"]
phoneExt = resp["return"]["phone"]["lines"]["line"][0]["dirn"]["pattern"]
phoneModel = resp["return"]["phone"]["model"]
loadID = resp["return"]["phone"]["loadInformation"]['_value_1']
ownerUser = resp["return"]["phone"]["ownerUserName"]['_value_1']

print(f'Phone MAC Address: {phoneMAC}')
print(f'Phone Model: {phoneModel}')
print(f'Phone Extension: {phoneExt}')
print(f'Phone device pool {phoneDevicePool}')
print(f'Phone load ID: {loadID}')
print(f'Phone owner: {ownerUser}')