RIS problem - how to retrieve unregistered phones ?

Version 1
    This document was generated from CDN thread

    Created by: MICHAEL KUNZ on 09-07-2008 02:24:21 AM
    It seems that RIS in CUCM 6.1.2000.3 always returns registered devices - a search for "Any" or "UnRegistered" does only return registered devices. Is this a bug or am I doing something wroong ?

    VB Code
    Dim sel As New RIS.CmSelectionCriteria
    sel.Class = "Any"
    sel.NodeName = "" ' search fo all CCM
    sel.SelectBy = "Name"
    sel.Status = "Any" <--- indepedant of this setting - returns only registered devices
    <defining the name in the search>
    ' Do the request
    res = req.SelectCmDevice(stateInfo, sel)

    Output of SOAP MONITOR of this request
    <tns:CmSelectionCriteria id="id1" xsi:type="tns:CmSelectionCriteria">
    <MaxReturnedDevices xsi:type="xsd:unsignedInt">1000</MaxReturnedDevices>
    <Class xsi:type="xsd:string">Any</Class>
    <Model xsi:nil="true"/>
    <Status xsi:type="xsd:string">Any</Status>

    Only registered devices/phones are returned. It returns the same as setting Registered in the Status field

    Has anyone else seen this before ? Has been able to retrieve unregistered devices ?

    Subject: Re: RIS problem - how to retrieve unregistered phones ?
    Replied by: David Staudt on 09-07-2008 05:40:28 AM
    I was not able to reproduce the problem, on CUCM 6.0(1). I used a request below:

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soap:SelectCmDevice soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <CmSelectionCriteria xsi:type="soap:CmSelectionCriteria">
    <MaxReturnedDevices xsi:type="xsd:unsignedInt">1000</MaxReturnedDevices>
    <Status xsi:type="xsd:string">Unregistered</Status>
    <SelectBy xsi:type="xsd:string">Name</SelectBy>

    Which returned expected results for <Status> values of Any, Registered and Unregistered.

    Note the <SelectBy> element must be present with with either 'Name' or 'IP Address' for the request to work, regardless of whether a SelectItems array is provided.

    Note also there is a limit of 200 devices the service will return at a time (1000 as specified will be truncated.)

    Further note, only phones which have registered since the RIS service started and then unregistered can show up as unregistered via Risport. If the phone has never registered since RIS started, I believe there will be no entry. If you need a comprehensive list of all phones configured, you will need to look at the AXL Configuration API.

    Tricky part about Risport, is that devices can register to multiple nodes, so if you issue a request such as the one here - not specifying any NodeName - you could potentially see the same device listed multiple times under separate Nodes. Only one instance can be Registered, but there could be several Unregistered instances if the device has registered to several nodes in succession.