cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
506
Views
4
Helpful
2
Replies
bbenner
Beginner

SQL Query for AAR Destination Mask

CUCM 8.0(3)

Does anyone have an SQL query string to retrieve the AAR Destination Mask of each DN?

Thanks,

Beau                

2 REPLIES 2
Robert Thomas
Enthusiast

I build the following query for my lab server version 7.1.5. Notice the syntax might change for newer versions

admin:run sql select aardestinationmask, dnorpattern, fkroutepartition,  aardestinationmask from numplan

aardestinationmask dnorpattern fkroutepartition                     aardestinationmask

================== =========== ==================================== ==================

NULL               7012        NULL                                 NULL

                    7012        84add69b-39d7-5886-a3e9-d66c5978fade

NULL               7013        NULL                                 NULL

NULL               207         84add69b-39d7-5886-a3e9-d66c5978fade NULL

NULL               7014        NULL                                 NULL

                    7015        NULL

                    7016        84add69b-39d7-5886-a3e9-d66c5978fade

                    4000        NULL

                    7017        NULL

                    4001        84add69b-39d7-5886-a3e9-d66c5978fade

                    5000        NULL

                    7017        84add69b-39d7-5886-a3e9-d66c5978fade

NULL               100         NULL                                 NULL

                    Line        NULL

                    Line2       NULL

NULL               XXXXXXXXX   50272a35-a2cc-2f0b-ac4e-1691aadee6e0 NULL

NULL               9!          NULL                                 NULL

                    1           NULL

                    7777        NULL

NULL               100         50272a35-a2cc-2f0b-ac4e-1691aadee6e0 NULL

NULL               40          NULL                                 NULL

NULL               7018        NULL                                 NULL

NULL               10XX        84add69b-39d7-5886-a3e9-d66c5978fade NULL

                    30001       NULL

                    7010        84add69b-39d7-5886-a3e9-d66c5978fade

                   7011        84add69b-39d7-5886-a3e9-d66c5978fade

I've tweaked that query a little bit.

Now you will also get the partition in which the DN belongs, also it will only show actual DNs.

Please modify the query on the end. Where I've put the 99% you just enter the beginning of your DNs. The % have to stay there because it's a wildcard. If you would like to see all Numbers including all routepattern, just cut of the end "where ndnorpattern like '99%'"

The tweaked query is

run sql n.aardestinationmask, n.dnorpattern, r.name from numplan as n full join routepartition as r on r.pkid = n.fkroutepartition where n.dnorpattern like '99%'

I've tested this on CUCM 8.6.2

Content for Community-Ad

Spotlight Awards 2021