cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1143
Views
0
Helpful
3
Replies

Multiple response against a same device using SelectCMDevice

imali
Cisco Employee
Cisco Employee

Hi,

When we send a SelectCMDevice Query I am getting multiple response, one with registered and the other with unregistered item. I want to understand if this is an expected behaviour from the API and under which scenarios we should expect multiple response.

In the CUCM database we have got two devices with the same DN (one of the device is a Jabber device which is un-registered)

Environment: CUCM; 11.5.1.12011(1)

Application Platform: Windows 2012 R2

Request

==========

<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></soap:NodeName>

        <soap:SelectBy>DirNumber</soap:SelectBy>

        <soap:SelectItems>

          <soap:item>

            <soap:Item>2101133</soap:Item>

          </soap:item>

        </soap:SelectItems>

      </soap:CmSelectionCriteria>

    </soap:selectCmDevice>

  </soapenv:Body>

I am getting following response

Response

==========

<return>

  <row>

    <Name>SEP0057D2C02F87</Name>

    <IpAddress>192.168.121.30</IpAddress>

    <DirNumber>2101133-UnRegistered</DirNumber>

    <DeviceClass>Phone</DeviceClass>

    <Model>36224</Model>

    <Product>36677</Product>

    <BoxProduct>0</BoxProduct>

    <Httpd>Yes</Httpd>

    <RegistrationAttempts>0</RegistrationAttempts>

    <IsCtiControllable>true</IsCtiControllable>

    <LoginUserId>ldapuser20@h0002.com</LoginUserId>

    <Status>UnRegistered</Status>

    <StatusReason>28</StatusReason>

    <PerfMonObject>2</PerfMonObject>

    <DChannel>0</DChannel>

    <Description>2101133 - Tesla</Description>

    <H323Trunk></H323Trunk>

    <TimeStamp>1479239664</TimeStamp>

  </row>

  <row>

    <Name>SEP0057D2C02F87</Name>

    <IpAddress>192.168.121.30</IpAddress>

    <DirNumber>2101133-Registered</DirNumber>

    <DeviceClass>Phone</DeviceClass>

    <Model>36224</Model>

    <Product>36677</Product>

    <BoxProduct>0</BoxProduct>

    <Httpd>Yes</Httpd>

    <RegistrationAttempts>0</RegistrationAttempts>

    <IsCtiControllable>true</IsCtiControllable>

    <LoginUserId>ldapuser20@h0002.com</LoginUserId>

    <Status>Registered</Status>

    <StatusReason>0</StatusReason>

    <PerfMonObject>2</PerfMonObject>

    <DChannel>0</DChannel>

    <Description>2101133 - Tesla</Description>

    <H323Trunk></H323Trunk>

    <TimeStamp>1479239664</TimeStamp>

  </row>

</return>

Thanks,

Imran

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

This is the expected behaviour:

A single device may appear in multiple elements if the device has registered to multiple nodes

from:

https://developer.cisco.com/site/sxml/documents/api-reference/risport/#risport70-selectcmdevice

You may want to see 'selectCmDeviceExt', which returns only the latest record:

https://developer.cisco.com/site/sxml/documents/api-reference/risport/#risport70-selectcmdeviceext

imali
Cisco Employee
Cisco Employee

Hi dstaudt

When I change the request name to "SelectCMDeviceExt" it comes back with BLANK response however when I change it back to its original value it works fine. Is there something else I would need to do.

Regards,

Imran

dstaudt
Cisco Employee
Cisco Employee

Can you explain what you mean by 'blank' response?  Is this a correct response with not apparent return data, or something else..?  Could you post the full request/response?  Ideally including all HTTP headers...

May also need to check that the needed RIS services are enabled on all CUCM nodes.  It would be interesting to see if the result of the query was different if you query different nodes.