Friday, February 14, 2014

Programmatically Configuring Interface Descriptions from Phone Descriptions

I wrote some Python code that allows you to do the following:
  1. Query a Catalyst switch CDP neighbor table from its HTTPS interface,
  2. Extract the device names of the attached IP phones,
  3. Query Communications Manager for the IP phone device description, 
  4. Apply the device description as the switch interface description.
Obviously, this makes it much easier to see whose phone is attached to a switch port.

I hope that this example saves someone the head-banging that I incurred while trying to figure out the AXL XML/SOAP API for Communications Manager.

I haven't tested this extensively; all my testing has been on Catalyst 3560 and 3750 switches and CUCM version 8.6. Using the --auto switch to automatically configure the switch is quite slow; this is a limitation of the HTTPS interface rather than the script code. It may be faster to leave that option off and manually copy/paste the printed configuration if you're in a hurry.

Note that your switch must be configured to allow configuration via the HTTPS interface; you may need to modify your TACACS/etc. configurations accordingly.

All the relevant info is in the Github repo.


@SamWomack said...
This comment has been removed by the author.
Anna Schafer said...

We've all got at the very least 1 cellphone every, suitable? We have possibly obtained about a few or four today, and that counts offering your aged Nokia 3310 in your Mum some many years back.But now the world has modified, and from Apple to Samsung to HTC to the host of up-and-coming names, picking your upcoming best smartphone can be a challenging activity.This is wherever we enable it to be quick: we thoroughly check many hundreds of top smartphones and possess observed the 10 finest it is possible to spend your hard earned money mobile phones