08-10-2004 07:39 AM - edited 03-15-2019 02:58 AM
Hi,
I'm upgrading from a 3.2 server to a clean 4.0 server. The current server started out as a pilot and has about 50 phones on it.
When the new 4.0 system is in place, it will have about 200 phones. I was hoping to avoid upgrading the existing 3.2 server, mainly to save time, and I was hoping to extract the MAC and Device Description so I can BAT in the existing phones with the new phones.
I poked around found that the Device table seems to have what I need, but it does not seem to indicate the phone type (7910, 7940, etc).
Any suggestions?
Thanks,
--Jon
08-10-2004 07:43 PM
You are right, the device table has what you need. The name field in the device table indicates the MAC address/hostname of the phone, while the tkProduct and tkModel provide more information on what type and model of device each row describes. tkClass describes the general category (ie gateway, phone, etc) of the device. The foreign key is stored in the device table, which links to another table.
When you see a table prefixed by "tk", that field is a link to a "type table". replace "tk" with "type" and look for that table in the database. For example, when you see tkProduct, look for a table called typeProduct. The value in the "tk" field links to the enum field in the type table, and you can then look up a description in the type table (ie name). The fk naming convention follows a similar pattern, except you simply drop the "fk" from the field name and look for a similar table (for example, for fkDevicePool look for a table named DevicePool, and match the value of fkDevicePool to the pkid value in the fkDevicePool field of the originating table.
Enough tech-talk: Try a query like the following:
SELECT DEVICE.name as DeviceName, DEVICE.description as DeviceDescription,
TYPEMODEL.name as DeviceModel, TYPEPRODUCT.name as DeviceProduct,
TYPECLASS.name as DeviceClass
FROM DEVICE, TYPEMODEL, TYPEPRODUCT, TYPECLASS
WHERE DEVICE.tkModel = TYPEMODEL.enum
AND DEVICE.tkProduct = TYPEPRODUCT.enum
AND DEVICE.tkClass = TYPECLASS.enum
ORDER BY DEVICE.tkClass, DEVICE.tkModel
which is taken from this thread:
You don't actually have to link the tables.. you can just filter for specific values in the tk fields once you know what values to look for in the device table.
08-12-2004 04:37 AM
Thanks, I'll give it a go.
--Jon
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