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

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 Management Intranet Portal (OFN) client support class for Huawei's Next Generation Network (NGN) 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 Management Intranet Portal (OFN) client support class for Huawei's Next Generation Network (NGN) client model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet 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:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 639:          }
 640:   
 641:          ////////////////////////////////////////////////////////////////////////////
 642:   
 643:          /// <summary>
 644:          ///
 645:          /// </summary>
 646:          public void RmvSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 647:          {
 648:              SendSoapRequestAndReadResponse(RmvSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 649:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 650:          }
 651:   
 652:          ////////////////////////////////////////////////////////////////////////////
 653:          ////////////////////////////////////////////////////////////////////////////
 654:   
 655:          /// <summary>
 656:          ///
 657:          /// </summary>
 658:          public void ModSbrNsabrc(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 659:          {
 660:              SendSoapRequestAndReadResponse(ModSbrNsabrcSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 661:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 662:          }
 663:   
 664:          ////////////////////////////////////////////////////////////////////////////
 665:   
 666:          /// <summary>
 667:          ///
 668:          /// </summary>
 669:          public void ModSbrNsclip(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 670:          {
 671:              SendSoapRequestAndReadResponse(ModSbrNsclipSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 672:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 673:          }
 674:   
 675:          ////////////////////////////////////////////////////////////////////////////
 676:   
 677:          /// <summary>
 678:          ///
 679:          /// </summary>
 680:          public void ModSbrNscfu(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 681:          {
 682:              SendSoapRequestAndReadResponse(ModSbrNscfuSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 683:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 684:          }
 685:   
 686:          ////////////////////////////////////////////////////////////////////////////
 687:   
 688:          /// <summary>
 689:          ///
 690:          /// </summary>
 691:          public void ModSbrNscw(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 692:          {
 693:              SendSoapRequestAndReadResponse(ModSbrNscwSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 694:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 695:          }
 696:   
 697:          ////////////////////////////////////////////////////////////////////////////
 698:   
 699:          /// <summary>
 700:          ///
 701:          /// </summary>
 702:          public void ModSbrNs3pty(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 703:          {
 704:              SendSoapRequestAndReadResponse(ModSbrNs3ptySoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 705:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 706:          }
 707:   
 708:          ////////////////////////////////////////////////////////////////////////////
 709:   
 710:          /// <summary>
 711:          ///
 712:          /// </summary>
 713:          public void ModSbrNswakeup(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 714:          {
 715:              SendSoapRequestAndReadResponse(ModSbrNswakeupSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 716:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 717:          }
 718:   
 719:          ////////////////////////////////////////////////////////////////////////////
 720:   
 721:          /// <summary>
 722:          ///
 723:          /// </summary>
 724:          public void ModSbrItt(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 725:          {
 726:              SendSoapRequestAndReadResponse(ModSbrIttSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 727:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 728:          }
 729:   
 730:          ////////////////////////////////////////////////////////////////////////////
 731:   
 732:          /// <summary>
 733:          ///
 734:          /// </summary>
 735:          public void ModSbrNscba(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 736:          {
 737:              SendSoapRequestAndReadResponse(ModSbrNscbaSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 738:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 739:          }
 740:   
 741:          ////////////////////////////////////////////////////////////////////////////
 742:   
 743:          /// <summary>
 744:          ///
 745:          /// </summary>
 746:          public void SetOwSbr(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 747:          {
 748:              SendSoapRequestAndReadResponse(SetOwSbrSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 749:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 750:          }
 751:   
 752:          ////////////////////////////////////////////////////////////////////////////
 753:   
 754:          /// <summary>
 755:          ///
 756:          /// </summary>
 757:          public Ia.Ngn.Cl.Model.Huawei.Owsbr LstOwSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 758:          {
 759:              Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr;
 760:   
 761:              SendSoapRequestAndReadResponse(LstOwSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 762:   
 763:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
 764:   
 765:              if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
 766:              {
 767:                  owsbr = Ia.Ngn.Cl.Model.Business.Huawei.Owsbr.ParseFromDictionary(parameterDictionaryList[0]);
 768:              }
 769:              else owsbr = null;
 770:   
 771:              return owsbr;
 772:          }
 773:   
 774:          ////////////////////////////////////////////////////////////////////////////
 775:          ////////////////////////////////////////////////////////////////////////////
 776:   
 777:          /// <summary>
 778:          ///
 779:          /// </summary>
 780:          public void RmvHsub(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 781:          {
 782:              SendSoapRequestAndReadResponse(RmvHsubSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 783:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 784:          }
 785:   
 786:          ////////////////////////////////////////////////////////////////////////////
 787:   
 788:          /// <summary>
 789:          ///
 790:          /// </summary>
 791:          public void RmvHsdainf(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 792:          {
 793:              SendSoapRequestAndReadResponse(RmvHsdainfSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 794:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 795:          }
 796:   
 797:          ////////////////////////////////////////////////////////////////////////////
 798:   
 799:          /// <summary>
 800:          ///
 801:          /// </summary>
 802:          public void AddDnaptrrec(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 803:          {
 804:              SendSoapRequestAndReadResponse(AddDnaptrrecSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 805:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 806:          }
 807:   
 808:          ////////////////////////////////////////////////////////////////////////////
 809:   
 810:          /// <summary>
 811:          ///
 812:          /// </summary>
 813:          public void AddHsifc(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 814:          {
 815:              SendSoapRequestAndReadResponse(AddHsifcSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 816:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 817:          }
 818:   
 819:          ////////////////////////////////////////////////////////////////////////////
 820:   
 821:          /// <summary>
 822:          ///
 823:          /// </summary>
 824:          public void AddHimpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 825:          {
 826:              SendSoapRequestAndReadResponse(AddHimpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 827:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 828:          }
 829:   
 830:          ////////////////////////////////////////////////////////////////////////////
 831:   
 832:          /// <summary>
 833:          ///
 834:          /// </summary>
 835:          public void AddHsub(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 836:          {
 837:              SendSoapRequestAndReadResponse(AddHsubSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 838:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 839:          }
 840:   
 841:          ////////////////////////////////////////////////////////////////////////////
 842:   
 843:          /// <summary>
 844:          ///
 845:          /// </summary>
 846:          public void AddHsdainf(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 847:          {
 848:              SendSoapRequestAndReadResponse(AddHsdainfSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 849:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 850:          }
 851:   
 852:          ////////////////////////////////////////////////////////////////////////////
 853:   
 854:          /// <summary>
 855:          ///
 856:          /// </summary>
 857:          public void SetHregauth(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 858:          {
 859:              SendSoapRequestAndReadResponse(SetHregauthSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 860:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 861:          }
 862:   
 863:          ////////////////////////////////////////////////////////////////////////////
 864:   
 865:          /// <summary>
 866:          ///
 867:          /// </summary>
 868:          public void SetHvntplidForImpuSipDomain(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 869:          {
 870:              SendSoapRequestAndReadResponse(SetHvntplidForImpuSipDomainSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 871:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 872:          }
 873:   
 874:          ////////////////////////////////////////////////////////////////////////////
 875:   
 876:          /// <summary>
 877:          ///
 878:          /// </summary>
 879:          public void SetHvntplidForImpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 880:          {
 881:              SendSoapRequestAndReadResponse(SetHvntplidForImpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 882:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 883:          }
 884:   
 885:          ////////////////////////////////////////////////////////////////////////////
 886:   
 887:          /// <summary>
 888:          ///
 889:          /// </summary>
 890:          public void SetHirs(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 891:          {
 892:              SendSoapRequestAndReadResponse(SetHirsSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 893:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 894:          }
 895:   
 896:          ////////////////////////////////////////////////////////////////////////////
 897:   
 898:          /// <summary>
 899:          ///
 900:          /// </summary>
 901:          public void SetHdefimpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 902:          {
 903:              SendSoapRequestAndReadResponse(SetHdefimpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 904:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 905:          }
 906:   
 907:          ////////////////////////////////////////////////////////////////////////////
 908:   
 909:          /// <summary>
 910:          ///
 911:          /// </summary>
 912:          public void SetHspshare(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 913:          {
 914:              SendSoapRequestAndReadResponse(SetHspshareSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 915:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 916:          }
 917:   
 918:          ////////////////////////////////////////////////////////////////////////////
 919:   
 920:          /// <summary>
 921:          ///
 922:          /// </summary>
 923:          public void SetHaliaspu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 924:          {
 925:              SendSoapRequestAndReadResponse(SetHaliaspuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 926:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 927:          }
 928:   
 929:          ////////////////////////////////////////////////////////////////////////////
 930:   
 931:          /// <summary>
 932:          ///
 933:          /// </summary>
 934:          public void RmvDnaptrrec(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 935:          {
 936:              SendSoapRequestAndReadResponse(RmvDnaptrrecSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 937:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 938:          }
 939:   
 940:          ////////////////////////////////////////////////////////////////////////////
 941:          ////////////////////////////////////////////////////////////////////////////
 942:   
 943:          /// <summary>
 944:          /// List Sbr (LST SBR)
 945:          /// </summary>
 946:          private static XmlDocument LstSbrSoapEnvelopeXml(string service, int messageId)
 947:          {
 948:              string impuSipDomain, xmlContent;
 949:              XmlDocument soapEnvelopeXml;
 950:   
 951:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 952:   
 953:              xmlContent = @"
 954:        <ats:LST_SBR>
 955:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
 956:        </ats:LST_SBR>
 957:  ";
 958:   
 959:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 960:   
 961:              return soapEnvelopeXml;
 962:          }
 963:   
 964:          ////////////////////////////////////////////////////////////////////////////
 965:          ////////////////////////////////////////////////////////////////////////////
 966:   
 967:          /// <summary>
 968:          /// Add Sbr (ADD SBR)
 969:          /// </summary>
 970:          private static XmlDocument AddSbrSoapEnvelopeXml(string service, int messageId)
 971:          {
 972:              string impuSipDomain, xmlContent;
 973:              XmlDocument soapEnvelopeXml;
 974:   
 975:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 976:   
 977:              xmlContent = @"
 978:  <ats:ADD_SBR>
 979:    <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
 980:    <ats:TEMPLATEIDX>65535</ats:TEMPLATEIDX>
 981:    <ats:DSPIDX>65534</ats:DSPIDX>
 982:    <ats:LP>0</ats:LP>
 983:    <ats:CSC>0</ats:CSC>
 984:    <ats:UTYPE>1</ats:UTYPE>
 985:    <ats:VCCFLAG>0</ats:VCCFLAG>
 986:    <ats:VTFLAG>0</ats:VTFLAG>
 987:    <ats:NSCFU>0</ats:NSCFU>
 988:    <ats:NSCFUVM>0</ats:NSCFUVM>
 989:    <ats:NSCFB>0</ats:NSCFB>
 990:    <ats:NSCFBVM>0</ats:NSCFBVM>
 991:    <ats:NSCFNR>0</ats:NSCFNR>
 992:    <ats:NSCFNRVM>0</ats:NSCFNRVM>
 993:    <ats:NSCFNL>0</ats:NSCFNL>
 994:    <ats:NSCFNLVM>0</ats:NSCFNLVM>
 995:    <ats:NSCD>0</ats:NSCD>
 996:    <ats:NSCDVM>0</ats:NSCDVM>
 997:    <ats:NSCFNRC>0</ats:NSCFNRC>
 998:    <ats:NSCFNRCVM>0</ats:NSCFNRCVM>
 999:    <ats:NSCLIP>0</ats:NSCLIP>
1000:    <ats:NSCIDCW>0</ats:NSCIDCW>
1001:    <ats:NSRIO>0</ats:NSRIO>
1002:    <ats:NSCNIP>0</ats:NSCNIP>
1003:    <ats:NSCLIR>0</ats:NSCLIR>
1004:    <ats:NSRIP>0</ats:NSRIP>
1005:    <ats:NSCNIR>0</ats:NSCNIR>
1006:    <ats:NSRID>0</ats:NSRID>
1007:    <ats:NSNRID>0</ats:NSNRID>
1008:    <ats:NSRND>0</ats:NSRND>
1009:    <ats:NSNRND>0</ats:NSNRND>
1010:    <ats:NSCW>0</ats:NSCW>
1011:    <ats:NSCCW>0</ats:NSCCW>
1012:    <ats:NSOIP>0</ats:NSOIP>
1013:    <ats:NSACRM>0</ats:NSACRM>
1014:    <ats:NSGOIR>0</ats:NSGOIR>
1015:    <ats:NSMOIR>0</ats:NSMOIR>
1016:    <ats:NSTIP>0</ats:NSTIP>
1017:    <ats:NSTIR>0</ats:NSTIR>
1018:    <ats:NSOTIR>0</ats:NSOTIR>
1019:    <ats:NSCLIPNOSCREENING>0</ats:NSCLIPNOSCREENING>
1020:    <ats:NSCR>0</ats:NSCR>
1021:    <ats:NSWAKE_UP>0</ats:NSWAKE_UP>
1022:    <ats:NSAOC_D>0</ats:NSAOC_D>
1023:    <ats:NSAOC_E>0</ats:NSAOC_E>
1024:    <ats:NSXEXH>0</ats:NSXEXH>
1025:    <ats:NSXEGJ>0</ats:NSXEGJ>
1026:    <ats:NSCWCFNR>0</ats:NSCWCFNR>
1027:    <ats:NSIIFC>0</ats:NSIIFC>
1028:    <ats:NSDN_CALL_OUT_BAR>0</ats:NSDN_CALL_OUT_BAR>
1029:    <ats:NSCCBS>0</ats:NSCCBS>
1030:    <ats:NSCCNR>0</ats:NSCCNR>
1031:    <ats:NSCCBSR>0</ats:NSCCBSR>
1032:    <ats:NSCCNRR>0</ats:NSCCNRR>
1033:    <ats:NS3PTY>0</ats:NS3PTY>
1034:    <ats:NSNPTY>0</ats:NSNPTY>
1035:    <ats:NSDND>0</ats:NSDND>
1036:    <ats:NSMCR>0</ats:NSMCR>
1037:    <ats:NSCBA>0</ats:NSCBA>
1038:    <ats:NSTMP_LIN>0</ats:NSTMP_LIN>
1039:    <ats:NSCODEC_CNTRL>0</ats:NSCODEC_CNTRL>
1040:    <ats:NSMWI>0</ats:NSMWI>
1041:    <ats:NSDC>0</ats:NSDC>
1042:    <ats:NSHOLD>0</ats:NSHOLD>
1043:    <ats:NSECT>0</ats:NSECT>
1044:    <ats:NSCFTB>0</ats:NSCFTB>
1045:    <ats:NSDAN>0</ats:NSDAN>
1046:    <ats:NSSTOP_SECRET>0</ats:NSSTOP_SECRET>
1047:    <ats:NSMCID>0</ats:NSMCID>
1048:    <ats:NSEBO>0</ats:NSEBO>
1049:    <ats:NSICO>0</ats:NSICO>
1050:    <ats:NSOUTG>0</ats:NSOUTG>
1051:    <ats:NSINQYH>0</ats:NSINQYH>
1052:    <ats:NSUINFO>0</ats:NSUINFO>
1053:    <ats:NSDN_CALL_OUT_ALLOW>0</ats:NSDN_CALL_OUT_ALLOW>
1054:    <ats:NSSIC>0</ats:NSSIC>
1055:    <ats:NSSOC>0</ats:NSSOC>
1056:    <ats:NSSETCFNRTIME>0</ats:NSSETCFNRTIME>
1057:    <ats:NSCFS>0</ats:NSCFS>
1058:    <ats:NSCFSB>0</ats:NSCFSB>
1059:    <ats:NSFAX>0</ats:NSFAX>
1060:    <ats:NSABRC>0</ats:NSABRC>
1061:    <ats:NSACRTOVM>0</ats:NSACRTOVM>
1062:    <ats:NSPREPAID>0</ats:NSPREPAID>
1063:    <ats:NSCRBT>0</ats:NSCRBT>
1064:    <ats:NSICB>0</ats:NSICB>
1065:    <ats:NSMRINGING>0</ats:NSMRINGING>
1066:    <ats:NSCIS>0</ats:NSCIS>
1067:    <ats:NSCBEG>0</ats:NSCBEG>
1068:    <ats:NSCOLP>0</ats:NSCOLP>
1069:    <ats:NSCOLR>0</ats:NSCOLR>
1070:    <ats:NSCOLPOVR>0</ats:NSCOLPOVR>
1071:    <ats:NSBAOC>0</ats:NSBAOC>
1072:    <ats:NSBOIC>0</ats:NSBOIC>
1073:    <ats:NSBOICEXHC>0</ats:NSBOICEXHC>
1074:    <ats:NSBAIC>0</ats:NSBAIC>
1075:    <ats:NSBICROM>0</ats:NSBICROM>
1076:    <ats:NSSPEED_DIAL>0</ats:NSSPEED_DIAL>
1077:    <ats:NSSD1D>0</ats:NSSD1D>
1078:    <ats:NSSD2D>0</ats:NSSD2D>
1079:    <ats:NSGRNCALL>0</ats:NSGRNCALL>
1080:    <ats:NSCPARK>0</ats:NSCPARK>
1081:    <ats:NSGAA>0</ats:NSGAA>
1082:    <ats:NSQSNS>0</ats:NSQSNS>
1083:    <ats:NSMSN>0</ats:NSMSN>
1084:    <ats:NSHOTLINE>0</ats:NSHOTLINE>
1085:    <ats:NSAOC_S>0</ats:NSAOC_S>
1086:    <ats:NSNIGHTSRV>0</ats:NSNIGHTSRV>
1087:    <ats:NSBACKNUM>0</ats:NSBACKNUM>
1088:    <ats:NSAUTOCON>0</ats:NSAUTOCON>
1089:    <ats:NSCAMPON>0</ats:NSCAMPON>
1090:    <ats:NSCTD>0</ats:NSCTD>
1091:    <ats:NSCLICKHOLD>0</ats:NSCLICKHOLD>
1092:    <ats:NSQUEUE>0</ats:NSQUEUE>
1093:    <ats:NSSANSWER>0</ats:NSSANSWER>
1094:    <ats:NSICENCF>0</ats:NSICENCF>
1095:    <ats:NSCFGO>0</ats:NSCFGO>
1096:    <ats:NSCECT>0</ats:NSCECT>
1097:    <ats:NSCTGO>0</ats:NSCTGO>
1098:    <ats:NSCTIO>0</ats:NSCTIO>
1099:    <ats:NSSETBUSY>0</ats:NSSETBUSY>
1100:    <ats:NSOVERSTEP>0</ats:NSOVERSTEP>
1101:    <ats:NSABSENT>0</ats:NSABSENT>
1102:    <ats:NSMONITOR>0</ats:NSMONITOR>
1103:    <ats:NSFMONITOR>0</ats:NSFMONITOR>
1104:    <ats:NSDISCNT>0</ats:NSDISCNT>
1105:    <ats:NSFDISCNT>0</ats:NSFDISCNT>
1106:    <ats:NSINSERT>0</ats:NSINSERT>
1107:    <ats:NSFINSERT>0</ats:NSFINSERT>
1108:    <ats:NSASI>0</ats:NSASI>
1109:    <ats:NSPWCB>0</ats:NSPWCB>
1110:    <ats:NSRD>0</ats:NSRD>
1111:    <ats:NSLCPS>0</ats:NSLCPS>
1112:    <ats:NSNCPS>0</ats:NSNCPS>
1113:    <ats:NSICPS>0</ats:NSICPS>
1114:    <ats:NSCBCLOCK>0</ats:NSCBCLOCK>
1115:    <ats:NSMINIBAR>0</ats:NSMINIBAR>
1116:    <ats:NSMCN>0</ats:NSMCN>
1117:    <ats:NSDSTR>0</ats:NSDSTR>
1118:    <ats:NSOPRREG>0</ats:NSOPRREG>
1119:    <ats:NSONEKEY>0</ats:NSONEKEY>
1120:    <ats:NSINBOUND>0</ats:NSINBOUND>
1121:    <ats:NSOUTBOUND>0</ats:NSOUTBOUND>
1122:    <ats:NSCALLERID>0</ats:NSCALLERID>
1123:    <ats:NSCUN>0</ats:NSCUN>
1124:    <ats:NSIPTVVC>0</ats:NSIPTVVC>
1125:    <ats:NSNP>0</ats:NSNP>
1126:    <ats:NSSEC>0</ats:NSSEC>
1127:    <ats:NSSECSTA>0</ats:NSSECSTA>
1128:    <ats:NSHRCN>0</ats:NSHRCN>
1129:    <ats:NSSB>0</ats:NSSB>
1130:    <ats:LCO>1</ats:LCO>
1131:    <ats:LC>1</ats:LC>
1132:    <ats:LCT>1</ats:LCT>
1133:    <ats:NTT>1</ats:NTT>
1134:    <ats:ITT>0</ats:ITT>
1135:    <ats:ICTX>1</ats:ICTX>
1136:    <ats:OCTX>1</ats:OCTX>
1137:    <ats:INTT>0</ats:INTT>
1138:    <ats:IITT>0</ats:IITT>
1139:    <ats:ICLT>0</ats:ICLT>
1140:    <ats:ICDDD>0</ats:ICDDD>
1141:    <ats:ICIDD>0</ats:ICIDD>
1142:    <ats:IOLT>0</ats:IOLT>
1143:    <ats:CTLCO>1</ats:CTLCO>
1144:    <ats:CTLCT>1</ats:CTLCT>
1145:    <ats:CTLD>1</ats:CTLD>
1146:    <ats:CTINTNANP>1</ats:CTINTNANP>
1147:    <ats:CTINTWORLD>1</ats:CTINTWORLD>
1148:    <ats:CTDA>1</ats:CTDA>
1149:    <ats:CTOSM>1</ats:CTOSM>
1150:    <ats:CTOSP>0</ats:CTOSP>
1151:    <ats:CTOSP1>0</ats:CTOSP1>
1152:    <ats:CCO1>0</ats:CCO1>
1153:    <ats:CCO2>0</ats:CCO2>
1154:    <ats:CCO3>0</ats:CCO3>
1155:    <ats:CCO4>0</ats:CCO4>
1156:    <ats:CCO5>0</ats:CCO5>
1157:    <ats:CCO6>0</ats:CCO6>
1158:    <ats:CCO7>0</ats:CCO7>
1159:    <ats:CCO8>0</ats:CCO8>
1160:    <ats:CCO9>0</ats:CCO9>
1161:    <ats:CCO10>0</ats:CCO10>
1162:    <ats:CCO11>0</ats:CCO11>
1163:    <ats:CCO12>0</ats:CCO12>
1164:    <ats:CCO13>0</ats:CCO13>
1165:    <ats:CCO14>0</ats:CCO14>
1166:    <ats:CCO15>0</ats:CCO15>
1167:    <ats:CCO16>0</ats:CCO16>
1168:    <ats:HIGHENTCO>0</ats:HIGHENTCO>
1169:    <ats:OPERATOR>1</ats:OPERATOR>
1170:    <ats:SUPYSRV>1</ats:SUPYSRV>
1171:    <ats:IDDCI>1</ats:IDDCI>
1172:    <ats:NTCI>1</ats:NTCI>
1173:    <ats:LTCI>1</ats:LTCI>
1174:    <ats:RSC>65535</ats:RSC>
1175:    <ats:CIG>4294967295</ats:CIG>
1176:    <ats:OUTRST>0</ats:OUTRST>
1177:    <ats:INRST>0</ats:INRST>
1178:    <ats:NOAT>20</ats:NOAT>
1179:    <ats:VMAIND>65535</ats:VMAIND>
1180:    <ats:VDMAIND>65535</ats:VDMAIND>
1181:    <ats:TGRP>65534</ats:TGRP>
1182:    <ats:TIDHLD>28</ats:TIDHLD>
1183:    <ats:TIDCW>23</ats:TIDCW>
1184:    <ats:SCF>0</ats:SCF>
1185:    <ats:LMTGRP>65534</ats:LMTGRP>
1186:    <ats:FLBGRP>65535</ats:FLBGRP>
1187:    <ats:SLBGRP>65535</ats:SLBGRP>
1188:    <ats:COP>0000</ats:COP>
1189:    <ats:G711_64K_A_LAW>1</ats:G711_64K_A_LAW>
1190:    <ats:G711_64K_U_LAW>1</ats:G711_64K_U_LAW>
1191:    <ats:G722>1</ats:G722>
1192:    <ats:G723>1</ats:G723>
1193:    <ats:G726>1</ats:G726>
1194:    <ats:G728>1</ats:G728>
1195:    <ats:G729>1</ats:G729>
1196:    <ats:CODEC_MP4A>1</ats:CODEC_MP4A>
1197:    <ats:CODEC2833>1</ats:CODEC2833>
1198:    <ats:CODEC2198>1</ats:CODEC2198>
1199:    <ats:G726_40>1</ats:G726_40>
1200:    <ats:G726_32>1</ats:G726_32>
1201:    <ats:G726_24>1</ats:G726_24>
1202:    <ats:G726_16>1</ats:G726_16>
1203:    <ats:AMR>1</ats:AMR>
1204:    <ats:CLEARMODE>1</ats:CLEARMODE>
1205:    <ats:ILBC>1</ats:ILBC>
1206:    <ats:SPEEX>1</ats:SPEEX>
1207:    <ats:G729EV>1</ats:G729EV>
1208:    <ats:EVRC>1</ats:EVRC>
1209:    <ats:EVRCB>1</ats:EVRCB>
1210:    <ats:H261>1</ats:H261>
1211:    <ats:H263>1</ats:H263>
1212:    <ats:CODEC_MP4V>1</ats:CODEC_MP4V>
1213:    <ats:H264>1</ats:H264>
1214:    <ats:T38>1</ats:T38>
1215:    <ats:T120>1</ats:T120>
1216:    <ats:G711A_VBD>1</ats:G711A_VBD>
1217:    <ats:G711U_VBD>1</ats:G711U_VBD>
1218:    <ats:G726_VBD>1</ats:G726_VBD>
1219:    <ats:G726_40_VBD>1</ats:G726_40_VBD>
1220:    <ats:G726_32_VBD>1</ats:G726_32_VBD>
1221:    <ats:G726_24_VBD>1</ats:G726_24_VBD>
1222:    <ats:G726_16_VBD>1</ats:G726_16_VBD>
1223:    <ats:WIND_BAND_AMR>1</ats:WIND_BAND_AMR>
1224:    <ats:GSM610>1</ats:GSM610>
1225:    <ats:H263_2000>1</ats:H263_2000>
1226:    <ats:BROADVOICE_32>1</ats:BROADVOICE_32>
1227:    <ats:UNKNOWN_CODEC>1</ats:UNKNOWN_CODEC>
1228:    <ats:ACODEC>255</ats:ACODEC>
1229:    <ats:VCODEC>255</ats:VCODEC>
1230:    <ats:POLIDX>255</ats:POLIDX>
1231:    <ats:NCPI>255</ats:NCPI>
1232:    <ats:ICPI>255</ats:ICPI>
1233:    <ats:EBOCL>0</ats:EBOCL>
1234:    <ats:EBOPL>0</ats:EBOPL>
1235:    <ats:EBOIT>2</ats:EBOIT>
1236:    <ats:RM>0</ats:RM>
1237:    <ats:CPC>0</ats:CPC>
1238:    <ats:PCHG>65535</ats:PCHG>
1239:    <ats:TFPT>4</ats:TFPT>
1240:    <ats:CHT>0</ats:CHT>
1241:    <ats:MCIDMODE>0</ats:MCIDMODE>
1242:    <ats:MCIDCMODE>255</ats:MCIDCMODE>
1243:    <ats:MCIDAMODE>0</ats:MCIDAMODE>
1244:    <ats:PREPAIDIDX>65535</ats:PREPAIDIDX>
1245:    <ats:CRBTID>65535</ats:CRBTID>
1246:    <ats:ODBBICTYPE>0</ats:ODBBICTYPE>
1247:    <ats:ODBBOCTYPE>0</ats:ODBBOCTYPE>
1248:    <ats:ODBBARTYPE>0</ats:ODBBARTYPE>
1249:    <ats:ODBSS>0</ats:ODBSS>
1250:    <ats:ODBBRCFTYPE>0</ats:ODBBRCFTYPE>
1251:    <ats:PNOTI>0</ats:PNOTI>
1252:    <ats:MAXPARACALL>1</ats:MAXPARACALL>
1253:    <ats:ATSDTMBUSY>1</ats:ATSDTMBUSY>
1254:    <ats:CALLCOUNT>1</ats:CALLCOUNT>
1255:    <ats:CDNOTICALLER>0</ats:CDNOTICALLER>
1256:    <ats:ISCHGFLAG>0</ats:ISCHGFLAG>
1257:    <ats:CHC>0</ats:CHC>
1258:    <ats:CUSER>0</ats:CUSER>
1259:    <ats:STCF>0</ats:STCF>
1260:    <ats:CHARSC>65535</ats:CHARSC>
1261:    <ats:REGUIDX>0</ats:REGUIDX>
1262:    <ats:SOCBFUNC>255</ats:SOCBFUNC>
1263:    <ats:SOCBPTONEIDX>65535</ats:SOCBPTONEIDX>
1264:    <ats:ADMINCBA>0</ats:ADMINCBA>
1265:    <ats:ADCONTROL_DIVERSION>0</ats:ADCONTROL_DIVERSION>
1266:    <ats:CPCRUS>255</ats:CPCRUS>
1267:    <ats:CUSCAT>0</ats:CUSCAT>
1268:    <ats:SPT100REL>1</ats:SPT100REL>
1269:  </ats:ADD_SBR>
1270:  ";
1271:   
1272:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1273:   
1274:              return soapEnvelopeXml;
1275:          }
1276:   
1277:          ////////////////////////////////////////////////////////////////////////////
1278:   
1279:          /// <summary>
1280:          /// Remove Sbr (RMV SBR)
1281:          /// </summary>
1282:          private static XmlDocument RmvSbrSoapEnvelopeXml(string service, int messageId)
1283:          {
1284:              string impu, xmlContent;
1285:              XmlDocument soapEnvelopeXml;
1286:   
1287:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1288:   
1289:              xmlContent = @"
1290:        <ats:RMV_SBR>
1291:           <ats:IMPU>" + impu + @"</ats:IMPU>
1292:        </ats:RMV_SBR>
1293:  ";
1294:   
1295:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1296:   
1297:              return soapEnvelopeXml;
1298:          }
1299:   
1300:          ////////////////////////////////////////////////////////////////////////////
1301:          ////////////////////////////////////////////////////////////////////////////
1302:   
1303:          /// <summary>
1304:          /// Modify Sbr Abbriviated Calling (MOD SBR NSABRC)
1305:          /// </summary>
1306:          private static XmlDocument ModSbrNsabrcSoapEnvelopeXml(string service, bool state, int messageId)
1307:          {
1308:              int i;
1309:              string impuSipDomain, xmlContent;
1310:              XmlDocument soapEnvelopeXml;
1311:   
1312:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1313:   
1314:              i = (state) ? 1 : 0;
1315:   
1316:              xmlContent = @"
1317:        <ats:MOD_SBR>
1318:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1319:           <ats:NSABRC>" + i + @"</ats:NSABRC>
1320:        </ats:MOD_SBR>
1321:  ";
1322:   
1323:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1324:   
1325:              return soapEnvelopeXml;
1326:          }
1327:   
1328:          ////////////////////////////////////////////////////////////////////////////
1329:   
1330:          /// <summary>
1331:          /// Modify Sbr Caller Id (MOD SBR NSCLIP)
1332:          /// </summary>
1333:          private static XmlDocument ModSbrNsclipSoapEnvelopeXml(string service, bool state, int messageId)
1334:          {
1335:              int i;
1336:              string impuSipDomain, xmlContent;
1337:              XmlDocument soapEnvelopeXml;
1338:   
1339:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1340:   
1341:              i = (state) ? 1 : 0;
1342:   
1343:              xmlContent = @"
1344:        <ats:MOD_SBR>
1345:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1346:           <ats:NSCLIP>" + i + @"</ats:NSCLIP>
1347:        </ats:MOD_SBR>
1348:  ";
1349:   
1350:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1351:   
1352:              return soapEnvelopeXml;
1353:          }
1354:   
1355:          ////////////////////////////////////////////////////////////////////////////
1356:   
1357:          /// <summary>
1358:          /// Modify Sbr Call Forwarding (MOD SBR NSCFU)
1359:          /// </summary>
1360:          private static XmlDocument ModSbrNscfuSoapEnvelopeXml(string service, bool state, int messageId)
1361:          {
1362:              int i;
1363:              string impuSipDomain, xmlContent;
1364:              XmlDocument soapEnvelopeXml;
1365:   
1366:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1367:   
1368:              i = (state) ? 1 : 0;
1369:   
1370:              xmlContent = @"
1371:        <ats:MOD_SBR>
1372:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1373:           <ats:NSCFU>" + i + @"</ats:NSCFU>
1374:        </ats:MOD_SBR>
1375:  ";
1376:   
1377:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1378:   
1379:              return soapEnvelopeXml;
1380:          }
1381:   
1382:          ////////////////////////////////////////////////////////////////////////////
1383:   
1384:          /// <summary>
1385:          /// Modify Sbr Call Waiting (MOD SBR NSCW)
1386:          /// </summary>
1387:          private static XmlDocument ModSbrNscwSoapEnvelopeXml(string service, bool state, int messageId)
1388:          {
1389:              int i;
1390:              string impuSipDomain, xmlContent;
1391:              XmlDocument soapEnvelopeXml;
1392:   
1393:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1394:   
1395:              i = (state) ? 1 : 0;
1396:   
1397:              xmlContent = @"
1398:        <ats:MOD_SBR>
1399:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1400:           <ats:NSCW>" + i + @"</ats:NSCW>
1401:        </ats:MOD_SBR>
1402:  ";
1403:   
1404:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1405:   
1406:              return soapEnvelopeXml;
1407:          }
1408:   
1409:          ////////////////////////////////////////////////////////////////////////////
1410:   
1411:          /// <summary>
1412:          /// Modify Sbr Conference Call (MOD SBR NS3PTY)
1413:          /// </summary>
1414:          private static XmlDocument ModSbrNs3ptySoapEnvelopeXml(string service, bool state, int messageId)
1415:          {
1416:              int i;
1417:              string impuSipDomain, xmlContent;
1418:              XmlDocument soapEnvelopeXml;
1419:   
1420:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1421:   
1422:              i = (state) ? 1 : 0;
1423:   
1424:              xmlContent = @"
1425:        <ats:MOD_SBR>
1426:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1427:           <ats:NS3PTY>" + i + @"</ats:NS3PTY>
1428:        </ats:MOD_SBR>
1429:  ";
1430:   
1431:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1432:   
1433:              return soapEnvelopeXml;
1434:          }
1435:   
1436:          ////////////////////////////////////////////////////////////////////////////
1437:   
1438:          /// <summary>
1439:          /// Modify Sbr Wakeup Call (MOD SBR NSWAKE_UP)
1440:          /// </summary>
1441:          private static XmlDocument ModSbrNswakeupSoapEnvelopeXml(string service, bool state, int messageId)
1442:          {
1443:              int i;
1444:              string impuSipDomain, xmlContent;
1445:              XmlDocument soapEnvelopeXml;
1446:   
1447:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1448:   
1449:              i = (state) ? 1 : 0;
1450:   
1451:              xmlContent = @"
1452:        <ats:MOD_SBR>
1453:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1454:           <ats:NSWAKE_UP>" + i + @"</ats:NSWAKE_UP>
1455:        </ats:MOD_SBR>
1456:  ";
1457:   
1458:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1459:   
1460:              return soapEnvelopeXml;
1461:          }
1462:   
1463:          ////////////////////////////////////////////////////////////////////////////
1464:   
1465:          /// <summary>
1466:          /// Modify Sbr International Calling User Controlled (MOD SBR ITT)
1467:          /// </summary>
1468:          private static XmlDocument ModSbrIttSoapEnvelopeXml(string service, bool state, int messageId)
1469:          {
1470:              int i;
1471:              string impuSipDomain, xmlContent;
1472:              XmlDocument soapEnvelopeXml;
1473:   
1474:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1475:   
1476:              i = (state) ? 1 : 0;
1477:   
1478:              xmlContent = @"
1479:        <ats:MOD_SBR>
1480:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1481:           <ats:ITT>" + i + @"</ats:ITT>
1482:        </ats:MOD_SBR>
1483:  ";
1484:   
1485:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1486:   
1487:              return soapEnvelopeXml;
1488:          }
1489:   
1490:          ////////////////////////////////////////////////////////////////////////////
1491:   
1492:          /// <summary>
1493:          /// Modify Sbr International Calling (MOD SBR NSCBA)
1494:          /// </summary>
1495:          private static XmlDocument ModSbrNscbaSoapEnvelopeXml(string service, bool state, int messageId)
1496:          {
1497:              int i;
1498:              string impuSipDomain, xmlContent;
1499:              XmlDocument soapEnvelopeXml;
1500:   
1501:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1502:   
1503:              i = (state) ? 1 : 0;
1504:   
1505:              xmlContent = @"
1506:        <ats:MOD_SBR>
1507:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1508:           <ats:NSCBA>" + i + @"</ats:NSCBA>
1509:        </ats:MOD_SBR>
1510:  ";
1511:   
1512:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1513:   
1514:              return soapEnvelopeXml;
1515:          }
1516:   
1517:          ////////////////////////////////////////////////////////////////////////////
1518:   
1519:          /// <summary>
1520:          /// Set Owed Restrict (SET OWSBR)
1521:          /// 
1522:          /// Function
1523:          /// 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.
1524:          /// 
1525:          /// Parameter Description
1526:          /// IMPU: sip:+96522904211@ims.moc.kw
1527:          /// US: User Stat: It specifies the owing status of a subscriber.
1528:          /// 
1529:          /// Options:
1530:          /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
1531:          /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
1532:          /// 2: INOWN(INOWN): The subscriber is forbidden to answer calls but can originate calls.
1533:          /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
1534:          /// </summary>
1535:          private static XmlDocument SetOwSbrSoapEnvelopeXml(string service, bool state, int messageId)
1536:          {
1537:              int i;
1538:              string impuSipDomain, xmlContent;
1539:              XmlDocument soapEnvelopeXml;
1540:   
1541:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1542:   
1543:              i = (state) ? 3 : 1;
1544:   
1545:              xmlContent = @"
1546:        <ats:SET_OWSBR>
1547:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1548:           <ats:US>" + i + @"</ats:US>
1549:        </ats:SET_OWSBR>
1550:  ";
1551:   
1552:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1553:   
1554:              return soapEnvelopeXml;
1555:          }
1556:   
1557:          ////////////////////////////////////////////////////////////////////////////
1558:   
1559:          /// <summary>
1560:          /// List Owed Restrict (LST OWSBR)
1561:          /// 
1562:          /// Function
1563:          /// This command is used to list the owing status of a subscriber.
1564:          /// 
1565:          /// Parameter Description
1566:          /// IMPU: here you will write the subscriber number in sip format, for example the number is (22904211)
1567:          /// IMPU: sip:+96522904211@ims.moc.kw
1568:          /// US: User Stat: It specifies the owing status of a subscriber.
1569:          /// 
1570:          /// Options:
1571:          /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
1572:          /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
1573:          /// 2: INOWN(INOWN): The subscriber is forbidden to answer calls but can originate calls.
1574:          /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
1575:          /// </summary>
1576:          private static XmlDocument LstOwSbrSoapEnvelopeXml(string service, int messageId)
1577:          {
1578:              string impuSipDomain, xmlContent;
1579:              XmlDocument soapEnvelopeXml;
1580:   
1581:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1582:   
1583:              xmlContent = @"
1584:        <ats:LST_OWSBR>
1585:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1586:        </ats:LST_OWSBR>
1587:  ";
1588:   
1589:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1590:   
1591:              return soapEnvelopeXml;
1592:          }
1593:   
1594:          ////////////////////////////////////////////////////////////////////////////
1595:   
1596:          /// <summary>
1597:          /// RMV HSUB
1598:          /// 
1599:          /// RMV HSUB: SUBID="+96522220000@ims.moc.kw";
1600:          /// </summary>
1601:          private static XmlDocument RmvHsubSoapEnvelopeXml(string service, int messageId)
1602:          {
1603:              string subid, xmlContent;
1604:              XmlDocument soapEnvelopeXml;
1605:   
1606:              subid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.SubId(service);
1607:   
1608:              xmlContent = @"
1609:        <ats:RMV_HSUB>
1610:           <ats:SUBID>" + subid + @"</ats:SUBID>
1611:        </ats:RMV_HSUB>
1612:  ";
1613:   
1614:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1615:   
1616:              return soapEnvelopeXml;
1617:          }
1618:   
1619:          ////////////////////////////////////////////////////////////////////////////
1620:   
1621:          /// <summary>
1622:          /// RMV HSDAINF
1623:          /// 
1624:          /// RMV HSDAINF: IMPI="+96522220000@ims.moc.kw";
1625:          /// </summary>
1626:          private static XmlDocument RmvHsdainfSoapEnvelopeXml(string service, int messageId)
1627:          {
1628:              string impi, xmlContent;
1629:              XmlDocument soapEnvelopeXml;
1630:   
1631:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1632:   
1633:              xmlContent = @"
1634:        <ats:RMV_HSDAINF>
1635:           <ats:IMPI>" + impi + @"</ats:IMPI>
1636:        </ats:RMV_HSDAINF>
1637:  ";
1638:   
1639:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1640:   
1641:              return soapEnvelopeXml;
1642:          }
1643:   
1644:          ////////////////////////////////////////////////////////////////////////////
1645:   
1646:          /// <summary>
1647:          /// ADD DNAPTRREC
1648:          /// 
1649:          /// 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.";
1650:          /// </summary>
1651:          private static XmlDocument AddDnaptrrecSoapEnvelopeXml(string service, int messageId)
1652:          {
1653:              string name, impuSipDomain, xmlContent;
1654:              XmlDocument soapEnvelopeXml;
1655:   
1656:              name = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.E164ProtocolUserNumber(service);
1657:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1658:   
1659:              xmlContent = @"
1660:        <ats:ADD_DNAPTRREC>
1661:           <ats:NAME>" + name + @"</ats:NAME>
1662:           <ats:ZONENAME>5.6.9.e164.arpa</ats:ZONENAME>
1663:           <ats:ORDER>0</ats:ORDER>
1664:           <ats:PREFERENCE>10</ats:PREFERENCE>
1665:           <ats:FLAGS>U</ats:FLAGS>
1666:           <ats:SERVICE>E2U+sip</ats:SERVICE>
1667:           <ats:REGEXP>!^..*$!" + impuSipDomain + @"!</ats:REGEXP>
1668:           <ats:REPLACEMENT>ims.moc.kw.</ats:REPLACEMENT>
1669:        </ats:ADD_DNAPTRREC>
1670:  ";
1671:   
1672:              soapEnvelopeXml = TecensSoapEnvelopeXml(xmlContent, messageId);
1673:   
1674:              return soapEnvelopeXml;
1675:          }
1676:   
1677:          ////////////////////////////////////////////////////////////////////////////
1678:   
1679:          /// <summary>
1680:          /// ADD HSIFC
1681:          /// 
1682:          /// ADD HSIFC:IMPU="sip:+96522220000@ims.moc.kw",SIFCID=1;
1683:          /// </summary>
1684:          private static XmlDocument AddHsifcSoapEnvelopeXml(string service, int messageId)
1685:          {
1686:              string impuSipDomain, xmlContent;
1687:              XmlDocument soapEnvelopeXml;
1688:   
1689:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1690:   
1691:              xmlContent = @"
1692:        <ats:ADD_HSIFC>
1693:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1694:           <ats:SIFCID>1</ats:SIFCID>
1695:        </ats:ADD_HSIFC>
1696:  ";
1697:   
1698:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1699:   
1700:              return soapEnvelopeXml;
1701:          }
1702:   
1703:          ////////////////////////////////////////////////////////////////////////////
1704:   
1705:          /// <summary>
1706:          /// ADD HIMPU
1707:          /// 
1708:          /// ADD HIMPU:IMPI="+96522220000@ims.moc.kw",IMPU="tel:+96522220000";
1709:          /// </summary>
1710:          private static XmlDocument AddHimpuSoapEnvelopeXml(string service, int messageId)
1711:          {
1712:              string impi, impu, xmlContent;
1713:              XmlDocument soapEnvelopeXml;
1714:   
1715:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1716:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1717:   
1718:              xmlContent = @"
1719:        <ats:ADD_HIMPU>
1720:           <ats:IMPI>" + impi + @"</ats:IMPI>
1721:           <ats:IMPU>" + impu + @"</ats:IMPU>
1722:        </ats:ADD_HIMPU>
1723:  ";
1724:   
1725:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1726:   
1727:              return soapEnvelopeXml;
1728:          }
1729:   
1730:          ////////////////////////////////////////////////////////////////////////////
1731:   
1732:          /// <summary>
1733:          /// ADD HSUB
1734:          /// 
1735:          /// ADD HSUB:SUBID="+96522220000@ims.moc.kw",IMPI="+96522220000@ims.moc.kw",IMPU="sip:+96522220000@ims.moc.kw";
1736:          /// </summary>
1737:          private static XmlDocument AddHsubSoapEnvelopeXml(string service, int messageId)
1738:          {
1739:              string impi, impuSipDomain, subid, xmlContent;
1740:              XmlDocument soapEnvelopeXml;
1741:   
1742:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1743:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1744:              subid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.SubId(service);
1745:   
1746:              xmlContent = @"
1747:        <ats:ADD_HSUB>
1748:           <ats:SUBID>" + subid + @"</ats:SUBID>
1749:           <ats:IMPI>" + impi + @"</ats:IMPI>
1750:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1751:        </ats:ADD_HSUB>
1752:  ";
1753:   
1754:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1755:   
1756:              return soapEnvelopeXml;
1757:          }
1758:   
1759:          ////////////////////////////////////////////////////////////////////////////
1760:   
1761:          /// <summary>
1762:          /// ADD HSDAINF
1763:          /// 
1764:          /// ADD HSDAINF:IMPI="+96522220000@ims.moc.kw",HUSERNAME="+96522220000@ims.moc.kw",PWD=admin,REALM="ims.moc.kw";
1765:          /// </summary>
1766:          private static XmlDocument AddHsdainfSoapEnvelopeXml(string service, int messageId)
1767:          {
1768:              string impi, husername, pwd, realm, xmlContent;
1769:              XmlDocument soapEnvelopeXml;
1770:   
1771:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1772:              husername = impi;
1773:              pwd = "admin";
1774:              realm = "ims.moc.kw";
1775:   
1776:              xmlContent = @"
1777:        <ats:ADD_HSDAINF>
1778:           <ats:IMPI>" + impi + @"</ats:IMPI>
1779:           <ats:HUSERNAME>" + husername + @"</ats:HUSERNAME>
1780:           <ats:PWD>" + pwd + @"</ats:PWD>
1781:           <ats:REALM>" + realm + @"</ats:REALM>
1782:        </ats:ADD_HSDAINF>
1783:  ";
1784:   
1785:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1786:   
1787:              return soapEnvelopeXml;
1788:          }
1789:   
1790:          ////////////////////////////////////////////////////////////////////////////
1791:   
1792:          /// <summary>
1793:          /// SET HREGAUTH
1794:          /// 
1795:          /// SET HREGAUTH:IMPU="sip:+96522220000@ims.moc.kw",REGAUTH=TRUE;
1796:          /// </summary>
1797:          private static XmlDocument SetHregauthSoapEnvelopeXml(string service, int messageId)
1798:          {
1799:              string impuSipDomain, xmlContent;
1800:              XmlDocument soapEnvelopeXml;
1801:   
1802:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1803:   
1804:              xmlContent = @"
1805:        <ats:SET_HREGAUTH>
1806:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1807:           <ats:REGAUTH>TRUE</ats:REGAUTH>
1808:        </ats:SET_HREGAUTH>
1809:  ";
1810:   
1811:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1812:   
1813:              return soapEnvelopeXml;
1814:          }
1815:   
1816:          ////////////////////////////////////////////////////////////////////////////
1817:   
1818:          /// <summary>
1819:          /// SET HVNTPLID
1820:          /// 
1821:          /// SET HVNTPLID: IMPU="sip:+96522220000@ims.moc.kw", VNTPLID=0;
1822:          /// </summary>
1823:          private static XmlDocument SetHvntplidForImpuSipDomainSoapEnvelopeXml(string service, int messageId)
1824:          {
1825:              string impuSipDomain, xmlContent;
1826:              XmlDocument soapEnvelopeXml;
1827:   
1828:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1829:   
1830:              xmlContent = @"
1831:        <ats:SET_HVNTPLID>
1832:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1833:           <ats:VNTPLID>0</ats:VNTPLID>
1834:        </ats:SET_HVNTPLID>
1835:  ";
1836:   
1837:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1838:   
1839:              return soapEnvelopeXml;
1840:          }
1841:   
1842:          ////////////////////////////////////////////////////////////////////////////
1843:   
1844:          /// <summary>
1845:          /// SET HVNTPLID
1846:          /// 
1847:          /// SET HVNTPLID: IMPU="tel:+96522220000", VNTPLID=0;
1848:          /// </summary>
1849:          private static XmlDocument SetHvntplidForImpuSoapEnvelopeXml(string service, int messageId)
1850:          {
1851:              string impu, xmlContent;
1852:              XmlDocument soapEnvelopeXml;
1853:   
1854:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1855:   
1856:              xmlContent = @"
1857:        <ats:SET_HVNTPLID>
1858:           <ats:IMPU>" + impu + @"</ats:IMPU>
1859:           <ats:VNTPLID>0</ats:VNTPLID>
1860:        </ats:SET_HVNTPLID>
1861:  ";
1862:   
1863:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1864:   
1865:              return soapEnvelopeXml;
1866:          }
1867:   
1868:          ////////////////////////////////////////////////////////////////////////////
1869:   
1870:          /// <summary>
1871:          /// SET HIRS
1872:          /// 
1873:          /// SET HIRS:IRSID=1,IMPULIST="\"sip:+96522220000@ims.moc.kw\"&\"tel:+96522220000\""; 
1874:          /// </summary>
1875:          private static XmlDocument SetHirsSoapEnvelopeXml(string service, int messageId)
1876:          {
1877:              string impu, impuSipDomain, impuList, xmlContent;
1878:              XmlDocument soapEnvelopeXml;
1879:   
1880:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1881:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1882:   
1883:              // Copy in SetHaliaspuSoapEnvelopeXml and SetHirsSoapEnvelopeXml
1884:              //impuList = @"""" + impuSipDomain + @"""&""" + impu + @"""";
1885:              impuList = @"""" + impuSipDomain + @"""&amp;""" + impu + @"""";
1886:              //impuList = impuSipDomain + @"&amp;" + impu;
1887:   
1888:              xmlContent = @"
1889:        <ats:SET_HIRS>
1890:           <ats:IMPULIST>" + impuList + @"</ats:IMPULIST>
1891:           <ats:IRSID>1</ats:IRSID>
1892:        </ats:SET_HIRS>
1893:  ";
1894:   
1895:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1896:   
1897:              return soapEnvelopeXml;
1898:          }
1899:   
1900:          ////////////////////////////////////////////////////////////////////////////
1901:   
1902:          /// <summary>
1903:          /// SET HDEFIMPU
1904:          /// 
1905:          /// SET HDEFIMPU: IRSID=1, IMPU="sip:+96522220000@ims.moc.kw";
1906:          /// </summary>
1907:          private static XmlDocument SetHdefimpuSoapEnvelopeXml(string service, int messageId)
1908:          {
1909:              string impuSipDomain, xmlContent;
1910:              XmlDocument soapEnvelopeXml;
1911:   
1912:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1913:   
1914:              xmlContent = @"
1915:        <ats:SET_HDEFIMPU>
1916:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1917:           <ats:IRSID>1</ats:IRSID>
1918:        </ats:SET_HDEFIMPU>
1919:  ";
1920:   
1921:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1922:   
1923:              return soapEnvelopeXml;
1924:          }
1925:   
1926:          ////////////////////////////////////////////////////////////////////////////
1927:   
1928:          /// <summary>
1929:          /// SET HSPSHARE
1930:          /// 
1931:          /// SET HSPSHARE:BASEIMPU="sip:+96522220000@ims.moc.kw",IMPU="tel:+96522220000";
1932:          /// </summary>
1933:          private static XmlDocument SetHspshareSoapEnvelopeXml(string service, int messageId)
1934:          {
1935:              string impu, impuSipDomain, xmlContent;
1936:              XmlDocument soapEnvelopeXml;
1937:   
1938:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1939:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1940:   
1941:              xmlContent = @"
1942:        <ats:SET_HSPSHARE>
1943:           <ats:IMPU>" + impu + @"</ats:IMPU>
1944:           <ats:BASEIMPU>" + impuSipDomain + @"</ats:BASEIMPU>
1945:        </ats:SET_HSPSHARE>
1946:  ";
1947:   
1948:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1949:   
1950:              return soapEnvelopeXml;
1951:          }
1952:   
1953:          ////////////////////////////////////////////////////////////////////////////
1954:   
1955:          /// <summary>
1956:          /// SET HALIASPU
1957:          /// 
1958:          /// SET HALIASPU:ALIASID=1,IMPULIST="\"sip:+96522220000@ims.moc.kw\"&\"tel:+96522220000\"";
1959:          /// </summary>
1960:          private static XmlDocument SetHaliaspuSoapEnvelopeXml(string service, int messageId)
1961:          {
1962:              string impu, impuSipDomain, impuList, xmlContent;
1963:              XmlDocument soapEnvelopeXml;
1964:   
1965:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1966:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1967:   
1968:              // Copy in SetHaliaspuSoapEnvelopeXml and SetHirsSoapEnvelopeXml
1969:              //impuList = @"""" + impuSipDomain + @"""&""" + impu + @"""";
1970:              impuList = @"""" + impuSipDomain + @"""&amp;""" + impu + @"""";
1971:              //impuList = impuSipDomain + @"&amp;" + impu;
1972:   
1973:              xmlContent = @"
1974:        <ats:SET_HALIASPU>
1975:           <ats:IMPULIST>" + impuList + @"</ats:IMPULIST>
1976:           <ats:ALIASID>1</ats:ALIASID>
1977:        </ats:SET_HALIASPU>
1978:  ";
1979:   
1980:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1981:   
1982:              return soapEnvelopeXml;
1983:          }
1984:   
1985:          ////////////////////////////////////////////////////////////////////////////
1986:   
1987:          /// <summary>
1988:          /// RMV DNAPTRREC
1989:          /// 
1990:          /// RMV DNAPTRREC: NAME="0.0.0.0.2.2.2.2.5.6.9.e164.arpa";
1991:          /// </summary>
1992:          private static XmlDocument RmvDnaptrrecSoapEnvelopeXml(string service, int messageId)
1993:          {
1994:              string name, xmlContent;
1995:              XmlDocument soapEnvelopeXml;
1996:   
1997:              name = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.E164ProtocolUserNumber(service);
1998:   
1999:              xmlContent = @"
2000:        <ats:RMV_DNAPTRREC>
2001:           <ats:NAME>" + name + @"</ats:NAME>
2002:        </ats:RMV_DNAPTRREC>
2003:  ";
2004:   
2005:              soapEnvelopeXml = TecensSoapEnvelopeXml(xmlContent, messageId);
2006:   
2007:              return soapEnvelopeXml;
2008:          }
2009:   
2010:          ////////////////////////////////////////////////////////////////////////////
2011:          ////////////////////////////////////////////////////////////////////////////
2012:   
2013:          /// <summary>
2014:          ///
2015:          /// </summary>
2016:          private static XmlDocument TechssSoapEnvelopeXml(string xmlBodyContent, int messageId)
2017:          {
2018:              return SoapEnvelopeXml("techss", xmlBodyContent, messageId);
2019:          }
2020:   
2021:          ////////////////////////////////////////////////////////////////////////////
2022:   
2023:          /// <summary>
2024:          ///
2025:          /// </summary>
2026:          private static XmlDocument Tecats0SoapEnvelopeXml(string xmlBodyContent, int messageId)
2027:          {
2028:              return SoapEnvelopeXml("tecats0", xmlBodyContent, messageId);
2029:          }
2030:   
2031:          ////////////////////////////////////////////////////////////////////////////
2032:   
2033:          /// <summary>
2034:          ///
2035:          /// </summary>
2036:          private static XmlDocument TecensSoapEnvelopeXml(string xmlBodyContent, int messageId)
2037:          {
2038:              return SoapEnvelopeXml("tecens", xmlBodyContent, messageId);
2039:          }
2040:   
2041:          ////////////////////////////////////////////////////////////////////////////
2042:   
2043:          /// <summary>
2044:          ///
2045:          /// </summary>
2046:          private static XmlDocument SoapEnvelopeXml(string meName, string xmlBodyContent, int messageId)
2047:          {
2048:              string s, userName, password;
2049:              XmlDocument soapEnvelopeXml = new XmlDocument();
2050:   
2051:              userName = Ia.Ngn.Cl.Model.Business.Huawei.Ims.UserName;
2052:              password = Ia.Ngn.Cl.Model.Business.Huawei.Ims.Password;
2053:   
2054:              s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
2055:  <soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:ats=""http://www.huawei.com/ATS"" >
2056:      <soap-env:Header>
2057:          <ats:MessageID>" + messageId + @"</ats:MessageID>
2058:          <ats:MEName>" + meName + @"</ats:MEName>
2059:          <ats:Authentication>
2060:              <ats:Username>" + userName + @"</ats:Username>
2061:              <ats:Password>" + password + @"</ats:Password>
2062:          </ats:Authentication>
2063:      </soap-env:Header>
2064:      <soap-env:Body>" + xmlBodyContent + @"</soap-env:Body>
2065:  </soap-env:Envelope>";
2066:   
2067:              soapEnvelopeXml.LoadXml(s);
2068:   
2069:              return soapEnvelopeXml;
2070:          }
2071:   
2072:          ////////////////////////////////////////////////////////////////////////////
2073:   
2074:          /// <summary>
2075:          ///
2076:          /// </summary>
2077:          private void SendSoapRequestAndReadResponse(XmlDocument soapEnvelopeXml, out XmlDocument soapResultXmlDocument)
2078:          {
2079:              string url, soapAction;
2080:              string soapResult;
2081:              HttpWebRequest request;
2082:   
2083:              //sessionId = "";
2084:              soapResultXmlDocument = new XmlDocument();
2085:   
2086:              url = Ia.Ngn.Cl.Model.Business.Huawei.Ims.BaseAddress + "/" + Ia.Ngn.Cl.Model.Business.Huawei.Ims.ServiceUrl;
2087:              soapAction = "ATSV100R003C01SPC100";
2088:   
2089:              request = (HttpWebRequest)WebRequest.Create(url);
2090:   
2091:              request.Headers.Add(@"SOAP:" + soapAction);
2092:              request.ContentType = "text/xml;charset=utf-8";
2093:              request.Accept = "text/xml";
2094:              request.Method = "POST";
2095:   
2096:              byte[] bytes;
2097:              bytes = System.Text.Encoding.ASCII.GetBytes(soapEnvelopeXml.OuterXml);
2098:              request.ContentLength = bytes.Length;
2099:   
2100:              try
2101:              {
2102:                  using (Stream stream = request.GetRequestStream())
2103:                  {
2104:                      stream.Write(bytes, 0, bytes.Length);
2105:                      //soapEnvelopeXml.Save(stream);
2106:                  }
2107:   
2108:                  using (WebResponse response = request.GetResponse())
2109:                  {
2110:                      using (StreamReader rd = new StreamReader(response.GetResponseStream()))
2111:                      {
2112:                          soapResult = rd.ReadToEnd();
2113:   
2114:                          soapResultXmlDocument.LoadXml(soapResult);
2115:                      }
2116:                  }
2117:              }
2118:              catch (Exception)
2119:              {
2120:              }
2121:          }
2122:   
2123:          ////////////////////////////////////////////////////////////////////////////
2124:   
2125:          /// <summary>
2126:          ///
2127:          /// </summary>
2128:          private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
2129:          {
2130:              ParseSoapResultXml(soapResultXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
2131:          }
2132:   
2133:          ////////////////////////////////////////////////////////////////////////////
2134:   
2135:          /// <summary>
2136:          ///
2137:          /// </summary>
2138:          private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode, out List<Dictionary<string, string>> parameterDictionaryList)
2139:          {
2140:              string resultDescription;
2141:              Dictionary<string, string> parameterDictionary;
2142:              XmlNode resultXmlNode, itemXmlNode;
2143:   
2144:              XmlNamespaceManager ns = new XmlNamespaceManager(soapResultXmlDocument.NameTable);
2145:              ns.AddNamespace("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/");
2146:              ns.AddNamespace("ns1", "http://www.huawei.com/ATS");
2147:   
2148:              parameterDictionary = new Dictionary<string, string>();
2149:              parameterDictionaryList = new List<Dictionary<string, string>>(32);
2150:   
2151:              if (soapResultXmlDocument.DocumentElement != null)
2152:              {
2153:                  resultXmlNode = soapResultXmlDocument.DocumentElement.SelectSingleNode("SOAP-ENV:Body/*/ns1:Result", ns);
2154:   
2155:                  if (resultXmlNode != null && resultXmlNode.HasChildNodes)
2156:                  {
2157:                      if (resultXmlNode["ns1:ResultCode"] != null) resultCode = (Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode)int.Parse(resultXmlNode["ns1:ResultCode"].InnerText);
2158:                      else if (resultXmlNode["ResultCode"] != null) resultCode = (Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode)int.Parse(resultXmlNode["ResultCode"].InnerText);
2159:                      else resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2160:   
2161:                      if (resultXmlNode["ns1:ResultDesc"] != null) resultDescription = resultXmlNode["ns1:ResultDesc"].InnerText;
2162:                      else if (resultXmlNode["ResultDesc"] != null) resultDescription = resultXmlNode["ResultDesc"].InnerText;
2163:                      else resultDescription = string.Empty;
2164:   
2165:                      if (resultCode != Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed && resultDescription != string.Empty)
2166:                      {
2167:                          //System.Diagnostics.Debug.WriteLine(resultCode + ": " + resultDescription);
2168:   
2169:                          if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
2170:                          {
2171:                              itemXmlNode = soapResultXmlDocument.DocumentElement.SelectSingleNode("SOAP-ENV:Body/*/ns1:Result/ns1:ResultData/ns1:Table1/ns1:Item", ns);
2172:   
2173:                              if (itemXmlNode != null && itemXmlNode.HasChildNodes)
2174:                              {
2175:                                  parameterDictionary = CollectXmlNodeChildNodesValuesIntoDictionary(itemXmlNode, "ns1:");
2176:   
2177:                                  parameterDictionaryList.Add(parameterDictionary);
2178:                              }
2179:                          }
2180:                          else
2181:                          {
2182:   
2183:                          }
2184:                      }
2185:                      else
2186:                      {
2187:                          resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2188:                      }
2189:                  }
2190:                  else
2191:                  {
2192:                      resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2193:                  }
2194:              }
2195:              else
2196:              {
2197:                  resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2198:              }
2199:          }
2200:   
2201:          ////////////////////////////////////////////////////////////////////////////
2202:   
2203:          /// <summary>
2204:          ///
2205:          /// </summary>
2206:          /// <returns></returns>
2207:          private Dictionary<string, string> CollectXmlNodeChildNodesValuesIntoDictionary(XmlNode xn, string prefixToRemove)
2208:          {
2209:              string name;
2210:              Dictionary<string, string> parameterDictionary;
2211:   
2212:              parameterDictionary = new Dictionary<string, string>();
2213:   
2214:              foreach (XmlElement xe in xn.ChildNodes)
2215:              {
2216:                  name = xe.Name.Replace(prefixToRemove, "");
2217:   
2218:                  // below: if the node has children(?) we will treat it as an XDocument and add its name to a top level tag
2219:                  if (xe.ChildNodes.Count > 1) parameterDictionary.Add(name, xe.OuterXml);
2220:                  else parameterDictionary.Add(name, xe.InnerText);
2221:              }
2222:   
2223:              return parameterDictionary;
2224:          }
2225:   
2226:          ////////////////////////////////////////////////////////////////////////////
2227:          ////////////////////////////////////////////////////////////////////////////
2228:      }
2229:   
2230:      ////////////////////////////////////////////////////////////////////////////
2231:      ////////////////////////////////////////////////////////////////////////////
2232:  }