Skip to content

Create IOS interface descriptions based on CDP & CUCM phone descriptions

Notifications You must be signed in to change notification settings

jayswan/cdp_cucm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Phone-Based Interface Descriptions

These scripts show an example of the following:

  1. How to interact with the HTTPS interface on Cisco switches.
  2. How to interact with the AXL/SOAP/XML API on Cisco Unified Communications Manager.

The only external module required is requests.

cdp_cucm.py

This script queries a Cisco switch for its CDP neighbor table and extracts the device names of the attached IP phones. Currently, the script will quit if it finds unregistered phones. If you want it to ignore unregistered phones, change the code so that it ignores regex match failures on the XML response.

It then uses the companion module cucm_query.py to query the CUCM database via its XML SOAP API for the descriptions of those phones.

Finally, it either:

a) interactively prints an interface configuration for the switch that uses the description field as an interface description (suitable for copy and paste), or

b) configures the switch with those interface descriptions via the switch HTTPS interface.

Thus, if a phone's description in the CUCM database is "Alice's Phone", the new interface configuration would be:

interface {type/number}
  description Alice's Phone

You need to set up your switch to allow configuration via the HTTPS interface, through whatever authentication mechanism your switch uses (TACACS+, etc.).

This has been tested only on reasonably recent versions of IOS for Catalyst 3560/3750 switches and CUCM 8.6.

About

Create IOS interface descriptions based on CDP & CUCM phone descriptions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages