09-30-2013 01:55 PM - edited 03-16-2019 07:37 PM
Somebody wrongly configured the same number as "external phone number mask" in multiple phones. We don't want to lookup them by viewing each of the DN. What is the best way to search phone/DN by "external phone number mask"?
Solved! Go to Solution.
09-30-2013 03:34 PM
As Chris noted, the devicenumplanmap table stores the value for the e164mask. If you want to see a list of DNs alongside the mask then you may want to use a more robust query, such as:
select d.name,n.dnorpattern, dmap.numplanindex, dmap.e164mask
from device d
inner join devicenumplanmap dmap on dmap.fkdevice = d.pkid
inner join numplan n on dmap.fknumplan=n.pkid
where dmap.e164mask='
' order by d.name, dmap.numplanindex
The above query will give you a list of devices and then show DNs assigned to those devices. The dmap.numplanindex field corresponds to button position on the phone station.
HTH.
-Bill (@ucguerrilla)
Please remember to rate helpful responses and identify
09-30-2013 02:28 PM
You can run SQL query such as:
select * from devicenumplanmap where e164mask='XXXXXXXXXX'
where XXXXXXXXX is the mask
Chiris
09-30-2013 03:34 PM
As Chris noted, the devicenumplanmap table stores the value for the e164mask. If you want to see a list of DNs alongside the mask then you may want to use a more robust query, such as:
select d.name,n.dnorpattern, dmap.numplanindex, dmap.e164mask
from device d
inner join devicenumplanmap dmap on dmap.fkdevice = d.pkid
inner join numplan n on dmap.fknumplan=n.pkid
where dmap.e164mask='
' order by d.name, dmap.numplanindex
The above query will give you a list of devices and then show DNs assigned to those devices. The dmap.numplanindex field corresponds to button position on the phone station.
HTH.
-Bill (@ucguerrilla)
Please remember to rate helpful responses and identify
09-30-2013 03:37 PM
+5 Bill for providing proper query, I got lazy :-)
Chris
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