12-02-2010 11:48 PM - edited 03-16-2019 02:15 AM
Hi,
I'm working on an inventory tool to collect mac-addr, phone-dn, user-name, serial-nber, version, cdp information. That's ok.
Does anybody knows if there is a way to catch expansion modules presence and serial-number ?
Thanks for your help
Guy
12-03-2010 06:04 AM
The only way to do this reliably is to scrape the information from the HTML source on the IP phone's web pages. I developed a tool similar to the one you describe and that is how I grab DHCP, DNS, TFTP-1, TFTP-2, expansion module, firmware, S/N, etc..
HTH.
Regards,
Bill
Please remember to rate helpful responses and identify
12-03-2010 06:22 AM
Hi Bill,
Thanks but I know about theese URL's, but I do not find the extension module S/N
-
Regards
Guy
12-03-2010 08:09 AM
If you look at the "home page" for the phone you can find the expansion module's information in HTML...
<TR><TD><B> Expansion Module 1 UDIB>TD><td width=20>TD><TD><B>KEMB>TD>TR><TR><TD><B> B>TD><td width=20>TD><TD><B>Cisco Keypad Expansion Module,7915,GRAYB>TD>TR><TR><TD><B> B>TD><td width=20>TD><TD><B>CP-7915B>TD>TR><TR><TD><B> B>TD><td width=20>TD><TD><B>V1B>TD>TR><TR><TD><B> B>TD><td width=20>TD><TD><B>FCH1438ACQYB>TD>TR>
From there you will have to parse out the HTML like Bill suggested.
A question for Bill too - I think I have a similar process on grabbing the html. My process starts with grabbing all the IP addresses of all the phones in the system into a text file. To get that information I go to the device page in CUCM. From there I use a perl script read the HTML and parse out the pieces that I care about. From there the data is stored into a CSV.
The biggest hitch in the process is grabbing all the IP addresses. Can you suggest a quicker method?
TONY
12-03-2010 08:36 AM
Tony,
Right now I have two separate scripts. I have one that we use to pull device registration information from CUCM. For Windows-based systems it uses devicelistx.asp (which we have a custom file we provide to customers so our script can get "more" information). For Appliance-based systems the script uses RISport API. The script detects whether the cluster is Windows or Appliance-based, retrieves the data, and then it creates a CSV-like data file.
I then have a separate script that will retrieves phone information. This second script will parse the CSV data file, look at the device types, confirm that we have a compatible device, and then pull the HTML data from the phone. This data is then parsed and the original CSV file is rewritten with the additional data.
So, it sounds like we have similar approaches.
Regards,
Bill
Please remember to rate helpful responses and identify
12-03-2010 08:41 AM
Ha I was just catching up on my forum reading and found your other reply to "Searching IP Phone Network." ( https://supportforums.cisco.com/thread/2053964 )
Looks like I have even more reading to do.
Thanks for the help,
TONY
12-03-2010 08:24 AM
I am parsing the HTML as described by Tony. You will see the same data in your XML snippet under the child node: addOnModule. KEM is Keypad Expansion Module (?). Unfortunately, there is no serial number information for the KEM. But you can tell whether one is connected or not and you can confirm the firmware version for the KEM.
Guy, I did have a question as to what URL you are using to get the data presented in XML. My routine is parsing HTML tables, which is an obvious bear. If I can get at the XML data then I can parse the data in a much cleaner way.
HTH.
Regards,
Bill
Please remember to rate helpful responses and identify
12-03-2010 08:46 AM
The URL I use
http://ip/DeviceInformationX
http://ip/NetworkConfigurationX
http://ip/PortInformationX?1
http://ip/PortInformationX?2
Seem not to be translated by locale installer
May be some more URL ...
Nice to help you
12-03-2010 08:54 AM
Guy,
That is very helpful information indeed (+5 to you). I have found that the HTML display information is different for each generation of device. I even have one phone model that just doesn't want to cooperate. Having an XML parsing option will help.
Regards,
Bill
Please remember to rate helpful responses and identify
07-23-2013 09:05 AM
Could also try this if you’re using CUCM ver 9+
Will give you an audit/inventory of the phone's and lines configuration on the CUCM as well as the MAC and Serial of the phones .. Uses the URL's mention by Guy ... but not all phones support them
http://blog.netpacket.co.uk/2013/06/27/cucm-phone-invetory-tool/
cheers
alexis
12-03-2010 09:59 AM
I found some more links. Maybe not much for inventory information, but troubleshooting info could be useful...
http://books.google.com/books?id=7nMoJksGk10C&lpg=PA108&ots=wP-B-lAuWk&pg=PA97#v=onepage&q&f=false
Pages 107 and 108 hold the best info...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide