cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2465
Views
11
Helpful
3
Replies

can we search phone/DN by "external phone number mask"?

Oak Ridge
Level 1
Level 1

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"?

1 Accepted Solution

Accepted Solutions

William Bell
VIP Alumni
VIP Alumni

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)

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

View solution in original post

3 Replies 3

Chris Deren
Hall of Fame
Hall of Fame
You can run SQL query such as:

select * from devicenumplanmap where e164mask='XXXXXXXXXX'

 

where XXXXXXXXX is the mask

Chiris

William Bell
VIP Alumni
VIP Alumni

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)

HTH -Bill (b) http://ucguerrilla.com (t) @ucguerrilla

Please remember to rate helpful responses and identify

+5 Bill for providing proper query, I got lazy :-)

Chris