شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة ش.ش.و.

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Ims

Public general use code classes and xml files that we've compiled and used over the years:

Optical Fiber Network's Operations Support System Management Intranet (OFN OSS) client support class for Huawei's Optical Fiber Network (OFN) client model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.IO;
   4:  using System.Net;
   5:  using System.Xml;
   6:   
   7:  namespace Ia.Ngn.Cl.Model.Client.Huawei
   8:  {
   9:      ////////////////////////////////////////////////////////////////////////////
  10:   
  11:      /// <summary publish="true">
  12:      /// Optical Fiber Network's Operations Support System Management Intranet (OFN OSS) client support class for Huawei's Optical Fiber Network (OFN) client model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2014-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  17:      ///
  18:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  19:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  20:      ///
  21:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  22:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  23:      /// 
  24:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  25:      /// 
  26:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  27:      /// </remarks> 
  28:      public class Ims
  29:      {
  30:          ////////////////////////////////////////////////////////////////////////////
  31:   
  32:          /// <summary>
  33:          ///
  34:          /// </summary>
  35:          public enum ResultCode
  36:          {
  37:              OperationSucceeded = 0,
  38:              AtsSystemInternalError = 1,
  39:              TheSubscriberIsNotDefinedInTheHssOrAtsOrServiceDataIsNotConfiguredForTheSubscriber = 101,
  40:              Failed = 100000, // by me
  41:   
  42:              TheUserAlreadyExists = 1000,
  43:              NoServiceData = 15000,
  44:   
  45:              TechssTheValueIsInvalid = 900001007,
  46:              TechssTHeImpuDoesNotBelongToTheIrs = 900003053,
  47:   
  48:              #region Result Code Description
  49:              /*
  50:          Result Code Description
  51:  
  52:  List of result code:
  53:  Result Code Description
  54:   
  55:  0 Operation succeeded. 
  56:  1 ATS system internal error. 
  57:  2 Internal error. 
  58:  3 Command execution timeout. 
  59:  4 The service cannot be activated or deactivated repeatedly. 
  60:  5 The operation is restricted by operator determined barring. 
  61:  100 Unknown user, maybe the user does not exist. 
  62:  101 The subscriber is not defined in the HSS or ATS,or service data is not configured for the subscriber. 
  63:  102 Data cannot be modified. 
  64:  103 The sequence number of transparent data is incorrect. 
  65:  104 Unknown error from HSS. 
  66:  105 HSS message parameters are not found. 
  67:  106 The buffer size is too small. 
  68:  107 No memory resource of ATS. 
  69:  108 No data buffer resource. 
  70:  109 Parameter value is out of range. 
  71:  110 No basic data. Please run ADD SBR to configure the basic data first. 
  72:  111 Unknown data from HSS. 
  73:  112 Unknown command. 
  74:  113 Invalid URI format or call prefix not configured. 
  75:  114 Users with the call forwarding service cannot forward calls to users in the ImplicitIdentitys list. 
  76:  115 Users with the call forwarding service cannot forward calls to themselves. 
  77:  116 No user data. 
  78:  117 No service right. 
  79:  118 The UDA message includes unexpected data. 
  80:  119 Users with the call forwarding service cannot forward calls to the restricted numbers. 
  81:  121 The Centrex group number or Centrex user group number cannot be set for a non-Centrex subscriber. 
  82:  122 Time conflict. 
  83:  123 The end time is earlier than the start time. 
  84:  124 Invalid parameter: Dial profile. 
  85:  125 Invalid parameter: Profile name. 
  86:  126 The service is not registered. 
  87:  127 Parameter conflict. 
  88:  128 The data to be registered conflicts with the existing record. 
  89:  129 The subscriber has registered this service. 
  90:  130 Deleting the MUPT service data fails. 
  91:  131 The value of the Name parameter contains illegal characters: " . 
  92:  133 The PBX subscriber is not allowed to config the call waiting(CW) service. 
  93:  134 The physical IMPU and the subscriber number must be in the same alias group. 
  94:  135 The alias group must contain on SIP IMPU and two TEL IMPU at least. 
  95:  136 The physical IMPU must be in Tel URI format. 
  96:  137 The subscriber data is incomplete. Please remove the subscriber and then add the subscriber again. 
  97:  300 The format of the data to be updated to the HSS is incorrect. 
  98:  301 The data on the HSS cannot be read or written. Please check the data configuration of the HSS. 
  99:  302 The length of the data to be updated to the HSS exceeds the maximum limit of the HSS. 
 100:  303 The size of the configured service data exceeds the maximum size supported by the ATS. 
 101:  500 Failed to decode or encode the SOAP text. 
 102:  501 Failed to decode the SOAP text because a parameter value is out of range. The parameter is: 
 103:  502 One or more mandatory parameters are not found. Please specify these mandatory parameters. 
 104:  503 The SOAP message is too large. 
 105:  504 Failed to decode the SOAP message because the memory is insufficient. 
 106:  505 The parameter configuration exceeds the maximum number. As a result, SOAP messages cannot be decoded. The parameter is: 
 107:  --1000 The user already exists. 
 108:  1001 The Local DN set parameter must be specified. 
 109:  1002 The Call source code parameter must be specified. 
 110:  1003 Invalid parameter: Local DN set. 
 111:  1004 Invalid parameter: Call source code. 
 112:  1005 Invalid parameter: Pulse charge case. 
 113:  1006 Invalid parameter: User category. 
 114:  1007 Invalid parameter: Voice group number. 
 115:  1008 Invalid parameter: Callee route source code. 
 116:  1009 Invalid parameter VoiceMailBox index. 
 117:  1010 Invalid parameter VideoMailBox index. 
 118:  1011 Prepaid Prefix Index does not exist. 
 119:  1012 The CRBT prefix index does not exist. 
 120:  1013 The CLIP and CIDCW conflict. 
 121:  1014 The RID, NRID, and CLIR conflict or they are registered. 
 122:  1015 The COLP and COLPOVR conflict. 
 123:  1016 The pulse charging type can not be configured for the AOC_D or AOC_E. 
 124:  1017 The SD1D and SD2D cannot co-exist with the SPEED_DIAL. 
 125:  1018 The CCW service right can be configured only for a subscriber that has the CW service right. 
 126:  1019 The record mapping the DSPIDX parameter must be defined first. 
 127:  1020 The call barring group must be configured first. 
 128:  1021 Obtaining the call source code failed. Please run ADD NUMSEGSRCMAP to configure the call source code that maps the IMPU. 
 129:  1022 Obtaining the local DN set failed. Please run ADD CALLSRC to configure the local DN set that maps the call source code. 
 130:  1200 The PBX user cannot be deleted by running RMV SBR. 
 131:  1300 No user data. 
 132:  1600 The same service data has been registered on the HSS. 
 133:  1601 The CFDATA service data does not exist. 
 134:  1602 Failed to register the CFDATA service because one parameter is invalid. 
 135:  1603 The CFDATA record number reaches the maximum. 
 136:  1604 No right to register the CFDATA service. 
 137:  1700 No user data. 
 138:  1701 One parameter in the RMV CFDATA command is invalid. 
 139:  1702 No CFDATA service data. 
 140:  1703 The data to be removed is not found. 
 141:  1800 No CFDATA service data. 
 142:  1900 The user already has the number change service. 
 143:  1901 The SOAP data is empty. 
 144:  1902 The new number is the same as itself. 
 145:  1903 The new number cannot be the same as one in the ImplicitIdentitys set. 
 146:  1910 The number invalidation status is incorrect. 
 147:  1911 The new number format is incorrect. 
 148:  2000 The SOAP data is empty. 
 149:  2001 The user does not have the number change service. 
 150:  2100 The user status is normal and thus cannot be modified. 
 151:  2101 No service data. 
 152:  2102 One parameter of the MOD NUMCHG command in the SOAP text is not found. 
 153:  2103 New IMPU, Number change mode, and Send short message flag are not specified. 
 154:  2104 The new number is the same as itself. 
 155:  2105 The modified data is the same as the data from HSS. 
 156:  2106 The new number cannot be the same as one in the ImplicitIdentitys set. 
 157:  2200 No number change service data. 
 158:  2300 The service data already exists. 
 159:  2400 No STRATEGY service data. 
 160:  2500 No STRATEGY service data. 
 161:  2700 The ADD SBR command is not found. 
 162:  2801 Barred by the call forwarding barring (CDIVBAR). 
 163:  2802 Barred by selective outgoing call (SOC). 
 164:  2803 Barred by operator determined barring (ODB). 
 165:  2804 Barred by outgoing call barring (CBA). 
 166:  2805 Barred by incoming only line (ICO). 
 167:  2806 Barred by the owing restricted service. 
 168:  2807 Barred by dial number call-out barring service (DNCALLOUTBAR). 
 169:  2808 Barred by outgoing call barring except green call (OCBEG). 
 170:  2809 Barred by customized call-out authority (CUSTOM). 
 171:  2810 Barred by outgoing call barring (OCB). 
 172:  2811 Barred by operator determined barring outgoing call (ODBBOC). 
 173:  2812 Barred by operator determined barring outgoing call when roaming outside home public land mobile network (ODBBOCROAM). 
 174:  2813 Barred by operator determined barring outgoing call except mobile subscriber. 
 175:  2814 Barring for international call. 
 176:  2815 Barring for prepaid user. 
 177:  2816 Barred by the carrier selection on call by call (CBC) restriction right. 
 178:  2817 Barred by illegal configuration of carrier selection on call by call (CBC). 
 179:  2818 Barred by dial number call-out allowing service (DNCALLOUTALLOW). 
 180:  2828 No service data. 
 181:  2829 At least one parameter must be specified. 
 182:  2830 The number of IMPU in ImplicitIdentitys set(IRS) exceeds the maximum. 
 183:  10000 No SOC service data. 
 184:  10001 The SOC service already exists. 
 185:  10002 The SOC record reaches the maximum. 
 186:  10003 The time of the SOC service conflicts with one existing record. 
 187:  10004 The start time of the SOC service is invalid. 
 188:  10005 The end time of the SOC service is invalid. 
 189:  10006 The end time of the SOC service is earlier than the start time. 
 190:  10007 The time of the SOC service conflicts. 
 191:  10008 The start time and end time of the SOC service are invalid. 
 192:  10009 The SOC number cannot be the same as the user number. 
 193:  10010 The SOC number cannot be the same as one in the ImplicitIdentitys set. 
 194:  10100 No SOC service data. 
 195:  10200 The user has not registered the SOC service. 
 196:  10201 The user has not registered the SOC service. 
 197:  10202 The SOC service data does not exist. 
 198:  10203 No SOC service data. 
 199:  10300 The SIC record reaches the maximum. 
 200:  10301 The start time of the SIC service is invalid. 
 201:  10302 The end time of the SIC service is invalid. 
 202:  10303 The time and IMPU are the same as those on the HSS and thus a conflict occurs. 
 203:  10304 The restricted number cannot be the same as the user number. 
 204:  10305 The restricted number cannot be the same as one in the ImplicitIdentitys set. 
 205:  10308 Caller IMPU must be specified. 
 206:  10400 No SIC service data. 
 207:  10500 The user has not registered the SIC service. 
 208:  10501 No SIC service data. 
 209:  10502 No SIC service data. 
 210:  10503 The length of the caller number must be 10 digits. 
 211:  10600 The DND service data does not exist. 
 212:  10601 The DND service data already exists. 
 213:  10602 Failed to download the service data. 
 214:  10603 The DND record reaches the maximum. 
 215:  10604 The Time parameter is invalid. 
 216:  10605 The Mode parameter is invalid. 
 217:  10606 The Group number parameter is invalid. 
 218:  10607 The Start year parameter is invalid. 
 219:  10608 The Start month parameter is invalid. 
 220:  10609 The Start day parameter is invalid. 
 221:  10610 The Start hour parameter is invalid. 
 222:  10611 The End year parameter is invalid. 
 223:  10612 The End month parameter is invalid. 
 224:  10613 The End day parameter is invalid. 
 225:  10614 The End hour parameter is invalid. 
 226:  10615 The mode is week, but the weekpattern is not set. 
 227:  10616 The mode is month, but the day is not set. 
 228:  10617 The mode is year, but the day and month are not set. 
 229:  10618 The hour and minute parameters must be specified or must not be specified simultaneously. 
 230:  10619 The end hour and end minute parameters must be specified or must not be specified simultaneously. 
 231:  10620 The start hour, start minute, end hour, and end minute parameters must be specified or not be specified simultaneously. 
 232:  10621 No valid date between start date and end date. 
 233:  10622 The end time of the DND is earlier than the start time of the DND. 
 234:  10623 The DND access mode can not be configured on the Web portal. 
 235:  10624 The start year, month, and day must be specified. 
 236:  10700 No service data. 
 237:  10800 The user has not registered the DND service. 
 238:  10801 No right to register the GOIR service. 
 239:  10900 The K value is not defined in the MOD PFXOCR command. 
 240:  11000 No CBA service data. 
 241:  11300 No GOIR service data. 
 242:  11301 No service data. 
 243:  11400 The user has not registered the GOIR service. 
 244:  11500 The GOIR service is registered and thus the MOIR service cannot be registered. 
 245:  11600 No MOIR service data. 
 246:  11601 The user has not registered the MOIR service. 
 247:  11800 The same number already exists. 
 248:  11801 The DN_CALL_OUT_ALLOW record reaches the maximum. 
 249:  11802 The number to be registered is a prefix of a number registered on the HSS. 
 250:  11900 No DN_CALL_OUT_ALLOW service data. 
 251:  12000 The user has not registered the service. 
 252:  12001 No DN_CALL_OUT_ALLOW service data. 
 253:  12002 Failed to obtain the DN_CALL_OUT_ALLOW service data. 
 254:  12003 The user has not registered the service. 
 255:  12100 The same number already exists. 
 256:  12101 The DN_CALL_OUT_BAR record reaches the maximum. 
 257:  12102 The number to be registered is a prefix of an existing number. 
 258:  12103 The number to be registered is sip URI. 
 259:  12200 No DN_CALL_OUT_BAR service data. 
 260:  12300 The user has not registered the service. 
 261:  12301 No DN_CALLOUT_BAR service data. 
 262:  12302 Failed to obtain the DN_CALL_OUT_BAR service data. 
 263:  12303 The user has not registered the service. 
 264:  12400 The value of one parameter in the SET_OWSBR command is invalid. 
 265:  12401 The parameter indicating the owing status of a user is invalid. 
 266:  12500 Failed to obtain the user data. 
 267:  12501 No user data. 
 268:  12700 The value of one parameter in the PRK_OWSBR command is invalid. 
 269:  12900 No user data. 
 270:  12901 No response data. 
 271:  12902 The REG COMSS command includes unauthorized services. 
 272:  12903 The RID, NRID and CLIR conflict. 
 273:  12904 The RID,NRID and CLIR rights are not configured. 
 274:  12905 The service(s) to be configured is not authorized to subscribers of the customized type (indicated by Customized user category). 
 275:  13100 When the TMODE is PERMANENT, the start time and end time can not be specified. 
 276:  13101 When the TMODE is TEMP, the start time and end time should be specified. 
 277:  13400 Failed to obtain the system time. 
 278:  13401 The WAKEUP service cannot be registered near the current system time. 
 279:  13402 The same record already exists. 
 280:  13403 The WAKEUP service record reaches the maximum. 
 281:  13404 The week time parameter is not specified. 
 282:  13405 The day time parameter is not specified. 
 283:  13406 The value of week is out of range. 
 284:  13407 The weeks value is small. 
 285:  13408 The WCLAN parameter is invalid. Please first configure LANGDEF on the OMU client. 
 286:  13500 No WAKEUP service data. 
 287:  13600 The service is not registered. 
 288:  13601 The hour and minute must be specified together. 
 289:  13602 No record is found. 
 290:  13900 No CFTB service data. 
 291:  13901 The record to be cancelled by running RPL CFTB is not found. 
 292:  14000 All the parameters in REG UINFO are empty. 
 293:  14100 No UINFO service data. 
 294:  14300 In REG MRINGMODE, IMPUn parameter format error: invalid URI format. 
 295:  14301 The CFMODE parameter in REG MRONGMOD must be specified. 
 296:  14302 In the multi-ringing service, each IMPU is unique. 
 297:  14303 REG MRINGMODE IMPU list is empty. 
 298:  14400 No MRINGMODE service data. 
 299:  14600 In the ImplicitIdentitys set, there is no SIP IMPU. 
 300:  14601 In the ImplicitIdentitys set, there is no TEL IMPU. 
 301:  14602 The PC-ONLY subscriber is not a SIP subscriber. 
 302:  14603 The PC-ONLY subscriber and the subscriber number are not in the same implicit registration set. 
 303:  14604 The user does not have the ImplicitIdentitys list. 
 304:  14700 The user has not registered the service. 
 305:  14800 No user data. 
 306:  14900 There are two identical services in REG SS. 
 307:  14901 The service to be activated is not registered. 
 308:  14902 The service to be deactivated is not registered. 
 309:  14903 The ACT SS command contains services that the subscriber does not have the right to use. 
 310:  14904 The DEA SS command contains services that the subscriber does not have the right to use. 
 311:  -15000 No service data. 
 312:  15100 No right to register the CFU service. 
 313:  15200 No right to register the CFU service. 
 314:  15201 No user data. 
 315:  15202 No right to register the service. 
 316:  15203 No extended user data. 
 317:  15204 The IMPU must be a TEL URI or the alias group to which the IMPU belongs must contain a TEL URI. 
 318:  15300 No service data. 
 319:  15400 The CFU service is not registered and thus running RPL CFU fails. 
 320:  15401 No CFU service data. 
 321:  15402 No user data. 
 322:  15500 No right to register the CFB service. 
 323:  15600 No CFB service data. 
 324:  15601 No right to register the CFNR service. 
 325:  15602 No CFNR service data. 
 326:  15900 No CFNR service data. 
 327:  16200 No CFNL service data. 
 328:  16500 No CFNRC service data. 
 329:  16800 No CWCFNR service data. 
 330:  16900 The time parameter in REG CFS is invalid. 
 331:  16901 The CFS record reaches the maximum. 
 332:  16902 The CFS record reaches the maximum. 
 333:  16903 One parameter in REG CFS is invalid. 
 334:  16904 The same service has registered on the HSS. 
 335:  16905 The caller IMPU and the subscriber number cannot be in the same ImplicitIdentitys list. 
 336:  16906 The caller IMPU cannot be the same as the user IMPU. 
 337:  16907 Please enter a valid 10-digit caller number. 
 338:  17000 No user service data. 
 339:  17001 No CFS service data. 
 340:  17002 Failed to obtain the service that has the same EP parameter. 
 341:  17100 No CFS service data. 
 342:  17300 The start time is the same as an existing record. 
 343:  17301 The value of the Cycle type parameter is DEFAULT, which is the same as an existing record. 
 344:  17302 The CFTB record reaches the maximum. 
 345:  17303 The end time is smaller than the start time. 
 346:  17304 The start time of the CFTB is invalid. 
 347:  17305 The end time of the CFTB is invalid. 
 348:  17306 The year, month and date must be specified when cycle type is NORMAL. 
 349:  17307 The hour and minute must be specified when cycle type is not DEFAULT. 
 350:  17308 The week must be specified when cycle type is WEEK. 
 351:  17309 Service type must be specified. 
 352:  17400 One parameter in REG CFSB is invalid. 
 353:  17401 No CFSB service data. 
 354:  17600 No TMP_LIN service data. 
 355:  17700 One parameter in REG TMPLIN is invalid. 
 356:  17701 No TPMLIN service data. 
 357:  17900 One parameter in REG CODEC_CNTRL is invalid. 
 358:  18000 No user service data. 
 359:  18001 No user service data. 
 360:  18002 The user has not registered the service. 
 361:  18003 The user has not registered the CODEC CONTROL service. 
 362:  18100 No user service data. 
 363:  18101 The CODEC_CNTRL service is not registered. 
 364:  18102 Failed to obtain the user data. 
 365:  18200 Invalid parameter. 
 366:  18201 The bind mode DOUBLE is not applicable to Centrex user. 
 367:  18202 The bound-to IMPU can not be the IMPU of the service subscriber. 
 368:  18203 The bound-to IMPU can not be the IMPU forbidden by service provider. 
 369:  18204 The bind mode DOUBLE is used only when Binding IMPU is specified. 
 370:  18205 No user data. 
 371:  18206 The green call service is not registered. 
 372:  18207 The green call data does not exist. 
 373:  18208 Registering the green call service failed. 
 374:  18209 A mobile phone number can not bound to another mobile phone number. 
 375:  18210 The binding number is not a local number. 
 376:  18211 The IMPU of the bound-to subscriber must have the same country code as that of the service subscriber. 
 377:  18301 No extended subscriber data. 
 378:  18302 The service is not registered 
 379:  18303 The service data does not exist. 
 380:  18401 The hotline IMPU must be in Tel URI format. 
 381:  18402 No extended subscriber data. 
 382:  18403 The service is not registered. 
 383:  18404 The service data does not exist. 
 384:  18405 The hotline number cannot be the number of the hotline service subscriber or another IMPU in the same alias group. 
 385:  18406 The value of Hotline Delay Time is invalid. 
 386:  18501 No extended subscriber data. 
 387:  18502 The service is not registered. 
 388:  18503 The service data does not exist. 
 389:  18601 The nightservice IMPU cannot be the IMPU of the service subscriber. 
 390:  18602 No extended subscriber data. 
 391:  18603 The service is not registered. 
 392:  18604 The service data does not exist. 
 393:  18701 The backup IMPU cannot be the IMPU of the service subscriber. 
 394:  18702 No extended subscriber data. 
 395:  18703 The service is not registered. 
 396:  18704 The service data does not exist. 
 397:  18801 The console IMPU cannot be the IMPU of the service subscriber. 
 398:  18802 No extended subscriber data. 
 399:  18803 The service is not registered. 
 400:  18804 The service data does not exist. 
 401:  18900 IMS subscribers are not allowed to use the following services: 
 402:  18901 POTS subscribers are not allowed to use the following services: 
 403:  18902 G/U subscribers are not allowed to use the following services: 
 404:  18903 CDMA subscribers are not allowed to use the following services: 
 405:  18904 PSTN subscribers are not allowed to use the following services: 
 406:  19000 The service is not registered. 
 407:  19001 The service data does not exist. 
 408:  19002 The Multiple Subscriber Number service right cannot be configured for a non-IRS subscriber. 
 409:  19003 The Multiple Subscriber Number service right can be configured only for the default IMPU of the IRS. 
 410:  19004 The CET mode is not configured. You can run MOD MCIDCFG to configure it. 
 411:  19005 Invalid MCID phase parameter. 
 412:  19100 The subscriber has not registered the service. 
 413:  19101 No service data. 
 414:  19102 The Busy Notify, No Answer Notify, and Not Reachable Notify parameters cannot be set to FALSE at the same time. 
 415:  19103 The Videotelephony subscriber is not allowed to register the miss call notify(MCN) service. 
 416:  19200 The number of records of Distinct Alerting service has reached the maximum. 
 417:  19201 The record does not exist. 
 418:  19202 Source IMPU must be a valid 10-digit number. 
 419:  19300 The alias set must contains at least one SIP URI number. 
 420:  19301 The alias set must contains at least one TEL URI number. 
 421:  19302 The PC IMPU must be a SIP URI number. 
 422:  19303 The PC IMPU is not in the alias set. 
 423:  19400 The STB IMPU and the subscriber number cannot be in the same implicit registration set. 
 424:  19401 The STB IMPU cannot be the same as the subscriber number. 
 425:  19402 The STB IMPU must be a global number. 
 426:  19500 The paramer of Priority call number is invalid. 
 427:  19501 The record of Priority call number already exists. 
 428:  19502 Start time or Stop time is invalid. 
 429:  19503 The record of Priority call number is not found. 
 430:  19600 The Binding IMPU must be a global number. 
 431:  20014 The subscriber has applied for VIMPU. 
 432:  20016 The INBOUND and OUTBOUND services are mutually exclusively. 
 433:  20019 The system is locked. Thus, you can perform service query only. 
 434:  20020 Please enter a valid 10-digit forwarded-to number. 
 435:  20021 Please enter a valid 11-digit forwarded-to number that is prefixed with 1. 
 436:  20022 Please enter a valid 7-digit forwarded-to number. 
 437:  30100 The one number service data records registered for the subscriber have reached the maximum number. 
 438:  30101 A one number service data record with the same index or priority already exists. 
 439:  30102 The specified one number service data record does not exist. 
 440:  30103 The subscriber can register one Caller One Number data record only. 
 441:  30104 The service type conflicts with the number type. 
 442:  30105 Service type or Ringing type cannot match the association data. 
 443:  30106 The association list does not exist. 
 444:  30201 The association list data records registered for the subscriber have reached the maximum number. 
 445:  30202 The specified association list data record does not exist. 
 446:  30203 A association list data record with the same index and type already exists. 
 447:  30204 The association type of this record conflicts with that of another record in the same association index. 
 448:  30205 The association number of a record must be unique. 
 449:  30206 Invalid association number format. 
 450:  30207 The displayed number must be a valid global number. 
 451:  30208 The primary number must be a valid global number. 
 452:  30209 This record is referenced by the One Number service data and thus it cannot be removed. 
 453:  30210 Failed to obtain the country code of the asssociation number. 
 454:  30107 The Filter criteria is invalid. Only digits, letters, underscores and semicolons are allowed. 
 455:  30108 When the Ringing type is set to Call forwarding or Call forwarding to voice mailbox, the Call forwarding mode must be selected. 
 456:  30300 The number of registered Filter criteria records has reached the maximum number that a single subscriber can register. 
 457:  30301 The Filter criteria name is invalid. Only digits, letters, and underscores are allowed. 
 458:  30302 Please configure at least one Filter criteria. 
 459:  30303 If Filter by caller information is selected as a Filter criteria, the Caller information must be filled. 
 460:  30304 If Filter by presence status is selected as a Filter criteria, the Presence status must be filled. 
 461:  30305 If Filter by time is selected as a Filter criteria, the Holiday group index or the Date mode must be filled. 
 462:  30306 The specified Holiday group index does not exist. Please run ADD HLDYGRP to configure the Holiday group index first. 
 463:  30307 The Date mode is Month+order+day of week. The parameters Month, Order and Day of week must be specified. 
 464:  30308 The Date mode is Month+start day+end day. The parameters Month, Start day and End day must be specified. 
 465:  30309 The Date mode is Start date+end date. The parameters Start date and End date must be specified. 
 466:  30310 The End day cannot be earlier than the Start day. 
 467:  30311 The End date cannot be earlier than the Start date. 
 468:  30312 The Start date is invalid. 
 469:  30313 The End date is invalid. 
 470:  30314 A record with the same Filter criteria name already exits. 
 471:  30315 The specified record does not exist. 
 472:  30316 The Start time is invalid. 
 473:  30317 The End time is invalid. 
 474:  30318 The End time cannot be earlier than the Start time. 
 475:  30319 The Start day is invalid. 
 476:  30320 The End day is invalid. 
 477:  30211 Please enter a valid 10-digit Association number. 
 478:  30212 Please enter a valid 11-digit Association number that is prefixed with 1. 
 479:  30213 Please enter a valid 7-digit Association number. 
 480:  30400 The format of the Caller number is invalid. 
 481:  30401 The Caller number must be a global number. 
 482:  30403 The specified record already exists. 
 483:  30404 The specified record does not exist. 
 484:  30405 The number of registered Caller information records has reached the maximum number that a single subscriber can register. 
 485:  35604 The subscriber does not register the One Number service. 
 486:  35609 There is a service conflict. 
 487:  35610 The service right of the number is restricted. 
 488:  35611 The maximum number of secondary numbers has been exceeded. 
 489:  35612 The specified number is already associated with another subscriber. 
 490:  35616 Invalid domain name. 
 491:  35617 Invalid phone number. 
 492:  35625 Cannot remove the subscriber data: The input parameters are incorrect. 
 493:  35669 Cannot remove the subscriber data: The specified data is associated with other subscribers. 
 494:  35799 Other errors. 
 495:  90000 In ADD BLKNUM, BIMPU parameter format error: invalid URI format. 
 496:  90001 The black or white IMPU already exists in the service data. 
 497:  90002 The MCR, DND, or call forwarding service right must be configured. 
 498:  90003 No basic user data. 
 499:  90004 The record reaches the maximum. 
 500:  90005 The black number cannot be the same as the user number. 
 501:  90006 The black number cannot be the same as one in the ImplicitIdentitys set. 
 502:  90100 The record is not found in the black or white number service data. 
 503:  90300 The ACR, ACRTOVM, DND, or call forwarding service right must be configured. 
 504:  90301 The white number cannot be the same as the user number. 
 505:  90302 The number cannot be the same as one in the ImplicitIdentitys set. 
 506:  90600 Green or red number format error: invalid URI format. 
 507:  90601 The green or red number already exists. 
 508:  90602 The green number cannot be the same as the user number. 
 509:  90603 The green number cannot be the same as one in the ImplicitIdentitys set. 
 510:  90604 The record reaches the maximum. 
 511:  90700 The green or red number is not found. 
 512:  90900 The red number cannot be the same as one in the ImplicitIdentitys set. 
 513:  90901 The red IMPU cannot be the same as the user IMPU. 
 514:  91000 The NPAS state of the subscriber is incorrect. 
 515:  91001 The Permissive time is illegal. 
 516:  91002 The Announce time is illegal. 
 517:  91003 The End time is illegal. 
 518:  91004 The Permissive time must be smaller than or equal to the Announce time. 
 519:  91005 The Announce time must be smaller than or equal to the End time. 
 520:  91006 At least one of the Permissive time, the Announce time, and the End time must be greater than the current time. 
 521:  91100 The VIMPU parameter must be set to a TEL URI number. 
 522:  92400 The basic service group is not supported. 
 523:  92401 The Basic service group in http command is not the same as the one in CFX service data. 
 524:  92402 User is not allowed to perform the operation. 
 525:  92403 Can not get the home and visited nation code. 
 526:  92404 Can not get the forward number nation code. 
 527:  92405 Barred by ODBBRACF. 
 528:  92406 Barred by ODBBRICF. 
 529:  92407 Barred by ODBBRICFEXHC. 
 530:  92408 Barred by BAOC. 
 531:  92409 Barred by BAIC. 
 532:  92410 Barred by BOIC. 
 533:  92411 Barred by BOICEXHC. 
 534:  92412 Barred by BICROM. 
 535:  92413 Activating the CCF service is barred by CFU. 
 536:  92414 Failed to obtain the CFU service data. 
 537:  92415 Failed to obtain the CFB service data. 
 538:  92416 Failed to obtain the CFNR service data. 
 539:  92417 Failed to obtain the CFNRC service data. 
 540:  92418 Failed to obtain the CCF service data. 
 541:  92200 The user is not mobile subscriber. 
 542:  92201 Some field does not match usertype. 
 543:  92202 The service has not been activated. 
 544:  92210 The BAOC service has not been activated. 
 545:  92211 The BOIC service has not been activated. 
 546:  92212 The BOICEXHC service has not been activated. 
 547:  92213 The BAIC service has not been activated. 
 548:  92214 The BICROM service has not been activated. 
 549:  92224 The CFU service has been activated. The CFU and BAOC services are mutually exclusive. 
 550:  92225 The CFB Service has been activated. The CFB and BAOC services are mutually exclusive. 
 551:  92226 The CFNR Service has been activated. The CFNR and BAOC services are mutually exclusive. 
 552:  92227 The CFNRC Service has been activated. The CFNRC and BAOC services are mutually exclusive. 
 553:  92237 The CFU Service has been activated. The CFU and BOIC services are mutually exclusive. 
 554:  92238 The CFB Service has been activated. The CFB and BOIC services are mutually exclusive. 
 555:  92239 The CFNR Service has been activated. The CFNR and BOIC services are mutually exclusive. 
 556:  92240 The CFNRC Service has been activated. The CFNRC and BOIC services are mutually exclusive. 
 557:  92250 The CFU Service has been activated. The CFU and BOICExHC services are mutually exclusive. 
 558:  92251 The CFB Service has been activated. The CFB and BOICExHC services are mutually exclusive. 
 559:  92252 The CFNR Service has been activated. The CFNR and BOICExHC services are mutually exclusive. 
 560:  92253 The CFNRC Service has been activated. The CFNRC and BOICExHC services are mutually exclusive. 
 561:  92263 The CFU Service has been activated. The CFU and BAIC services are mutually exclusive. 
 562:  92264 The CFB Service has been activated. The CFB and BAIC services are mutually exclusive. 
 563:  92265 The CFNR Service has been activated. The CFNR and BAIC services are mutually exclusive. 
 564:  92266 The CFNRC Service has been activated. The CFNRC and BAIC services are mutually exclusive. 
 565:  92276 The CFU Service has been activated. The CFU and BICROM services are mutually exclusive. 
 566:  92277 The CFB Service has been activated. The CFB and BICROM services are mutually exclusive. 
 567:  92278 The CFNR Service has been activated. The CFNR and BICROM services are mutually exclusive. 
 568:  92279 The CFNRC Service has been activated. The CFNRC and BICROM services are mutually exclusive. 
 569:  92280 An unknown error occurs during number analysis. 
 570:  92281 An internal error occurs during number analysis. 
 571:  92300 The length of Abbreviated Dial Number exceed three. 
 572:  92301 The abbreviated dial Number contains invalid character. 
 573:  92302 The number of SpeedDial codes registered by a subscriber reaches the maximum. 
 574:  92303 The number of SpeedDial services registered on a single CCU reaches the maximum. 
 575:  92304 The number of subscribers that has registered the SpeedDial service on a single CCU reaches the maximum. 
 576:  92305 The destination dial number cannot be the sip URI type. 
 577:  92306 The destination dial number cannot be the same as the user IMPU. 
 578:  92307 The destination dial number cannot be the same as one in the ImplicitIdentitys set. 
 579:  92308 The destination dial number contains invalid character. 
 580:  92309 The service data does not exist. 
 581:  92310 The specific speed dial data does not exist. 
 582:  92311 The destination dial number cannot be configured in ADD SPDLBAR. 
 583:  92312 The format of new IMPU is invalid. 
 584:  92313 The short number is invalid. 
 585:  92314 The short number is smaller than the configured value. 
 586:  92315 The length of the destination number reaches the maximum. 
 587:  93001 The service is restricted by license. 
 588:  94000 Some parameters conflict with those in the template. 
 589:  94001 Failed to obtain the template data. 
 590:  94002 The subscriber does not have the right to use the service in the template. 
 591:  94003 No template data. 
 592:      */
 593:              #endregion
 594:          }
 595:   
 596:          ////////////////////////////////////////////////////////////////////////////
 597:   
 598:          /// <summary>
 599:          ///
 600:          /// </summary>
 601:          public Ims()
 602:          {
 603:              // below: trust all certificates
 604:              System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);
 605:          }
 606:   
 607:          ////////////////////////////////////////////////////////////////////////////
 608:   
 609:          /// <summary>
 610:          ///
 611:          /// </summary>
 612:          public Ia.Ngn.Cl.Model.Huawei.HuSbr LstSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 613:          {
 614:              Ia.Ngn.Cl.Model.Huawei.HuSbr sbr;
 615:   
 616:              SendSoapRequestAndReadResponse(LstSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 617:   
 618:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
 619:   
 620:              if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
 621:              {
 622:                  sbr = Ia.Ngn.Cl.Model.Business.Huawei.HuSbr.ParseFromDictionary(parameterDictionaryList[0]);
 623:              }
 624:              else sbr = null;
 625:   
 626:              return sbr;
 627:          }
 628:   
 629:          ////////////////////////////////////////////////////////////////////////////
 630:          ////////////////////////////////////////////////////////////////////////////
 631:   
 632:          /// <summary>
 633:          ///
 634:          /// </summary>
 635:          public void AddSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 636:          {
 637:              SendSoapRequestAndReadResponse(AddSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 638:   
 639:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 640:          }
 641:   
 642:          ////////////////////////////////////////////////////////////////////////////
 643:   
 644:          /// <summary>
 645:          ///
 646:          /// </summary>
 647:          public void RmvSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 648:          {
 649:              SendSoapRequestAndReadResponse(RmvSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 650:   
 651:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 652:          }
 653:   
 654:          ////////////////////////////////////////////////////////////////////////////
 655:          ////////////////////////////////////////////////////////////////////////////
 656:   
 657:          /// <summary>
 658:          ///
 659:          /// </summary>
 660:          public void ModSbrNsabrc(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 661:          {
 662:              SendSoapRequestAndReadResponse(ModSbrNsabrcSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 663:   
 664:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 665:          }
 666:   
 667:          ////////////////////////////////////////////////////////////////////////////
 668:   
 669:          /// <summary>
 670:          ///
 671:          /// </summary>
 672:          public void ModSbrNsclip(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 673:          {
 674:              SendSoapRequestAndReadResponse(ModSbrNsclipSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 675:   
 676:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 677:          }
 678:   
 679:          ////////////////////////////////////////////////////////////////////////////
 680:   
 681:          /// <summary>
 682:          ///
 683:          /// </summary>
 684:          public void ModSbrNscfu(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 685:          {
 686:              SendSoapRequestAndReadResponse(ModSbrNscfuSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 687:   
 688:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 689:          }
 690:   
 691:          ////////////////////////////////////////////////////////////////////////////
 692:   
 693:          /// <summary>
 694:          ///
 695:          /// </summary>
 696:          public void ModSbrNscw(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 697:          {
 698:              SendSoapRequestAndReadResponse(ModSbrNscwSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 699:   
 700:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 701:          }
 702:   
 703:          ////////////////////////////////////////////////////////////////////////////
 704:   
 705:          /// <summary>
 706:          ///
 707:          /// </summary>
 708:          public void ModSbrNs3pty(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 709:          {
 710:              SendSoapRequestAndReadResponse(ModSbrNs3ptySoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 711:   
 712:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 713:          }
 714:   
 715:          ////////////////////////////////////////////////////////////////////////////
 716:   
 717:          /// <summary>
 718:          ///
 719:          /// </summary>
 720:          public void ModSbrNswakeup(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 721:          {
 722:              SendSoapRequestAndReadResponse(ModSbrNswakeupSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 723:   
 724:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 725:          }
 726:   
 727:          ////////////////////////////////////////////////////////////////////////////
 728:   
 729:          /// <summary>
 730:          ///
 731:          /// </summary>
 732:          public void ModSbrItt(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 733:          {
 734:              SendSoapRequestAndReadResponse(ModSbrIttSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 735:   
 736:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 737:          }
 738:   
 739:          ////////////////////////////////////////////////////////////////////////////
 740:   
 741:          /// <summary>
 742:          ///
 743:          /// </summary>
 744:          public void ModSbrNscba(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 745:          {
 746:              SendSoapRequestAndReadResponse(ModSbrNscbaSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 747:   
 748:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 749:          }
 750:   
 751:          ////////////////////////////////////////////////////////////////////////////
 752:   
 753:          /// <summary>
 754:          ///
 755:          /// </summary>
 756:          public void SetOwSbr(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 757:          {
 758:              SendSoapRequestAndReadResponse(SetOwSbrSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 759:   
 760:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 761:          }
 762:   
 763:          ////////////////////////////////////////////////////////////////////////////
 764:   
 765:          /// <summary>
 766:          ///
 767:          /// </summary>
 768:          public Ia.Ngn.Cl.Model.Huawei.Owsbr LstOwSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 769:          {
 770:              Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr;
 771:   
 772:              SendSoapRequestAndReadResponse(LstOwSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 773:   
 774:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
 775:   
 776:              if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
 777:              {
 778:                  owsbr = Ia.Ngn.Cl.Model.Business.Huawei.Owsbr.ParseFromDictionary(parameterDictionaryList[0]);
 779:              }
 780:              else owsbr = null;
 781:   
 782:              return owsbr;
 783:          }
 784:   
 785:          ////////////////////////////////////////////////////////////////////////////
 786:          ////////////////////////////////////////////////////////////////////////////
 787:   
 788:          /// <summary>
 789:          ///
 790:          /// </summary>
 791:          public void RmvHsub(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 792:          {
 793:              SendSoapRequestAndReadResponse(RmvHsubSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 794:   
 795:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 796:          }
 797:   
 798:          ////////////////////////////////////////////////////////////////////////////
 799:   
 800:          /// <summary>
 801:          ///
 802:          /// </summary>
 803:          public void RmvHsdainf(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 804:          {
 805:              SendSoapRequestAndReadResponse(RmvHsdainfSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 806:   
 807:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 808:          }
 809:   
 810:          ////////////////////////////////////////////////////////////////////////////
 811:   
 812:          /// <summary>
 813:          ///
 814:          /// </summary>
 815:          public void AddDnaptrrec(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 816:          {
 817:              SendSoapRequestAndReadResponse(AddDnaptrrecSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 818:   
 819:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 820:          }
 821:   
 822:          ////////////////////////////////////////////////////////////////////////////
 823:   
 824:          /// <summary>
 825:          ///
 826:          /// </summary>
 827:          public void AddHsifc(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 828:          {
 829:              SendSoapRequestAndReadResponse(AddHsifcSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 830:   
 831:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 832:          }
 833:   
 834:          ////////////////////////////////////////////////////////////////////////////
 835:   
 836:          /// <summary>
 837:          ///
 838:          /// </summary>
 839:          public void AddHimpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 840:          {
 841:              SendSoapRequestAndReadResponse(AddHimpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 842:   
 843:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 844:          }
 845:   
 846:          ////////////////////////////////////////////////////////////////////////////
 847:   
 848:          /// <summary>
 849:          ///
 850:          /// </summary>
 851:          public void AddHsub(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 852:          {
 853:              SendSoapRequestAndReadResponse(AddHsubSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 854:   
 855:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 856:          }
 857:   
 858:          ////////////////////////////////////////////////////////////////////////////
 859:   
 860:          /// <summary>
 861:          ///
 862:          /// </summary>
 863:          public void AddHsdainf(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 864:          {
 865:              SendSoapRequestAndReadResponse(AddHsdainfSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 866:   
 867:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 868:          }
 869:   
 870:          ////////////////////////////////////////////////////////////////////////////
 871:   
 872:          /// <summary>
 873:          ///
 874:          /// </summary>
 875:          public void SetHregauth(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 876:          {
 877:              SendSoapRequestAndReadResponse(SetHregauthSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 878:   
 879:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 880:          }
 881:   
 882:          ////////////////////////////////////////////////////////////////////////////
 883:   
 884:          /// <summary>
 885:          ///
 886:          /// </summary>
 887:          public void SetHvntplidForImpuSipDomain(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 888:          {
 889:              SendSoapRequestAndReadResponse(SetHvntplidForImpuSipDomainSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 890:   
 891:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 892:          }
 893:   
 894:          ////////////////////////////////////////////////////////////////////////////
 895:   
 896:          /// <summary>
 897:          ///
 898:          /// </summary>
 899:          public void SetHvntplidForImpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 900:          {
 901:              SendSoapRequestAndReadResponse(SetHvntplidForImpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 902:   
 903:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 904:          }
 905:   
 906:          ////////////////////////////////////////////////////////////////////////////
 907:   
 908:          /// <summary>
 909:          ///
 910:          /// </summary>
 911:          public void SetHirs(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 912:          {
 913:              SendSoapRequestAndReadResponse(SetHirsSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 914:   
 915:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 916:          }
 917:   
 918:          ////////////////////////////////////////////////////////////////////////////
 919:   
 920:          /// <summary>
 921:          ///
 922:          /// </summary>
 923:          public void SetHdefimpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 924:          {
 925:              SendSoapRequestAndReadResponse(SetHdefimpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 926:   
 927:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 928:          }
 929:   
 930:          ////////////////////////////////////////////////////////////////////////////
 931:   
 932:          /// <summary>
 933:          ///
 934:          /// </summary>
 935:          public void SetHspshare(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 936:          {
 937:              SendSoapRequestAndReadResponse(SetHspshareSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 938:   
 939:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 940:          }
 941:   
 942:          ////////////////////////////////////////////////////////////////////////////
 943:   
 944:          /// <summary>
 945:          ///
 946:          /// </summary>
 947:          public void SetHaliaspu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 948:          {
 949:              SendSoapRequestAndReadResponse(SetHaliaspuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 950:   
 951:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 952:          }
 953:   
 954:          ////////////////////////////////////////////////////////////////////////////
 955:   
 956:          /// <summary>
 957:          ///
 958:          /// </summary>
 959:          public void RmvDnaptrrec(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 960:          {
 961:              SendSoapRequestAndReadResponse(RmvDnaptrrecSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 962:   
 963:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 964:          }
 965:   
 966:          ////////////////////////////////////////////////////////////////////////////
 967:          ////////////////////////////////////////////////////////////////////////////
 968:   
 969:          /// <summary>
 970:          /// List Sbr (LST SBR)
 971:          /// </summary>
 972:          private static XmlDocument LstSbrSoapEnvelopeXml(string service, int messageId)
 973:          {
 974:              string impuSipDomain, xmlContent;
 975:              XmlDocument soapEnvelopeXml;
 976:   
 977:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 978:   
 979:              xmlContent = @"
 980:        <ats:LST_SBR>
 981:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
 982:        </ats:LST_SBR>
 983:  ";
 984:   
 985:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 986:   
 987:              return soapEnvelopeXml;
 988:          }
 989:   
 990:          ////////////////////////////////////////////////////////////////////////////
 991:          ////////////////////////////////////////////////////////////////////////////
 992:   
 993:          /// <summary>
 994:          /// Add Sbr (ADD SBR)
 995:          /// </summary>
 996:          private static XmlDocument AddSbrSoapEnvelopeXml(string service, int messageId)
 997:          {
 998:              string impuSipDomain, xmlContent;
 999:              XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
<ats:ADD_SBR>
  <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
  <ats:TEMPLATEIDX>65535</ats:TEMPLATEIDX>
  <ats:DSPIDX>65534</ats:DSPIDX>
  <ats:LP>0</ats:LP>
  <ats:CSC>0</ats:CSC>
  <ats:UTYPE>1</ats:UTYPE>
  <ats:VCCFLAG>0</ats:VCCFLAG>
  <ats:VTFLAG>0</ats:VTFLAG>
  <ats:NSCFU>0</ats:NSCFU>
  <ats:NSCFUVM>0</ats:NSCFUVM>
  <ats:NSCFB>0</ats:NSCFB>
  <ats:NSCFBVM>0</ats:NSCFBVM>
  <ats:NSCFNR>0</ats:NSCFNR>
  <ats:NSCFNRVM>0</ats:NSCFNRVM>
  <ats:NSCFNL>0</ats:NSCFNL>
  <ats:NSCFNLVM>0</ats:NSCFNLVM>
  <ats:NSCD>0</ats:NSCD>
  <ats:NSCDVM>0</ats:NSCDVM>
  <ats:NSCFNRC>0</ats:NSCFNRC>
  <ats:NSCFNRCVM>0</ats:NSCFNRCVM>
  <ats:NSCLIP>0</ats:NSCLIP>
  <ats:NSCIDCW>0</ats:NSCIDCW>
  <ats:NSRIO>0</ats:NSRIO>
  <ats:NSCNIP>0</ats:NSCNIP>
  <ats:NSCLIR>0</ats:NSCLIR>
  <ats:NSRIP>0</ats:NSRIP>
  <ats:NSCNIR>0</ats:NSCNIR>
  <ats:NSRID>0</ats:NSRID>
  <ats:NSNRID>0</ats:NSNRID>
  <ats:NSRND>0</ats:NSRND>
  <ats:NSNRND>0</ats:NSNRND>
  <ats:NSCW>0</ats:NSCW>
  <ats:NSCCW>0</ats:NSCCW>
  <ats:NSOIP>0</ats:NSOIP>
  <ats:NSACRM>0</ats:NSACRM>
  <ats:NSGOIR>0</ats:NSGOIR>
  <ats:NSMOIR>0</ats:NSMOIR>
  <ats:NSTIP>0</ats:NSTIP>
  <ats:NSTIR>0</ats:NSTIR>
  <ats:NSOTIR>0</ats:NSOTIR>
  <ats:NSCLIPNOSCREENING>0</ats:NSCLIPNOSCREENING>
  <ats:NSCR>0</ats:NSCR>
  <ats:NSWAKE_UP>0</ats:NSWAKE_UP>
  <ats:NSAOC_D>0</ats:NSAOC_D>
  <ats:NSAOC_E>0</ats:NSAOC_E>
  <ats:NSXEXH>0</ats:NSXEXH>
  <ats:NSXEGJ>0</ats:NSXEGJ>
  <ats:NSCWCFNR>0</ats:NSCWCFNR>
  <ats:NSIIFC>0</ats:NSIIFC>
  <ats:NSDN_CALL_OUT_BAR>0</ats:NSDN_CALL_OUT_BAR>
  <ats:NSCCBS>0</ats:NSCCBS>
  <ats:NSCCNR>0</ats:NSCCNR>
  <ats:NSCCBSR>0</ats:NSCCBSR>
  <ats:NSCCNRR>0</ats:NSCCNRR>
  <ats:NS3PTY>0</ats:NS3PTY>
  <ats:NSNPTY>0</ats:NSNPTY>
  <ats:NSDND>0</ats:NSDND>
  <ats:NSMCR>0</ats:NSMCR>
  <ats:NSCBA>0</ats:NSCBA>
  <ats:NSTMP_LIN>0</ats:NSTMP_LIN>
  <ats:NSCODEC_CNTRL>0</ats:NSCODEC_CNTRL>
  <ats:NSMWI>0</ats:NSMWI>
  <ats:NSDC>0</ats:NSDC>
  <ats:NSHOLD>0</ats:NSHOLD>
  <ats:NSECT>0</ats:NSECT>
  <ats:NSCFTB>0</ats:NSCFTB>
  <ats:NSDAN>0</ats:NSDAN>
  <ats:NSSTOP_SECRET>0</ats:NSSTOP_SECRET>
  <ats:NSMCID>0</ats:NSMCID>
  <ats:NSEBO>0</ats:NSEBO>
  <ats:NSICO>0</ats:NSICO>
  <ats:NSOUTG>0</ats:NSOUTG>
  <ats:NSINQYH>0</ats:NSINQYH>
  <ats:NSUINFO>0</ats:NSUINFO>
  <ats:NSDN_CALL_OUT_ALLOW>0</ats:NSDN_CALL_OUT_ALLOW>
  <ats:NSSIC>0</ats:NSSIC>
  <ats:NSSOC>0</ats:NSSOC>
  <ats:NSSETCFNRTIME>0</ats:NSSETCFNRTIME>
  <ats:NSCFS>0</ats:NSCFS>
  <ats:NSCFSB>0</ats:NSCFSB>
  <ats:NSFAX>0</ats:NSFAX>
  <ats:NSABRC>0</ats:NSABRC>
  <ats:NSACRTOVM>0</ats:NSACRTOVM>
  <ats:NSPREPAID>0</ats:NSPREPAID>
  <ats:NSCRBT>0</ats:NSCRBT>
  <ats:NSICB>0</ats:NSICB>
  <ats:NSMRINGING>0</ats:NSMRINGING>
  <ats:NSCIS>0</ats:NSCIS>
  <ats:NSCBEG>0</ats:NSCBEG>
  <ats:NSCOLP>0</ats:NSCOLP>
  <ats:NSCOLR>0</ats:NSCOLR>
  <ats:NSCOLPOVR>0</ats:NSCOLPOVR>
  <ats:NSBAOC>0</ats:NSBAOC>
  <ats:NSBOIC>0</ats:NSBOIC>
  <ats:NSBOICEXHC>0</ats:NSBOICEXHC>
  <ats:NSBAIC>0</ats:NSBAIC>
  <ats:NSBICROM>0</ats:NSBICROM>
  <ats:NSSPEED_DIAL>0</ats:NSSPEED_DIAL>
  <ats:NSSD1D>0</ats:NSSD1D>
  <ats:NSSD2D>0</ats:NSSD2D>
  <ats:NSGRNCALL>0</ats:NSGRNCALL>
  <ats:NSCPARK>0</ats:NSCPARK>
  <ats:NSGAA>0</ats:NSGAA>
  <ats:NSQSNS>0</ats:NSQSNS>
  <ats:NSMSN>0</ats:NSMSN>
  <ats:NSHOTLINE>0</ats:NSHOTLINE>
  <ats:NSAOC_S>0</ats:NSAOC_S>
  <ats:NSNIGHTSRV>0</ats:NSNIGHTSRV>
  <ats:NSBACKNUM>0</ats:NSBACKNUM>
  <ats:NSAUTOCON>0</ats:NSAUTOCON>
  <ats:NSCAMPON>0</ats:NSCAMPON>
  <ats:NSCTD>0</ats:NSCTD>
  <ats:NSCLICKHOLD>0</ats:NSCLICKHOLD>
  <ats:NSQUEUE>0</ats:NSQUEUE>
  <ats:NSSANSWER>0</ats:NSSANSWER>
  <ats:NSICENCF>0</ats:NSICENCF>
  <ats:NSCFGO>0</ats:NSCFGO>
  <ats:NSCECT>0</ats:NSCECT>
  <ats:NSCTGO>0</ats:NSCTGO>
  <ats:NSCTIO>0</ats:NSCTIO>
  <ats:NSSETBUSY>0</ats:NSSETBUSY>
  <ats:NSOVERSTEP>0</ats:NSOVERSTEP>
  <ats:NSABSENT>0</ats:NSABSENT>
  <ats:NSMONITOR>0</ats:NSMONITOR>
  <ats:NSFMONITOR>0</ats:NSFMONITOR>
  <ats:NSDISCNT>0</ats:NSDISCNT>
  <ats:NSFDISCNT>0</ats:NSFDISCNT>
  <ats:NSINSERT>0</ats:NSINSERT>
  <ats:NSFINSERT>0</ats:NSFINSERT>
  <ats:NSASI>0</ats:NSASI>
  <ats:NSPWCB>0</ats:NSPWCB>
  <ats:NSRD>0</ats:NSRD>
  <ats:NSLCPS>0</ats:NSLCPS>
  <ats:NSNCPS>0</ats:NSNCPS>
  <ats:NSICPS>0</ats:NSICPS>
  <ats:NSCBCLOCK>0</ats:NSCBCLOCK>
  <ats:NSMINIBAR>0</ats:NSMINIBAR>
  <ats:NSMCN>0</ats:NSMCN>
  <ats:NSDSTR>0</ats:NSDSTR>
  <ats:NSOPRREG>0</ats:NSOPRREG>
  <ats:NSONEKEY>0</ats:NSONEKEY>
  <ats:NSINBOUND>0</ats:NSINBOUND>
  <ats:NSOUTBOUND>0</ats:NSOUTBOUND>
  <ats:NSCALLERID>0</ats:NSCALLERID>
  <ats:NSCUN>0</ats:NSCUN>
  <ats:NSIPTVVC>0</ats:NSIPTVVC>
  <ats:NSNP>0</ats:NSNP>
  <ats:NSSEC>0</ats:NSSEC>
  <ats:NSSECSTA>0</ats:NSSECSTA>
  <ats:NSHRCN>0</ats:NSHRCN>
  <ats:NSSB>0</ats:NSSB>
  <ats:LCO>1</ats:LCO>
  <ats:LC>1</ats:LC>
  <ats:LCT>1</ats:LCT>
  <ats:NTT>1</ats:NTT>
  <ats:ITT>0</ats:ITT>
  <ats:ICTX>1</ats:ICTX>
  <ats:OCTX>1</ats:OCTX>
  <ats:INTT>0</ats:INTT>
  <ats:IITT>0</ats:IITT>
  <ats:ICLT>0</ats:ICLT>
  <ats:ICDDD>0</ats:ICDDD>
  <ats:ICIDD>0</ats:ICIDD>
  <ats:IOLT>0</ats:IOLT>
  <ats:CTLCO>1</ats:CTLCO>
  <ats:CTLCT>1</ats:CTLCT>
  <ats:CTLD>1</ats:CTLD>
  <ats:CTINTNANP>1</ats:CTINTNANP>
  <ats:CTINTWORLD>1</ats:CTINTWORLD>
  <ats:CTDA>1</ats:CTDA>
  <ats:CTOSM>1</ats:CTOSM>
  <ats:CTOSP>0</ats:CTOSP>
  <ats:CTOSP1>0</ats:CTOSP1>
  <ats:CCO1>0</ats:CCO1>
  <ats:CCO2>0</ats:CCO2>
  <ats:CCO3>0</ats:CCO3>
  <ats:CCO4>0</ats:CCO4>
  <ats:CCO5>0</ats:CCO5>
  <ats:CCO6>0</ats:CCO6>
  <ats:CCO7>0</ats:CCO7>
  <ats:CCO8>0</ats:CCO8>
  <ats:CCO9>0</ats:CCO9>
  <ats:CCO10>0</ats:CCO10>
  <ats:CCO11>0</ats:CCO11>
  <ats:CCO12>0</ats:CCO12>
  <ats:CCO13>0</ats:CCO13>
  <ats:CCO14>0</ats:CCO14>
  <ats:CCO15>0</ats:CCO15>
  <ats:CCO16>0</ats:CCO16>
  <ats:HIGHENTCO>0</ats:HIGHENTCO>
  <ats:OPERATOR>1</ats:OPERATOR>
  <ats:SUPYSRV>1</ats:SUPYSRV>
  <ats:IDDCI>1</ats:IDDCI>
  <ats:NTCI>1</ats:NTCI>
  <ats:LTCI>1</ats:LTCI>
  <ats:RSC>65535</ats:RSC>
  <ats:CIG>4294967295</ats:CIG>
  <ats:OUTRST>0</ats:OUTRST>
  <ats:INRST>0</ats:INRST>
  <ats:NOAT>20</ats:NOAT>
  <ats:VMAIND>65535</ats:VMAIND>
  <ats:VDMAIND>65535</ats:VDMAIND>
  <ats:TGRP>65534</ats:TGRP>
  <ats:TIDHLD>28</ats:TIDHLD>
  <ats:TIDCW>23</ats:TIDCW>
  <ats:SCF>0</ats:SCF>
  <ats:LMTGRP>65534</ats:LMTGRP>
  <ats:FLBGRP>65535</ats:FLBGRP>
  <ats:SLBGRP>65535</ats:SLBGRP>
  <ats:COP>0000</ats:COP>
  <ats:G711_64K_A_LAW>1</ats:G711_64K_A_LAW>
  <ats:G711_64K_U_LAW>1</ats:G711_64K_U_LAW>
  <ats:G722>1</ats:G722>
  <ats:G723>1</ats:G723>
  <ats:G726>1</ats:G726>
  <ats:G728>1</ats:G728>
  <ats:G729>1</ats:G729>
  <ats:CODEC_MP4A>1</ats:CODEC_MP4A>
  <ats:CODEC2833>1</ats:CODEC2833>
  <ats:CODEC2198>1</ats:CODEC2198>
  <ats:G726_40>1</ats:G726_40>
  <ats:G726_32>1</ats:G726_32>
  <ats:G726_24>1</ats:G726_24>
  <ats:G726_16>1</ats:G726_16>
  <ats:AMR>1</ats:AMR>
  <ats:CLEARMODE>1</ats:CLEARMODE>
  <ats:ILBC>1</ats:ILBC>
  <ats:SPEEX>1</ats:SPEEX>
  <ats:G729EV>1</ats:G729EV>
  <ats:EVRC>1</ats:EVRC>
  <ats:EVRCB>1</ats:EVRCB>
  <ats:H261>1</ats:H261>
  <ats:H263>1</ats:H263>
  <ats:CODEC_MP4V>1</ats:CODEC_MP4V>
  <ats:H264>1</ats:H264>
  <ats:T38>1</ats:T38>
  <ats:T120>1</ats:T120>
  <ats:G711A_VBD>1</ats:G711A_VBD>
  <ats:G711U_VBD>1</ats:G711U_VBD>
  <ats:G726_VBD>1</ats:G726_VBD>
  <ats:G726_40_VBD>1</ats:G726_40_VBD>
  <ats:G726_32_VBD>1</ats:G726_32_VBD>
  <ats:G726_24_VBD>1</ats:G726_24_VBD>
  <ats:G726_16_VBD>1</ats:G726_16_VBD>
  <ats:WIND_BAND_AMR>1</ats:WIND_BAND_AMR>
  <ats:GSM610>1</ats:GSM610>
  <ats:H263_2000>1</ats:H263_2000>
  <ats:BROADVOICE_32>1</ats:BROADVOICE_32>
  <ats:UNKNOWN_CODEC>1</ats:UNKNOWN_CODEC>
  <ats:ACODEC>255</ats:ACODEC>
  <ats:VCODEC>255</ats:VCODEC>
  <ats:POLIDX>255</ats:POLIDX>
  <ats:NCPI>255</ats:NCPI>
  <ats:ICPI>255</ats:ICPI>
  <ats:EBOCL>0</ats:EBOCL>
  <ats:EBOPL>0</ats:EBOPL>
  <ats:EBOIT>2</ats:EBOIT>
  <ats:RM>0</ats:RM>
  <ats:CPC>0</ats:CPC>
  <ats:PCHG>65535</ats:PCHG>
  <ats:TFPT>4</ats:TFPT>
  <ats:CHT>0</ats:CHT>
  <ats:MCIDMODE>0</ats:MCIDMODE>
  <ats:MCIDCMODE>255</ats:MCIDCMODE>
  <ats:MCIDAMODE>0</ats:MCIDAMODE>
  <ats:PREPAIDIDX>65535</ats:PREPAIDIDX>
  <ats:CRBTID>65535</ats:CRBTID>
  <ats:ODBBICTYPE>0</ats:ODBBICTYPE>
  <ats:ODBBOCTYPE>0</ats:ODBBOCTYPE>
  <ats:ODBBARTYPE>0</ats:ODBBARTYPE>
  <ats:ODBSS>0</ats:ODBSS>
  <ats:ODBBRCFTYPE>0</ats:ODBBRCFTYPE>
  <ats:PNOTI>0</ats:PNOTI>
  <ats:MAXPARACALL>1</ats:MAXPARACALL>
  <ats:ATSDTMBUSY>1</ats:ATSDTMBUSY>
  <ats:CALLCOUNT>1</ats:CALLCOUNT>
  <ats:CDNOTICALLER>0</ats:CDNOTICALLER>
  <ats:ISCHGFLAG>0</ats:ISCHGFLAG>
  <ats:CHC>0</ats:CHC>
  <ats:CUSER>0</ats:CUSER>
  <ats:STCF>0</ats:STCF>
  <ats:CHARSC>65535</ats:CHARSC>
  <ats:REGUIDX>0</ats:REGUIDX>
  <ats:SOCBFUNC>255</ats:SOCBFUNC>
  <ats:SOCBPTONEIDX>65535</ats:SOCBPTONEIDX>
  <ats:ADMINCBA>0</ats:ADMINCBA>
  <ats:ADCONTROL_DIVERSION>0</ats:ADCONTROL_DIVERSION>
  <ats:CPCRUS>255</ats:CPCRUS>
  <ats:CUSCAT>0</ats:CUSCAT>
  <ats:SPT100REL>1</ats:SPT100REL>
</ats:ADD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Remove Sbr (RMV SBR)
        /// </summary>
        private static XmlDocument RmvSbrSoapEnvelopeXml(string service, int messageId)
        {
            string impu, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
 
            xmlContent = @"
      <ats:RMV_SBR>
         <ats:IMPU>" + impu + @"</ats:IMPU>
      </ats:RMV_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr Abbriviated Calling (MOD SBR NSABRC)
        /// </summary>
        private static XmlDocument ModSbrNsabrcSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NSABRC>" + i + @"</ats:NSABRC>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr Caller Id (MOD SBR NSCLIP)
        /// </summary>
        private static XmlDocument ModSbrNsclipSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NSCLIP>" + i + @"</ats:NSCLIP>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr Call Forwarding (MOD SBR NSCFU)
        /// </summary>
        private static XmlDocument ModSbrNscfuSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NSCFU>" + i + @"</ats:NSCFU>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr Call Waiting (MOD SBR NSCW)
        /// </summary>
        private static XmlDocument ModSbrNscwSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NSCW>" + i + @"</ats:NSCW>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr Conference Call (MOD SBR NS3PTY)
        /// </summary>
        private static XmlDocument ModSbrNs3ptySoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NS3PTY>" + i + @"</ats:NS3PTY>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr Wakeup Call (MOD SBR NSWAKE_UP)
        /// </summary>
        private static XmlDocument ModSbrNswakeupSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NSWAKE_UP>" + i + @"</ats:NSWAKE_UP>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr International Calling User Controlled (MOD SBR ITT)
        /// </summary>
        private static XmlDocument ModSbrIttSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:ITT>" + i + @"</ats:ITT>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Modify Sbr International Calling (MOD SBR NSCBA)
        /// </summary>
        private static XmlDocument ModSbrNscbaSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 1 : 0;
 
            xmlContent = @"
      <ats:MOD_SBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:NSCBA>" + i + @"</ats:NSCBA>
      </ats:MOD_SBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// Set Owed Restrict (SET OWSBR)
        /// 
        /// Function
        /// This command is used to set the owing status of a subscriber. When a subscriber originates or receives a call, the system checks the configuration of User status and determines whether to restrict and how to restrict the call.
        /// 
        /// Parameter Description
        /// IMPU: sip:+96522904211@ims.moc.kw
        /// US: User Stat: It specifies the owing status of a subscriber.
        /// 
        /// Options:
        /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
        /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
        /// 2: INOWN(INOWN): The subscriber is forbidden to answer calls but can originate calls.
        /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
        /// </summary>
        private static XmlDocument SetOwSbrSoapEnvelopeXml(string service, bool state, int messageId)
        {
            int i;
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            i = (state) ? 3 : 0;
 
            xmlContent = @"
      <ats:SET_OWSBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:US>" + i + @"</ats:US>
      </ats:SET_OWSBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// List Owed Restrict (LST OWSBR)
        /// 
        /// Function
        /// This command is used to list the owing status of a subscriber.
        /// 
        /// Parameter Description
        /// IMPU: here you will write the subscriber number in sip format, for example the number is (22904211)
        /// IMPU: sip:+96522904211@ims.moc.kw
        /// US: User Stat: It specifies the owing status of a subscriber.
        /// 
        /// Options:
        /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
        /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
        /// 2: INOWN(INOWN): The subscriber is forbidden to answer calls but can originate calls.
        /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
        /// </summary>
        private static XmlDocument LstOwSbrSoapEnvelopeXml(string service, int messageId)
        {
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:LST_OWSBR>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
      </ats:LST_OWSBR>
";
 
            soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// RMV HSUB
        /// 
        /// RMV HSUB: SUBID="+96522220000@ims.moc.kw";
        /// </summary>
        private static XmlDocument RmvHsubSoapEnvelopeXml(string service, int messageId)
        {
            string subid, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            subid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.SubId(service);
 
            xmlContent = @"
      <ats:RMV_HSUB>
         <ats:SUBID>" + subid + @"</ats:SUBID>
      </ats:RMV_HSUB>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// RMV HSDAINF
        /// 
        /// RMV HSDAINF: IMPI="+96522220000@ims.moc.kw";
        /// </summary>
        private static XmlDocument RmvHsdainfSoapEnvelopeXml(string service, int messageId)
        {
            string impi, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
 
            xmlContent = @"
      <ats:RMV_HSDAINF>
         <ats:IMPI>" + impi + @"</ats:IMPI>
      </ats:RMV_HSDAINF>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// ADD DNAPTRREC
        /// 
        /// ADD DNAPTRREC: NAME="0.0.0.0.2.2.2.2.5.6.9.e164.arpa", ZONENAME="5.6.9.e164.arpa", ORDER=0, PREFERENCE=10, FLAGS="U", SERVICE="E2U+sip", REGEXP="!^..*$!sip:+96522220000@ims.moc.kw!", REPLACEMENT="ims.moc.kw.";
        /// </summary>
        private static XmlDocument AddDnaptrrecSoapEnvelopeXml(string service, int messageId)
        {
            string name, impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            name = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.E164ProtocolUserNumber(service);
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:ADD_DNAPTRREC>
         <ats:NAME>" + name + @"</ats:NAME>
         <ats:ZONENAME>5.6.9.e164.arpa</ats:ZONENAME>
         <ats:ORDER>0</ats:ORDER>
         <ats:PREFERENCE>10</ats:PREFERENCE>
         <ats:FLAGS>U</ats:FLAGS>
         <ats:SERVICE>E2U+sip</ats:SERVICE>
         <ats:REGEXP>!^..*$!" + impuSipDomain + @"!</ats:REGEXP>
         <ats:REPLACEMENT>ims.moc.kw.</ats:REPLACEMENT>
      </ats:ADD_DNAPTRREC>
";
 
            soapEnvelopeXml = TecensSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// ADD HSIFC
        /// 
        /// ADD HSIFC:IMPU="sip:+96522220000@ims.moc.kw",SIFCID=1;
        /// </summary>
        private static XmlDocument AddHsifcSoapEnvelopeXml(string service, int messageId)
        {
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:ADD_HSIFC>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:SIFCID>1</ats:SIFCID>
      </ats:ADD_HSIFC>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// ADD HIMPU
        /// 
        /// ADD HIMPU:IMPI="+96522220000@ims.moc.kw",IMPU="tel:+96522220000";
        /// </summary>
        private static XmlDocument AddHimpuSoapEnvelopeXml(string service, int messageId)
        {
            string impi, impu, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
            impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
 
            xmlContent = @"
      <ats:ADD_HIMPU>
         <ats:IMPI>" + impi + @"</ats:IMPI>
         <ats:IMPU>" + impu + @"</ats:IMPU>
      </ats:ADD_HIMPU>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// ADD HSUB
        /// 
        /// ADD HSUB:SUBID="+96522220000@ims.moc.kw",IMPI="+96522220000@ims.moc.kw",IMPU="sip:+96522220000@ims.moc.kw";
        /// </summary>
        private static XmlDocument AddHsubSoapEnvelopeXml(string service, int messageId)
        {
            string impi, impuSipDomain, subid, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
            subid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.SubId(service);
 
            xmlContent = @"
      <ats:ADD_HSUB>
         <ats:SUBID>" + subid + @"</ats:SUBID>
         <ats:IMPI>" + impi + @"</ats:IMPI>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
      </ats:ADD_HSUB>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// ADD HSDAINF
        /// 
        /// ADD HSDAINF:IMPI="+96522220000@ims.moc.kw",HUSERNAME="+96522220000@ims.moc.kw",PWD=admin,REALM="ims.moc.kw";
        /// </summary>
        private static XmlDocument AddHsdainfSoapEnvelopeXml(string service, int messageId)
        {
            string impi, husername, pwd, realm, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
            husername = impi;
            pwd = "admin";
            realm = "ims.moc.kw";
 
            xmlContent = @"
      <ats:ADD_HSDAINF>
         <ats:IMPI>" + impi + @"</ats:IMPI>
         <ats:HUSERNAME>" + husername + @"</ats:HUSERNAME>
         <ats:PWD>" + pwd + @"</ats:PWD>
         <ats:REALM>" + realm + @"</ats:REALM>
      </ats:ADD_HSDAINF>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HREGAUTH
        /// 
        /// SET HREGAUTH:IMPU="sip:+96522220000@ims.moc.kw",REGAUTH=TRUE;
        /// </summary>
        private static XmlDocument SetHregauthSoapEnvelopeXml(string service, int messageId)
        {
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:SET_HREGAUTH>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:REGAUTH>TRUE</ats:REGAUTH>
      </ats:SET_HREGAUTH>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HVNTPLID
        /// 
        /// SET HVNTPLID: IMPU="sip:+96522220000@ims.moc.kw", VNTPLID=0;
        /// </summary>
        private static XmlDocument SetHvntplidForImpuSipDomainSoapEnvelopeXml(string service, int messageId)
        {
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:SET_HVNTPLID>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:VNTPLID>0</ats:VNTPLID>
      </ats:SET_HVNTPLID>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HVNTPLID
        /// 
        /// SET HVNTPLID: IMPU="tel:+96522220000", VNTPLID=0;
        /// </summary>
        private static XmlDocument SetHvntplidForImpuSoapEnvelopeXml(string service, int messageId)
        {
            string impu, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
 
            xmlContent = @"
      <ats:SET_HVNTPLID>
         <ats:IMPU>" + impu + @"</ats:IMPU>
         <ats:VNTPLID>0</ats:VNTPLID>
      </ats:SET_HVNTPLID>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HIRS
        /// 
        /// SET HIRS:IRSID=1,IMPULIST="\"sip:+96522220000@ims.moc.kw\"&\"tel:+96522220000\""; 
        /// </summary>
        private static XmlDocument SetHirsSoapEnvelopeXml(string service, int messageId)
        {
            string impu, impuSipDomain, impuList, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            // Copy in SetHaliaspuSoapEnvelopeXml and SetHirsSoapEnvelopeXml
            //impuList = @"""" + impuSipDomain + @"""&""" + impu + @"""";
            impuList = @"""" + impuSipDomain + @"""&amp;""" + impu + @"""";
            //impuList = impuSipDomain + @"&amp;" + impu;
 
            xmlContent = @"
      <ats:SET_HIRS>
         <ats:IMPULIST>" + impuList + @"</ats:IMPULIST>
         <ats:IRSID>1</ats:IRSID>
      </ats:SET_HIRS>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HDEFIMPU
        /// 
        /// SET HDEFIMPU: IRSID=1, IMPU="sip:+96522220000@ims.moc.kw";
        /// </summary>
        private static XmlDocument SetHdefimpuSoapEnvelopeXml(string service, int messageId)
        {
            string impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:SET_HDEFIMPU>
         <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
         <ats:IRSID>1</ats:IRSID>
      </ats:SET_HDEFIMPU>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HSPSHARE
        /// 
        /// SET HSPSHARE:BASEIMPU="sip:+96522220000@ims.moc.kw",IMPU="tel:+96522220000";
        /// </summary>
        private static XmlDocument SetHspshareSoapEnvelopeXml(string service, int messageId)
        {
            string impu, impuSipDomain, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            xmlContent = @"
      <ats:SET_HSPSHARE>
         <ats:IMPU>" + impu + @"</ats:IMPU>
         <ats:BASEIMPU>" + impuSipDomain + @"</ats:BASEIMPU>
      </ats:SET_HSPSHARE>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// SET HALIASPU
        /// 
        /// SET HALIASPU:ALIASID=1,IMPULIST="\"sip:+96522220000@ims.moc.kw\"&\"tel:+96522220000\"";
        /// </summary>
        private static XmlDocument SetHaliaspuSoapEnvelopeXml(string service, int messageId)
        {
            string impu, impuSipDomain, impuList, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
            impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 
            // Copy in SetHaliaspuSoapEnvelopeXml and SetHirsSoapEnvelopeXml
            //impuList = @"""" + impuSipDomain + @"""&""" + impu + @"""";
            impuList = @"""" + impuSipDomain + @"""&amp;""" + impu + @"""";
            //impuList = impuSipDomain + @"&amp;" + impu;
 
            xmlContent = @"
      <ats:SET_HALIASPU>
         <ats:IMPULIST>" + impuList + @"</ats:IMPULIST>
         <ats:ALIASID>1</ats:ALIASID>
      </ats:SET_HALIASPU>
";
 
            soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        /// RMV DNAPTRREC
        /// 
        /// RMV DNAPTRREC: NAME="0.0.0.0.2.2.2.2.5.6.9.e164.arpa";
        /// </summary>
        private static XmlDocument RmvDnaptrrecSoapEnvelopeXml(string service, int messageId)
        {
            string name, xmlContent;
            XmlDocument soapEnvelopeXml;
 
            name = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.E164ProtocolUserNumber(service);
 
            xmlContent = @"
      <ats:RMV_DNAPTRREC>
         <ats:NAME>" + name + @"</ats:NAME>
      </ats:RMV_DNAPTRREC>
";
 
            soapEnvelopeXml = TecensSoapEnvelopeXml(xmlContent, messageId);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private static XmlDocument TechssSoapEnvelopeXml(string xmlBodyContent, int messageId)
        {
            return SoapEnvelopeXml("techss", xmlBodyContent, messageId);
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private static XmlDocument Tecats0SoapEnvelopeXml(string xmlBodyContent, int messageId)
        {
            return SoapEnvelopeXml("tecats0", xmlBodyContent, messageId);
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private static XmlDocument TecensSoapEnvelopeXml(string xmlBodyContent, int messageId)
        {
            return SoapEnvelopeXml("tecens", xmlBodyContent, messageId);
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private static XmlDocument SoapEnvelopeXml(string meName, string xmlBodyContent, int messageId)
        {
            string s, userName, password;
            XmlDocument soapEnvelopeXml = new XmlDocument();
 
            userName = Ia.Ngn.Cl.Model.Business.Huawei.Ims.UserName;
            password = Ia.Ngn.Cl.Model.Business.Huawei.Ims.Password;
 
            s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
<soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:ats=""http://www.huawei.com/ATS"" >
    <soap-env:Header>
        <ats:MessageID>" + messageId + @"</ats:MessageID>
        <ats:MEName>" + meName + @"</ats:MEName>
        <ats:Authentication>
            <ats:Username>" + userName + @"</ats:Username>
            <ats:Password>" + password + @"</ats:Password>
        </ats:Authentication>
    </soap-env:Header>
    <soap-env:Body>" + xmlBodyContent + @"</soap-env:Body>
</soap-env:Envelope>";
 
            soapEnvelopeXml.LoadXml(s);
 
            return soapEnvelopeXml;
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private void SendSoapRequestAndReadResponse(XmlDocument soapEnvelopeXml, out XmlDocument soapResultXmlDocument)
        {
            string url, soapAction;
            string soapResult;
            HttpWebRequest request;
 
            //sessionId = string.Empty;
            soapResultXmlDocument = new XmlDocument();
 
            url = Ia.Ngn.Cl.Model.Business.Huawei.Ims.BaseAddress + "/" + Ia.Ngn.Cl.Model.Business.Huawei.Ims.ServiceUrl;
            soapAction = "ATSV100R003C01SPC100";
 
            request = (HttpWebRequest)WebRequest.Create(url);
 
            request.Headers.Add(@"SOAP:" + soapAction);
            request.ContentType = "text/xml;charset=utf-8";
            request.Accept = "text/xml";
            request.Method = "POST";
 
            byte[] bytes;
            bytes = System.Text.Encoding.ASCII.GetBytes(soapEnvelopeXml.OuterXml);
            request.ContentLength = bytes.Length;
 
            try
            {
                using (Stream stream = request.GetRequestStream())
                {
                    stream.Write(bytes, 0, bytes.Length);
                    //soapEnvelopeXml.Save(stream);
                }
 
                using (WebResponse response = request.GetResponse())
                {
                    using (StreamReader rd = new StreamReader(response.GetResponseStream()))
                    {
                        soapResult = rd.ReadToEnd();
 
                        soapResultXmlDocument.LoadXml(soapResult);
                    }
                }
            }
            catch (Exception)
            {
            }
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
        {
            ParseSoapResultXml(soapResultXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode, out List<Dictionary<string, string>> parameterDictionaryList)
        {
            string resultDescription;
            Dictionary<string, string> parameterDictionary;
            XmlNode resultXmlNode, itemXmlNode;
 
            XmlNamespaceManager ns = new XmlNamespaceManager(soapResultXmlDocument.NameTable);
            ns.AddNamespace("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/");
            ns.AddNamespace("ns1", "http://www.huawei.com/ATS");
 
            parameterDictionary = new Dictionary<string, string>();
            parameterDictionaryList = new List<Dictionary<string, string>>(32);
 
            if (soapResultXmlDocument.DocumentElement != null)
            {
                resultXmlNode = soapResultXmlDocument.DocumentElement.SelectSingleNode("SOAP-ENV:Body/*/ns1:Result", ns);
 
                if (resultXmlNode != null && resultXmlNode.HasChildNodes)
                {
                    if (resultXmlNode["ns1:ResultCode"] != null) resultCode = (Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode)int.Parse(resultXmlNode["ns1:ResultCode"].InnerText);
                    else if (resultXmlNode["ResultCode"] != null) resultCode = (Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode)int.Parse(resultXmlNode["ResultCode"].InnerText);
                    else resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
 
                    if (resultXmlNode["ns1:ResultDesc"] != null) resultDescription = resultXmlNode["ns1:ResultDesc"].InnerText;
                    else if (resultXmlNode["ResultDesc"] != null) resultDescription = resultXmlNode["ResultDesc"].InnerText;
                    else resultDescription = string.Empty;
 
                    if (resultCode != Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed && resultDescription != string.Empty)
                    {
                        //System.Diagnostics.Debug.WriteLine(resultCode + ": " + resultDescription);
 
                        if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
                        {
                            itemXmlNode = soapResultXmlDocument.DocumentElement.SelectSingleNode("SOAP-ENV:Body/*/ns1:Result/ns1:ResultData/ns1:Table1/ns1:Item", ns);
 
                            if (itemXmlNode != null && itemXmlNode.HasChildNodes)
                            {
                                parameterDictionary = CollectXmlNodeChildNodesValuesIntoDictionary(itemXmlNode, "ns1:");
 
                                parameterDictionaryList.Add(parameterDictionary);
                            }
                        }
                        else
                        {
 
                        }
                    }
                    else
                    {
                        resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
                    }
                }
                else
                {
                    resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
                }
            }
            else
            {
                resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
            }
        }
 
        ////////////////////////////////////////////////////////////////////////////
 
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private Dictionary<string, string> CollectXmlNodeChildNodesValuesIntoDictionary(XmlNode xn, string prefixToRemove)
        {
            string name;
            Dictionary<string, string> parameterDictionary;
 
            parameterDictionary = new Dictionary<string, string>();
 
            foreach (XmlElement xe in xn.ChildNodes)
            {
                name = xe.Name.Replace(prefixToRemove, "");
 
                // below: if the node has children(?) we will treat it as an XDocument and add its name to a top level tag
                if (xe.ChildNodes.Count > 1) parameterDictionary.Add(name, xe.OuterXml);
                else parameterDictionary.Add(name, xe.InnerText);
            }
 
            return parameterDictionary;
        }
 
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////
    }
 
    ////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////
}