private void RunTestRISPort(CUCMAXLProfile myAXLProfile) { RISService myRISClient = new RISService(myAXLProfile.AXLHost, myAXLProfile.AXLUser, myAXLProfile.AXLPass); CmSelectionCriteria filtre = new CmSelectionCriteria { SelectBy = "Name", MaxReturnedDevices = 20, Class = DeviceClass.Phone.ToString(), Model = 255 //"Any" Model. }; //String stateInfo = null; // Execution summary //SelectCmDeviceResult result = myRISClient.SelectCmDevice(ref stateInfo, filtre); //CmNode[] nodes = result.CmNodes; }
public void SelecCmDevice() { var risClient = new RisClient(new UcClientSettings { Server = "10.10.20.1", User = "******", Password = "******" }); var result = risClient.Execute(client => { var criteria = new CmSelectionCriteria() { MaxReturnedDevices = 1000, DeviceClass = "Any", Model = 255, //refers to any device, full listing here: https://developer.cisco.com/site/sxml/documents/api-reference/risport/#ModelTable Status = "Any", NodeName = string.Empty, //null for all nodes SelectBy = CmSelectBy.Name, SelectItems = new ArrayOfSelectItem() { new SelectItem() { Item = "SIPTrunktoCUP" } }, //SelectItems = new ArrayOfSelectItem(), //blank for everything Protocol = ProtocolType.Any, DownloadStatus = DeviceDownloadStatus.Any, }; var res = client.selectCmDevice(string.Empty, criteria); return(res); }); if (result.Exception != null) { throw result.Exception; } Assert.IsTrue(result.Value.SelectCmDeviceResult.TotalDevicesFound == 1); }