Tuesday, May 29, 2012

Inventory serial numbers of Cisco phones on your network

So you're looking to document the serial numbers of phone devices on your network and decide to utilize the Cisco IP Phone Inventory Tool available at http://sourceforge.net/projects/cipinventory/ to scrape your phone screens.  It seems fast and stable, but the current version 0.11 really requires an accurate list of IP addresses associated with phones to work efficiently.

You can decide to scan entire subnets in hopes of discovering phones, but this must be done slowly, multiple times and can still prove to be unreliable. Again, you really need an accurate list of IPs to make this script work well.

You can copy device information screens from the CUCM admin interface to create a list of registered IPs, but this requires lots of text file, Excel, csv, etc. manipulation and I suspect there are bugs in some versions of the GUI.

You can grab MAC addresses and / or IPs from important routers or switches CDP / MAC / ARP tables, but this assumes you have access to the devices, active hosts in arp tables, and more text file, Excel, csv, etc. manipulation.

All these techniques have completeness and accuracy issues, as far as I'm concerned.

Let's just let CUCM tell you what it thinks.

On each server CLI in your cluster, run "show risdb query phone". A snippet of fictitious output is below:

admin:show risdb query phone

----------- Phone Information -----------

#TotalPhones, #TotalRegistered, #RegisteredSCCP, #RegisteredSIP, #UnRegistered, #Rejected, #PartiallyRegistered, StateId
11, 10, 10, 0, 1, 0, 0, 92259

DeviceName, Descr, Ipaddr, Ipv6addr, Ipv4Attr, Ipv6Attr, MACaddr, RegStatus, PhoneProtocol, DeviceModel, HTTPsupport, #regAttempts, prodId, username, seq#, RegStatusChg TimeStamp, IpAddrType, LoadId, ActiveLoadId, InactiveLoadId, ReqLoadId, DnldServer, DnldStatus, DnldFailReason, LastActTimeStamp
SEP001122334455, My Phone 2, 10.10.1.18, 3, 0, 3037A61720E1, reg, SCCP, 404, yes, 0, 303, NoUserId, 5367, 1328102686, 1, SCCP42.8-5-4S, SCCP42.8-5-4S, 0, 1328102686

Basically , you get a comma seperated table with a couple important columns for our purpose. You will get the IP address of the phone in the Ipaddr column and use it to populate the Cisco IP Phone Inventory Tool inputfile , and the registration status in the RegStatus column so you can eliminate scanning unregistered and unknown devices.

If you want to scan for a particular device type, you can decipher the DeviceModel column by running a bit more SQL shown below. This will provide you with a human readable phone type name associated with the DeviceModel number.

admin:
admin:run sql select enum,name from typemodel
===== =================================================
20 SCCP Phone
30 Analog Access
40 Digital Access
42 Digital Access+
43 Digital Access WS-X6608
47 Analog Access WS-X6624
50 Conference Bridge
51 Conference Bridge WS-X6608
61 H.323 Phone
62 H.323 Gateway
70 Music On Hold
71 Device Pilot
72 CTI Port
73 CTI Route Point
80 Voice Mail Port
90 Route List
100 Load Simulator
110 Media Termination Point
111 Media Termination Point Hardware
120 MGCP Station
121 MGCP Trunk
122 GateKeeper
125 Trunk
126 Tone Announcement Player
254 Unknown MGCP Gateway
255 Unknown
52 Cisco IOS Conference Bridge (HDV2)
53 Cisco Conference Bridge (WS-SVC-CMM)
83 Cisco IOS Software Media Termination Point (HDV2)
84 Cisco Media Server (WS-SVC-CMM-MS)
112 Cisco IOS Media Termination Point (HDV2)
113 Cisco Media Termination Point (WS-SVC-CMM)
131 SIP Trunk
132 SIP Gateway
133 WSM Trunk
134 Remote Destination Profile
85 Cisco Video Conference Bridge (IPVC-35xx)
30027 Analog Phone
30028 ISDN BRI Phone
2 Cisco 12 SP+
3 Cisco 12 SP
4 Cisco 12 S
1 Cisco 30 SP+
5 Cisco 30 VIP
9 Cisco 7935
6 Cisco 7910
7 Cisco 7960
8 Cisco 7940
10 Cisco VGC Phone
11 Cisco VGC Virtual Phone
48 VGC Gateway
12 Cisco ATA 186
124 7914 14-Button Line Expansion Module
336 Third-party SIP Device (Basic)
374 Third-party SIP Device (Advanced)
115 Cisco 7941
119 Cisco 7971
20000 Cisco 7905
302 Cisco 7985
307 Cisco 7911
308 Cisco 7961G-GE
309 Cisco 7941G-GE
335 Motorola CN622
348 Cisco 7931
358 Cisco Unified Personal Communicator
365 Cisco 7921
369 Cisco 7906
375 Cisco TelePresence
30002 Cisco 7920
30006 Cisco 7970
30007 Cisco 7912
30008 Cisco 7902
30016 Cisco IP Communicator
30018 Cisco 7961
30019 Cisco 7936
30032 SCCP gateway virtual phone
30035 IP-STE
404 Cisco 7962
412 Cisco 3951
431 Cisco 7937
434 Cisco 7942
435 Cisco 7945
436 Cisco 7965
437 Cisco 7975
446 Cisco 3911
521 Transnova S3
468 Cisco Unified Mobile Communicator
227 7915 12-Button Line Expansion Module
497 Cisco 6961
480 Cisco TelePresence 3200
496 Cisco 6941
493 Cisco 9971
479 Cisco TelePresence 3000
540 Cisco 8961
505 Cisco TelePresence 1300
229 7916 12-Button Line Expansion Module
495 Cisco 6921
520 Cisco TelePresence 1100
232 CKEM 36-Button Line Expansion Module
503 Cisco Unified Client Services Framework
484 Cisco 7925
537 Cisco 9951
481 Cisco TelePresence 500
228 7915 24-Button Line Expansion Module
230 7916 24-Button Line Expansion Module
478 Cisco TelePresence 1000
admin:

And just an FYI, the output above is a CUCM7 sample and may not include all types available to you via new device paks, COP files and software versions.

Friday, May 25, 2012

Convert WAV to 8 bit, 8 KHz u-Law format

So you have a wonderful new recording you would like to upload to Cisco UCCX (or IPCC, Unity Connection, Unity Express, or whatever) and know that it needs to be in a 8bit, 8KHz, u-Law format.

How do you convert it?

In Windows XP, the Sound Recorder application would allow you to simply change the format by opening it, choosing to save it and then selecting Change in the dialog box. The correct format there is Format: CCITT u-Law and Attributes: 8.000 khz, 8 Bit, Mono.


Now that Microsoft has apparently sucked the life out of Sound Recorder in Windows 7, my next preference is using Audacity.

Edited 7/15/2013: You can find my new post regarding using using the old XP version of Sound Recorder on Windows 7 here: http://webmaxtor.blogspot.com/2013/07/convert-wav-to-8-bit-8-khz-u-law-format.html

The problem now is it's not very clear how to choose the same options.

In Audacity with your file open, confirm the project rate is 8000 (shown in lower left corner of progress bar).

Then, choose Edit | Preferences | File Formats.

In the Uncompressed Export Format, choose Other...

Then, in Header, choose WAV (Microsoft) and in Encoding, choose U-Law.

Then, choose File | Export as WAV and simply name it appropriately.

TaDa.