cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1151
Views
0
Helpful
4
Replies

My AXL request doesn't retrieve all phones

maximeleroux
Level 1
Level 1

Hi,

I send XML request to CUCM in order to retrieve all phones.

Customer cisco architecture is composed to 10 clusters.

  • 10.10.10.1 publisher
  • 10.10.10.2
  • 10.10.10.3
  • 10.10.10.4
  • 10.10.10.5
  • 10.10.50.1
  • 10.10.50.2
  • 10.10.50.3
  • 10.10.50.4
  • 10.10.50.5

On each cluster, the customer has provisionned phones.

I don't why but I retrieve all phones from 10.10.10.2-4 but  no phones from 10.10.10.5 and 10.10.50.1-5

All clusters are in network. We don't know why we don't have the same behavior on all clusters

Have you got any idea?

My request

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:SelectCmDevice xmlns:ns1="http://schemas.cisco.com/ast/soap/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><StateInfo xsi:type="xsd:string"/><CmSelectionCriteria href="#id0"/></ns1:SelectCmDevice><multiRef id="id0" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://schemas.cisco.com/ast/soap/" xsi:type="ns2:CmSelectionCriteria" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><MaxReturnedDevices xsi:type="xsd:unsignedInt">10000</MaxReturnedDevices><Class xsi:type="xsd:string">Phone</Class><SelectBy xsi:type="xsd:string">Name</SelectBy><SelectItems soapenc:arrayType="ns2:SelectItem[1]" xsi:type="soapenc:Array"><item href="#id1"/></SelectItems></multiRef><multiRef id="id1" xmlns:ns3="http://schemas.cisco.com/ast/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:SelectItem"><Item xsi:type="xsd:string">*</Item></multiRef></soapenv:Body></soapenv:Envelope>

<item xsi:type="ns1:CmNode"> <ReturnCode xsi:type="ns1:RisReturnCode">Ok</ReturnCode> <Name xsi:type="xsd:string">10.10.50.2</Name> <NoChange xsi:type="xsd:boolean">false</NoChange> <CmDevices soapenc:arrayType="ns1:CmDevice[0]" xsi:type="soapenc:Array"/> </item>

0 phones


<item xsi:type="ns1:CmNode">

  <ReturnCode xsi:type="ns1:RisReturnCode">Ok</ReturnCode>

  <Name xsi:type="xsd:string">10.10.10.5</Name>

  <NoChange xsi:type="xsd:boolean">false</NoChange>

  <CmDevices soapenc:arrayType="ns1:CmDevice[0]" xsi:type="soapenc:Array"/>

  </item>

0 phones

<item xsi:type="ns1:CmNode">

  <ReturnCode xsi:type="ns1:RisReturnCode">Ok</ReturnCode>

  <Name xsi:type="xsd:string">10.10.10.2</Name>

  <NoChange xsi:type="xsd:boolean">false</NoChange>

  <CmDevices soapenc:arrayType="ns1:CmDevice[505]" xsi:type="soapenc:Array">

505 phones


4 Replies 4

npetrele
Cisco Employee
Cisco Employee

Have you tried SelectCmDeviceExt instead of SelectCmDevice?

From the docs:

The difference is in functionality. SelectCmDeviceExt collates device status records across nodes, eliminating any duplicates.

This API returns a snapshot of the real-time device state from each Cisco Unified CM node. This data includes registration status, IP address, and model info. This request consolidates device records across nodes, returning only the device info for the latest registration.

Note: SelectCMDeviceExt does not support using the “*” wildcard for SelectItems matching.

Or is that not the result you're looking for?

npetrele
Cisco Employee
Cisco Employee

