Uses Realtime Information Service (RIS) to capture registration status of Cisco IP Phones on CUCM https://developer.cisco.com/docs/sxml/#risport70-api-reference
pip install py-cisco-ris
from axlhelper import AXL
from py-cisco-ris import RIS
cucm = os.getenv('cucm', '10.10.10.10')
version = os.getenv('version', '11.5')
axluser = os.getenv('axluser', 'axladmin')
axlpass = os.getenv('axlpass', 'p@ssw0rd')
risuser = os.getenv('risuser', 'axladmin')
rispass = os.getenv('rispass', 'p@ssw0rd')
axl = AXL(username=axluser,password=axlpass,wsdl=wsdl,cucm=cucm,cucm_version=version)
ris = RIS(username=risuser,password=rispass,cucm=cucm,cucm_version=version)
phones = ['SEPF8A5C59E0F1C', 'SEP1CDEA78380DE', 'SEP01CD4EF58980']
getSubs()
groups = limit(phones)
for group in groups:
registered = checkRegistration(group, subs)
print(registered['TimeStamp'])