cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8104
Views
15
Helpful
10
Replies

IP phone inventory tool

guy.richard
Level 1
Level 1

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

10 Replies 10

William Bell
VIP Alumni
VIP Alumni

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

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

Hi Bill,

Thanks but I know about theese URL's, but I do not find the extension module S/N

 
-
  FCFBFBCBA57C
  SEPFCFBFBCBA57C
  8482427
  jar42sccp.8-5-3TH1-6.sbn
  tnp62.8-3-1-21a.bin
  SCCP42.8-5-3S
  B015-1-0-4
 
  11.0
  FCH1410AQUY
  CP-7962G
  Non
  phone Cisco Unified IP Phone 7962G, Global CP-7962G V06 FCH1410AQUY
  KEM
 
  Romance Standard/Daylight Time
  03-12-10
  7483392
  2517400
  228536
 

Regards

Guy

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

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

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

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

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

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

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

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

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

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

http://www.netpacket.co.uk/ http://www.blog.netpacket.co.uk/

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...