cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
310
Views
0
Helpful
1
Replies

Getting phone name from extension

markoller
Level 1
Level 1

I have an interesting problem. I want to be able to execute updatephone and updateline AXL requests. The only information I can work from is the current extension number. Basically I am trying to right a change service where by an administrator will get a request from a user to modify their phone/ext and the only information in the ticket is the users primary extension assigned to the first button of their phone. UpdateLine is easy as I can update the line via the pattern and route partition. However, is there a way to use the extension and query the callmanager for all devices using this particular extension. Right now I do not have to contend with shared lines but that may change.

Thanks in advance.

1 Reply 1

ckatene
Level 3
Level 3

use the AXL executeSQLQuery (Can't remember the method name exactly) to run the following query:

select a.name from device a, numplan b, devicenumplanmap c

where a.pkid = c.fkdevice

and b.pkid = c.fknumplan

and b.dnorpattern = '12345'

that will return the name of all devices that have the extension 12345. it's also possible to expand the query so you can specify the partition, or to indicate that the number must be the first line on the phone.

c