From Cli we can query CUCM Database directly. I would like to give a brief idea about the query which I use to pull extension and their calling search space from CUCM CLI.
Queries are formed with the data in below tables
- NumPlan – This table contains information about all patterns configured in CUCM.
- CallingSearchSpace: This table contains information about list of CSS configurations on the system
CUCM Data Dictionary
You can learn more about tables from CUCM Data Dictionary for respective versions. Latest version Data Dictionary is now available in developer.cisco.com. o make things easier ti have mentioned the link below.
List the Dn, Alerting Name and the CSS.
Here is a query that is designed to list all the dn, alerting name their calling search space.
run sql select dnorpattern,alertingname,name from numplan n, callingsearchspace c where n.fkcallingsearchspace_sharedlineappear = c.pkid