cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1309
Views
10
Helpful
1
Replies

AXL SQL Query user-extension- line group-hunt group mapping

cevliyaoglu
Level 1
Level 1

Hi all

I want to take an export  about user-extension- line group-hunt group mapping

Can somebody help me about it   I have CUCM 9.1

1 Reply 1

Gordon Ross
Level 9
Level 9

There's a lot of table joins in that full mapping! I'll break it down into steps. When you say extension you need to bear in mind that a number and a device are two different things, and a user is associated to these things separately. I'll break it down into chunks.

 

User to Device:

SELECT enduser.userid, device.description FROM enduser, device, enduserdevicemap WHERE enduser.pkid = enduserdevicemap.fkenduser AND enduserdevicemap.fkdevice = device.pkid AND enduser.userid='FOO'

 

User to Directory Number:

SELECT enduser.userid, numplan.dnorpattern FROM enduser, numplan, endusernumplanmap WHERE enduser.pkid = endusernumplanmap.fkenduser AND endusernumplanmap.fknumplan = numplan.pkid AND enduser.userid='FOO'

 

Number to Hunt List:

SELECT numplan.dnorpattern, device.name FROM numplan, device, devicenumplanmap, typeproduct WHERE numplan.pkid = devicenumplanmap.fknumplan AND  devicenumplanmap.fkdevice = device.pkid AND device.tkproduct = typeproduct.enum AND typeproduct.name = "Hunt List" AND numplan.dnorpattern='FOO'

 

Hunt List to Line Group

SELECT device.name, linegroup.name FROM device, routelist, linegroup WHERE device.pkid = routelist.fkdevice AND routelist.fklinegroup = linegroup.pkid AND device.name="FOO"

 

Line Group to Directory Number

 

SELECT linegroup.name, numplan.dnorpattern FROM linegroup, linegroupnumplanmap, numplan WHERE linegroup.pkid = linegroupnumplanmap.fklinegroup AND linegroupnumplanmap.fknumplan = numplan.pkid AND linegroup.name="FOO"

 

All of this (and more!) is fully documented in the CUCM Database Data Dictionary.

 

GTG

 

Please rate helpful posts.

Please rate all helpful posts.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: