/* Add Phone API * Associating a line with the phone. * ( mandatory tags only used to add a phone) * ##Values in the method are hardcoded please modify accordingly to make it work### */ private static void callAddPhone(AXLAPIService axlApiService) { AddPhoneReq addPhoneReq = new AddPhoneReq(); addPhoneReq.phone = new XPhone(); addPhoneReq.phone.name = "SEP170000100002"; addPhoneReq.phone.description = "Adding Phone thru .Net Client"; addPhoneReq.phone.product = "Cisco 7960"; addPhoneReq.phone.@class = "Phone"; addPhoneReq.phone.protocol = "SCCP"; addPhoneReq.phone.protocolSide = "User"; XFkType xfktype = new XFkType(); xfktype.Value = "Default"; addPhoneReq.phone.devicePoolName = xfktype; xfktype = new XFkType(); xfktype.Value = "Standard Common Phone Profile"; addPhoneReq.phone.commonPhoneConfigName = xfktype; xfktype = new XFkType(); xfktype.Value = "Hub_None"; addPhoneReq.phone.locationName = xfktype; addPhoneReq.phone.useTrustedRelayPoint = "Default"; addPhoneReq.phone.lines = new XPhoneLines(); addPhoneReq.phone.lines.Items = new XPhoneLine[1]; XPhoneLine line = new XPhoneLine(); line.index = "5"; line.display = "Line1"; //existing directory number line.dirn = new XDirn(); line.dirn.pattern = "11233"; xfktype = new XFkType(); xfktype.Value = "AXL-RP"; line.dirn.routePartitionName = xfktype; addPhoneReq.phone.lines.Items.SetValue(line, 0); StandardResponse res2 = axlApiService.addPhone(addPhoneReq); Console.WriteLine("end of the addPhoneReq" + res2.@return); }
/*To modify CSS and update line * * ##Values in the method are hardcoded please modify accordingly to make it work### */ private static void callUpdatePhoneToModifyCSS(AXLAPIService axlApiService) { UpdatePhoneReq request = new UpdatePhoneReq(); request.ItemElementName = ItemChoiceType32.name; request.Item = "SEP100000100003"; XFkType xfkType = new XFkType(); xfkType.Value = "AXL-CSS0"; request.callingSearchSpaceName = xfkType; request.lines = new UpdatePhoneReqLines(); request.lines.Items = new XPhoneLine[1]; XPhoneLine line = new XPhoneLine(); line.index = "2"; line.display = "Line32"; //existing directory number line.dirn = new XDirn(); line.dirn.pattern = "10002"; xfkType = new XFkType(); xfkType.Value = "AXL-RP"; line.dirn.routePartitionName = xfkType; request.lines.Items.SetValue(line, 0); xfkType = new XFkType(); xfkType.Value = "Standard 7960 SCCP"; request.phoneTemplateName = xfkType; xfkType = new XFkType(); xfkType.Value = "Cisco 7960 - Standard SCCP Non-Secure Profile"; request.securityProfileName = xfkType; xfkType = new XFkType(); xfkType.Value = "Default"; request.devicePoolName = xfkType; StandardResponse response = axlApiService.updatePhone(request); Console.WriteLine("Successfully executed AXL Update Phone using UpdatePhoneReq" + response.@return); }