Thanks to many of yo here i have been able to run a SQL report that shows each phone along with the primary/ first line.
SELECT DISTINCT Device.Name, Device.Description, NumPlan.DNOrPattern, DeviceNumPlanMap.Display, DeviceNumPlanMap.E164Mask,CFNAVoiceMailEnabled
FROM Device INNER JOIN
DeviceNumPlanMap ON Device.pkid = DeviceNumPlanMap.fkDevice INNER JOIN
NumPlan ON DeviceNumPlanMap.fkNumPlan = NumPlan.pkid
WHERE (DeviceNumPlanMap.NumPlanIndex = 1)
Does anyone know how i could also get the Set type and Device pool in the same query?