12-10-2015 05:45 PM
What AXL request should I use to pull data from CUCM similar to what Device -> Gateways command generates (see below)?
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: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
12-20-2015 12:41 PM - edited 05-14-2019 12:18 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide