11-21-2016 03:11 AM
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
11-21-2016 10:42 AM
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
11-22-2016 08:50 AM
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
11-22-2016 12:23 PM
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.
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