One more thing, I don't get your item href="#id1" as the SelectItems for the name. Here's a sample selectCmDevice that fetches all the devices on a node.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">

   <soapenv:Header/>

   <soapenv:Body>

      <soap:selectCmDevice>

         <soap:StateInfo></soap:StateInfo>

         <soap:CmSelectionCriteria>

            <soap:MaxReturnedDevices>200</soap:MaxReturnedDevices>

            <soap:DeviceClass>Any</soap:DeviceClass>

            <soap:Model>255</soap:Model>

            <soap:Status>Any</soap:Status>

            <soap:NodeName>your nodename here</soap:NodeName>

            <soap:SelectBy>Name</soap:SelectBy>

            <soap:SelectItems>

               <soap:item>

                  <soap:Item>*</soap:Item>

               </soap:item>

            </soap:SelectItems>

            <soap:Protocol>Any</soap:Protocol>

            <soap:DownloadStatus>Any</soap:DownloadStatus>

         </soap:CmSelectionCriteria>

      </soap:selectCmDevice>

   </soapenv:Body>

</soapenv:Envelope>

Thank you for your reply

We update our request and we have the same result.

We don't retrieve phones from some clusters.

Our request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">

       <soapenv:Header/>

       <soapenv:Body>

          <soap:selectCmDeviceExt>

             <soap:StateInfo></soap:StateInfo>

             <soap:CmSelectionCriteria>

                <soap:MaxReturnedDevices>1000000</soap:MaxReturnedDevices>

                <soap:DeviceClass>Phone</soap:DeviceClass>

                <soap:Model>255</soap:Model>

                <soap:Status>Any</soap:Status>

                <soap:NodeName></soap:NodeName>

                <soap:SelectBy>Name</soap:SelectBy>

                <soap:SelectItems>

                   <soap:item>

                      <soap:Item></soap:Item>

                   </soap:item>

                </soap:SelectItems>

                <soap:Protocol>Any</soap:Protocol>

                <soap:DownloadStatus>Any</soap:DownloadStatus>

             </soap:CmSelectionCriteria>

          </soap:selectCmDeviceExt>

       </soapenv:Body>

    </soapenv:Envelope>

But when we specify a cluster we retrieve well phones from the cluster

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap">

       <soapenv:Header/>

       <soapenv:Body>

          <soap:selectCmDeviceExt>

             <soap:StateInfo></soap:StateInfo>

             <soap:CmSelectionCriteria>

                <soap:MaxReturnedDevices>1000000</soap:MaxReturnedDevices>

                <soap:DeviceClass>Phone</soap:DeviceClass>

                <soap:Model>255</soap:Model>

                <soap:Status>Any</soap:Status>

                <soap:NodeName>10.10.10.5</soap:NodeName>

                <soap:SelectBy>Name</soap:SelectBy>

                <soap:SelectItems>

                   <soap:item>

                      <soap:Item></soap:Item>

                   </soap:item>

                </soap:SelectItems>

                <soap:Protocol>Any</soap:Protocol>

                <soap:DownloadStatus>Any</soap:DownloadStatus>

             </soap:CmSelectionCriteria>

          </soap:selectCmDeviceExt>

       </soapenv:Body>

    </soapenv:Envelope>

We want to retrieve all phone from all clusters. We don't see our mistake?

Is it possible to specify on each cluster on the CUCM if it's authorized to share provisionned phones?

Best regards

Just to get the nomenclature correct, I believe you are talking about a single cluster of CUCM nodes..?

Is it possible that there are differences between the nodes as far as which services are running, i.e. possibly ones which affect the Risport service?

https://developer.cisco.com/site/sxml/learn/getting-started/risport/

It would be interesting to compare the activated/running services between all nodes

Is it possible that there are in fact no devices registered to the nodes returning zeros?  I.e. these may be secondary/backup nodes which are not currently supporting any registered devices.  Can you confirm independently (i.e. using RTMT) that there are registered devices on those nodes..?

If there are issues with activating/running services on nodes or with the info coming from RTMT, I would recommend the customer open a case with Cisco TAC to investigate.

If all of the above checks out and there still seems to be a discrepancy just with the Risport API, I would suggest opening a DevNet Developer Support case so we can take a look at some logs and troubleshoot in detail:

https://developer.cisco.com/site/devnet/support/

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: