cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
474
Views
2
Helpful
2
Replies

CUCM SQL Query to pull RDP Name, Destination & Extension

kelvin.blair
Level 5
Level 5

All - 
I'm trying to figure out a query that I can run which will dump a list of Remote Destination Name, Destination (Cell Number) and Extension tied to the Profile.  

I was able to get create a query that gives me the RDN and Destination, but can't seem to pull in the extension that is tied to it.  I'm not sure where to pull that data from.  

Here is what I've come up with so far.

run sql select r.name, rd.destination from remotedestinationdynamic rd inner join remotedestination r on rd.fkremotedestination=r.pkid

Hopefully someone can help me pull in that last field.  

2 Replies 2

thedd
Level 1
Level 1

You can use this one:


run sql select rdp.name as remotedestinationprofile, n.dNOrPattern as line, rp.name as Partiton, r.name as remotedestination, rd.destination from remotedestinationdynamic rd
inner join remotedestination r on rd.fkremotedestination=r.pkid
inner join device as rdp on rdp.pkid = r.fkdevice_remotedestinationtemplate
inner join DeviceNumPlanMap as dmap on dmap.fkDevice=rdp.pkid
inner join NumPlan as n on n.pkid=dmap.fkNumPlan
inner join Routepartition as rp on n.fkRoutePartition = rp.pkid


thedd
Level 1
Level 1

This will give you 

remotedestinationprofile line partiton remotedestination destination
======================== ==== ======== ================= =============
RDP-XXX                        1337 DID         RD-XXX            +123456789