cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1337
Views
3
Helpful
1
Replies

Querying gateways with AXL

mbltone001
Level 1
Level 1

What AXL request should I use to pull data from CUCM similar to what Device -> Gateways command generates (see below)?

Screen Shot 2015-12-10 at 8.25.48 PM.png


In my application I need to query device pool names of all gateways where Device Type == 'Cisco MGCP FXO Port'

I tried listGateway request as the following AXL request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5">

   <soapenv:Header/>

   <soapenv:Body>

      <ns:listGateway sequence="?">

         <searchCriteria>

            <description>%</description>

         </searchCriteria>

         <returnedTags uuid="?">

            <domainName>?</domainName>

            <description>?</description>

            <product>?</product>

            <protocol>?</protocol>

            <callManagerGroupName uuid="?">?</callManagerGroupName>

            <scratch>?</scratch>

            <loadInformation>?</loadInformation>

         </returnedTags>

      </ns:listGateway>

   </soapenv:Body>

</soapenv:Envelope>


It looks like the product tag holds my Device Type value however device pool name is not there. Should I make additional requests per each gateway to collect device pool information? What AXL should I use for that? getGateway also doesn't include device pool in its returnedTags list. Would it be easier to use executeSQLQuery? Can anyone help with the sql query or at list point me to the table and column names?

Thank you,

--Alik

1 Reply 1

dhook
Level 5
Level 5

Hi,

 

the listGateway query does not return MGCP endpoints at all, from what I can see. I can't find any other list-request that does so either. I would go with executeSQLQuery.

 

Something like:

SELECT d.name, dp.name AS devicePoolName
FROM device d
JOIN typeproduct tp ON d.tkproduct = tp.enum
JOIN devicepool dp ON d.fkdevicepool = dp.pkid
WHERE tp.name = "Cisco MGCP FXO Port"

which returns:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:executeSQLQueryResponse xmlns:ns="http://www.cisco.com/AXL/API/10.5">
         <return>
            <row>
               <name>AALN/S0/SU0/0@myGateway</name>
               <devicepoolname>Default</devicepoolname>
            </row>
            <row>
               <name>AALN/S1/SU0/8@myGateway</name>
               <devicepoolname>myDevicePool</devicepoolname>
            </row>
            <row>
               <name>AALN/S1/SU0/12@myGateway</name>
               <devicepoolname>myDevicePool</devicepoolname>
            </row>
            <row>
               <name>AALN/S0/SU1/2@myGateway</name>
               <devicepoolname>myOtherDevicePool</devicepoolname>
            </row>
         </return>
      </ns:executeSQLQueryResponse>
   </soapenv:Body>
</soapenv:Envelope>

Kind Regards,

 

Dan