ciscoris
Uses Realtime Information Service (RIS) to capture registration status of Cisco IP Phones on CUCM https://developer.cisco.com/docs/sxml/#risport70-api-reference
Install with pip or clone repo
pip install ciscoris
import ris, logcollection or other classes
from ciscoris import ris
specify your CUCM details
cucm = os.getenv('cucm', '10.10.10.10')
version = os.getenv('version', '11.5')
risuser = os.getenv('risuser', 'risadmin')
rispass = os.getenv('rispass', 'p@ssw0rd')
instanciate your RIS object
ris = ris(username=risuser,password=rispass,cucm=cucm,cucm_version=version)
input an array of phones
phones = ['SEPF8A5C59E0F1C', 'SEP1CDEA78380DE', 'SEP01CD4EF58980']
input an array of "process nodes" or nodes which run Callmanager service
subs = ['sub1', 'sub2', 'sub3']
you can use the related ciscoaxl library grab process nodes via API.
def getSubs():
nodes = axl.listProcessNodes()
if nodes['success']:
return nodes['response']
subs = getSubs()
group phones into 1000 and check registrations per group
limit = lambda phones, n=1000: [phones[i:i+n] for i in range(0, len(phones), n)]
groups = limit(phones)
for group in groups:
registered = ris.checkRegistration(group, subs)
user = registered['LoginUserId']
regtime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(registered['TimeStamp']))
for item in registered['IPAddress']:
ip = item[1][0]['IP']
for item in registered['LinesStatus']:
primeline = item[1][0]['DirectoryNumber']
name = registered['Name']
print('name: '+name)
print('user: '+user)
print('primary dn: '+primeline)
print('ip address: '+ip)
print('registration time: '+regtime)
Metadata
Release files for ciscoris 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ciscoris-0.0.5.tar.gz | 3.6 kB | Without provenance | Details for ciscoris-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ciscoris-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for ciscoris-0.0.5-py3-none-any.whl |
Total release size: 7.4 kB
Release files / ciscoris-0.0.5.tar.gz
| Download URL | ciscoris-0.0.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
027590bca0fcf1dbdc82d879009eae480c91109b7f543b59b6a27ccdc9059271
|
|
BLAKE2b-256 checksum How to use checksums |
75144c606c129788fca53dfed3da5d26b62631f0e9090def07344bf1352ad3f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / ciscoris-0.0.5-py3-none-any.whl
| Download URL | ciscoris-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89bd48858f09476ce1eded9daee65c5992e33f4b469bcacc5c7e5df55cb1c5c1
|
|
BLAKE2b-256 checksum How to use checksums |
5445609eee54da8b663a3712df933c49af215398299ce61b1738edbe0327dddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for ciscoris 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.