Aurus Blog

This blog is to share our expertise in Cisco UCM, UCCX/UCCE and Cisco Telepresence.

  • Archive

    «   October 2017   »
    M T W T F S S
    2 3 4 5 6 7 8
    9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30 31          

Querying CUCM Database from the Command Line


Some operations on CUCM objects could be made much easier and faster through CUCM database, for example - to get a list of devices, to add several devices to the list of devices controlled by some axl-user, etc.


1. Download CURL for Windows -
2. Then any AXL-request can be executed from the command line:
curl.exe -k -u axluser:axlpass -H "Content-type: text/xml;" -H "SOAPAction: CUCM:DB ver=8.5" -d @axlreauest.xml https://ccm9.bcs-it.loc:8443/axl/


a) axluser:axlpass - login and password of the CUCM Application User
b) https://ccm9.somedomain.loc:8443/axl/ - CUCM AXL Service address
c) axlreauest.xml - the file with the request, for example:

<soapenv:Envelope xmlns:soapenv="" xmlns:ns="">
  <ns:executeSQLUpdate sequence="?">
insert into applicationuserdevicemap (description, fkdevice, fkapplicationuser, tkuserassociation)
values ('', 'f37738df-222b-473c-813f-7872709ab221', '1abf2126-3339-5946-e755-6d59f368a7a5', 1)

Queries to CUCM tables are performed with the executeSQLQuery. Modification of data (insert / delete / update) – with executeSQLUpdate.

What is CUCM DB?

It is actually Informix.

To find out the exact version of the database server you can perform this query:

<soapenv:Envelope xmlns:soapenv="" xmlns:ns="">
  <ns:executeSQLQuery sequence="?">
select DBINFO('version', 'full') from systables where tabid=1

Read more about Informix here:

The structure of the database

1. CUCM 6:
2. CUCM 7:
3. CUCM 8:
4. CUCM 9:
5. CUCM 10:

Ask Cisco about the structure of the other databases:


Here's our friend having fun on CUCM SQL quieries:

Examples of requests

Get the list of All CUCM devices
select * from device

Get the list of devices controlled by the user (returns identifiers)
select * from applicationuserdevicemap
where fkapplicationuser = 'a59e7a1c-3527-c5e4-89d8-edb3e0c10dab'

Remove a bunch of devices from the “controlled devices” list
delete from applicationuserdevicemap where fkapplicationuser = 'a59e7a1c-3527-c5e4-89d8-edb3e0c10dab'
and fkdevice in (select pkid from device where name like 'zCTIPort%' and name[9,15] > 5565400)

Add a bunch of device to the “controlled devices” list
into applicationuserdevicemap (description, fkdevice, fkapplicationuser, tkuserassociation)
select '', pkid, 'a59e7a1c-3527-c5e4-89d8-edb3e0c10dab', 1 from device where name like 'zCTIPort%' and name[9,15] > 5565402

RIS Service

To test the RIS the "/ realtimeservice / services / RisPort" path should be used in the URL instead of "/ axl".

The example of the RIS-query:


<ns1:SelectCmDevice soapenv:encodingStyle=""
  <StateInfo xsi:type="xsd:string"/>
  <CmSelectionCriteria href="#id0"/>

<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle=""

  <MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>
  <Class xsi:type="xsd:string">>Phone</Class>
  <Model xsi:type="xsd:unsignedInt">255</Model>
  <NodeName xsi:type="xsd:string" xsi:nil="true"/>
  <SelectBy xsi:type="xsd:string">Name</SelectBy>

  <SelectItems soapenc:arrayType="ns2:SelectItem[1]" xsi:type="soapenc:Array">
<item href="#id1"/>


<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle=""

  <Item xsi:type="xsd:string">test</Item>