I would like to be able to pull the MAC address for an associated phone device based on the either the a phone number lookup or user lookup. I've tried searching thru the Data Dictionary for the "MAC Address" but could not find the appropriate table with the required information. Does anyone know what table has this data?
sample code:
$SQLstr.sql = "select first 10 device.ctiid, device.versionstamp, device.isactive, device.fkenduser, device.name, device.description, device.datetimeinserted, enduser.title, enduser.telephonenumber, enduser.status,
enduser.ocsprimaryuseraddress, enduser.discoveryuseridentity,
enduser.directoryuri, enduser.department, enduser.firstname, enduser.lastname, enduser.assocpc,
enduser.homephone, enduser.mailid, enduser.building, enduser.mobile, enduser.primarynodeid, enduser.site, enduser.nickname
from device, enduser, enduserdevicemap
where device.pkid=enduserdevicemap.fkdevice and
enduser.pkid=enduserdevicemap.fkenduser and enduser.discoveryuseridentity='mkellen@ad.sjm.com'"
The simplest way is to look up the phone name, if you're using phone names that are listed as SEP plus the MAC address. Just strip off the SEP and what's left is the MAC address. If you're not using SEP+MAC names, let me know.
There is no MAC address in the DB, that's why. Most hardware phones (as described by Nicholas) have the MAC in their device name, however softphones don't.
- CIPC can use a laptop MAC, but this may not be the the actual MAC used at the network level (e.g. if it switched from w/less to wired)
- Jabber etc typically use freeform text names
- Etc.
So if you really need the MAC, you'll have to get it elsewhere. If you just need an ID, use the dev name...
Thanks for the information. This has been very helpful.
Comments
0 comments
Please sign in to leave a comment.