Upgrading enterprise Cisco Unified Communications environments (managing tens of thousands of endpoints) to a new major release (e.g., CUCM v14 to v15) requires strict adherence to the Cisco Compatibility Matrix. Manually mapping physical hardware chassis, IOS versions, and default phone firmware across multiple clusters is a highly manual, error-prone process that can take weeks of engineering time.
This toolkit is a suite of Python automation scripts designed to eliminate manual discovery. It leverages Cisco AXL APIs, Netmiko (SSH), and Playwright (headless browser scraping) to extract live infrastructure data, scrape the live Cisco v15 Compatibility Matrix, and generate mathematically validated compliance reports.
- Efficiency: Reduces a multi-week enterprise audit to minutes of automated execution.
- Accuracy: Eliminates human error by programmatically matching extracted PIDs and versions against Cisco's live documentation.
- Risk Mitigation: Automatically flags legacy hardware for End-of-Support (EOS) replacement prior to upgrade cutovers.
The toolkit is broken down into 5 sequential scripts, separating Data Extraction from Compliance Auditing.
-
physical_phone_device_default_extractor.py- Function: Connects to multiple CUCM clusters via AXL API to extract a clean inventory of physical phones and default firmware loads (explicitly filtering out virtual endpoints like CTI ports).
- Output:
Physical_Phone_Device_Default_Discovery_Report.csv
-
phone_firmware_compliance_auditor.py- Function: Reads the discovery CSV, launches a headless browser to scrape the Cisco v15 Matrix, and appends the required minimum and recommended firmware versions for each specific phone model.
- Output:
Phone_Firmware_Compliance_Audit_Report.csv
-
gateway_sip_trunk_ip_extractor.py- Function: Queries the CUCM database via raw SOAP/AXL and RISPort to locate all configured voice gateways and trunks, categorizing them into a formatted Excel workbook based on protocol (H.323, MGCP, SIP, Analog VG).
- Output:
Gateway_Sip_Trunk_IP_Discovery_Report.xlsx
-
gateway_hardware_ios_extractor.py- Function: Uses a custom Tkinter GUI to securely SSH (via Netmiko) into the discovered gateway IPs. It extracts the true physical hardware chassis model (PID) and running IOS/IOS-XE version.
- Output:
Gateway_Hardware_IOS_Discovery_Report.csv
-
gateway_ios_compliance_auditor.py- Function: Evaluates the scraped hardware and IOS versions against the Cisco v15 Matrix. It appends explicit hardware EOS flags and calculates mathematical IOS upgrade recommendations.
- Output:
Gateway_IOS_Audit_Report.csv
- Python 3.9 or higher
- Network access to your CUCM Publisher nodes (port 8443) and voice gateways (port 22)
- An AXL-enabled application user on each CUCM cluster
- The Cisco AXL SQL Toolkit WSDL (
AXLAPI.wsdl) matching your CUCM version, placed in aschema/folder alongside the scripts
git clone https://github.com/freddyantony/cucm-upgrade-readiness-audit.git
cd cucm-upgrade-readiness-auditpip install requests zeep lxml pandas openpyxl netmiko paramiko playwrightplaywright install chromiumEdit the CLUSTER_GROUPS section at the top of each script with your CUCM Publisher IPs and AXL credentials:
CLUSTER_GROUPS = [
{
"user": "your_axl_user",
"pass": "your_axl_password",
"clusters": [
{"name": "Cluster-East", "ip": "cucm-pub-east.yourdomain.local"},
{"name": "Cluster-West", "ip": "cucm-pub-west.yourdomain.local"},
]
}
]# Phase 1: Phones
python physical_phone_device_default_extractor.py
python phone_firmware_compliance_auditor.py
# Phase 2: Gateways
python gateway_sip_trunk_ip_extractor.py
python gateway_hardware_ios_extractor.py # Opens a Tkinter GUI
python gateway_ios_compliance_auditor.pyNote: Scripts 2 and 5 (the compliance auditors) use Playwright to scrape the live Cisco Compatibility Matrix. An internet connection is required for those scripts.
| Script | Output File | Format |
|---|---|---|
physical_phone_device_default_extractor.py |
Physical_Phone_Device_Default_Discovery_Report.csv |
CSV |
phone_firmware_compliance_auditor.py |
Phone_Firmware_Compliance_Audit_Report.csv |
CSV |
gateway_sip_trunk_ip_extractor.py |
Gateway_Sip_Trunk_IP_Discovery_Report.xlsx |
Excel (multi-tab) |
gateway_hardware_ios_extractor.py |
Gateway_Hardware_IOS_Discovery_Report.csv |
CSV |
gateway_ios_compliance_auditor.py |
Gateway_IOS_Audit_Report.csv |
CSV |
- Credentials are configured inline for simplicity. For production use, consider using environment variables or a
.envfile (not committed to version control). - All CUCM connections use HTTPS with SSL verification disabled (
verify=False) to accommodate self-signed certificates common in enterprise UC environments. - The Tkinter GUI masks passwords in the display but transmits them in memory to Netmiko for SSH sessions.
This project is licensed under the MIT License. See the LICENSE file for details.