Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
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;
   3:  using System.Collections.Generic;
   4:  using System.Linq;
   5:  using System.Web;
   6:  using System.Text;
   7:  using System.Text.RegularExpressions;
   8:  using System.Xml;
   9:  using System.Data.Entity;
  10:  using System.Net;
  11:  using System.IO;
  12:   
  13:  namespace Ia.Ngn.Cl.Model.Client.Huawei
  14:  {
  15:      ////////////////////////////////////////////////////////////////////////////
  16:   
  17:      /// <summary publish="true">
  18:      /// Optical Fiber Network Management Intranet Portal (OFN) client support class for Huawei's Next Generation Network (NGN) client model.
  19:      /// </summary>
  20:      /// 
  21:      /// <remarks> 
  22:      /// Copyright © 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  23:      ///
  24:      /// 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
  25:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  26:      ///
  27:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  28:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  29:      /// 
  30:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  31:      /// 
  32:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  33:      /// </remarks> 
  34:      public class Ims
  35:      {
  36:          ////////////////////////////////////////////////////////////////////////////
  37:   
  38:          /// <summary>
  39:          ///
  40:          /// </summary>
  41:          public enum ResultCode
  42:          {
  43:              OperationSucceeded = 0,
  44:              AtsSystemInternalError = 1,
  45:              TheSubscriberIsNotDefinedInTheHssOrAtsOrServiceDataIsNotConfiguredForTheSubscriber = 101,
  46:              Failed = 100000, // by me
  47:   
  48:              TheUserAlreadyExists = 1000,
  49:              NoServiceData = 15000,
  50:   
  51:              TechssTheValueIsInvalid = 900001007,
  52:              TechssTHeImpuDoesNotBelongToTheIrs = 900003053,
  53:   
  54:              #region Result Code Description
  55:              /*
  56:          Result Code Description
  57:  
  58:  List of result code:
  59:  Result Code Description
  60:   
  61:  0 Operation succeeded. 
  62:  1 ATS system internal error. 
  63:  2 Internal error. 
  64:  3 Command execution timeout. 
  65:  4 The service cannot be activated or deactivated repeatedly. 
  66:  5 The operation is restricted by operator determined barring. 
  67:  100 Unknown user, maybe the user does not exist. 
  68:  101 The subscriber is not defined in the HSS or ATS,or service data is not configured for the subscriber. 
  69:  102 Data cannot be modified. 
  70:  103 The sequence number of transparent data is incorrect. 
  71:  104 Unknown error from HSS. 
  72:  105 HSS message parameters are not found. 
  73:  106 The buffer size is too small. 
  74:  107 No memory resource of ATS. 
  75:  108 No data buffer resource. 
  76:  109 Parameter value is out of range. 
  77:  110 No basic data. Please run ADD SBR to configure the basic data first. 
  78:  111 Unknown data from HSS. 
  79:  112 Unknown command. 
  80:  113 Invalid URI format or call prefix not configured. 
  81:  114 Users with the call forwarding service cannot forward calls to users in the ImplicitIdentitys list. 
  82:  115 Users with the call forwarding service cannot forward calls to themselves. 
  83:  116 No user data. 
  84:  117 No service right. 
  85:  118 The UDA message includes unexpected data. 
  86:  119 Users with the call forwarding service cannot forward calls to the restricted numbers. 
  87:  121 The Centrex group number or Centrex user group number cannot be set for a non-Centrex subscriber. 
  88:  122 Time conflict. 
  89:  123 The end time is earlier than the start time. 
  90:  124 Invalid parameter: Dial profile. 
  91:  125 Invalid parameter: Profile name. 
  92:  126 The service is not registered. 
  93:  127 Parameter conflict. 
  94:  128 The data to be registered conflicts with the existing record. 
  95:  129 The subscriber has registered this service. 
  96:  130 Deleting the MUPT service data fails. 
  97:  131 The value of the Name parameter contains illegal characters: " . 
  98:  133 The PBX subscriber is not allowed to config the call waiting(CW) service. 
  99:  134 The physical IMPU and the subscriber number must be in the same alias group. 
 100:  135 The alias group must contain on SIP IMPU and two TEL IMPU at least. 
 101:  136 The physical IMPU must be in Tel URI format. 
 102:  137 The subscriber data is incomplete. Please remove the subscriber and then add the subscriber again. 
 103:  300 The format of the data to be updated to the HSS is incorrect. 
 104:  301 The data on the HSS cannot be read or written. Please check the data configuration of the HSS. 
 105:  302 The length of the data to be updated to the HSS exceeds the maximum limit of the HSS. 
 106:  303 The size of the configured service data exceeds the maximum size supported by the ATS. 
 107:  500 Failed to decode or encode the SOAP text. 
 108:  501 Failed to decode the SOAP text because a parameter value is out of range. The parameter is: 
 109:  502 One or more mandatory parameters are not found. Please specify these mandatory parameters. 
 110:  503 The SOAP message is too large. 
 111:  504 Failed to decode the SOAP message because the memory is insufficient. 
 112:  505 The parameter configuration exceeds the maximum number. As a result, SOAP messages cannot be decoded. The parameter is: 
 113:  --1000 The user already exists. 
 114:  1001 The Local DN set parameter must be specified. 
 115:  1002 The Call source code parameter must be specified. 
 116:  1003 Invalid parameter: Local DN set. 
 117:  1004 Invalid parameter: Call source code. 
 118:  1005 Invalid parameter: Pulse charge case. 
 119:  1006 Invalid parameter: User category. 
 120:  1007 Invalid parameter: Voice group number. 
 121:  1008 Invalid parameter: Callee route source code. 
 122:  1009 Invalid parameter VoiceMailBox index. 
 123:  1010 Invalid parameter VideoMailBox index. 
 124:  1011 Prepaid Prefix Index does not exist. 
 125:  1012 The CRBT prefix index does not exist. 
 126:  1013 The CLIP and CIDCW conflict. 
 127:  1014 The RID, NRID, and CLIR conflict or they are registered. 
 128:  1015 The COLP and COLPOVR conflict. 
 129:  1016 The pulse charging type can not be configured for the AOC_D or AOC_E. 
 130:  1017 The SD1D and SD2D cannot co-exist with the SPEED_DIAL. 
 131:  1018 The CCW service right can be configured only for a subscriber that has the CW service right. 
 132:  1019 The record mapping the DSPIDX parameter must be defined first. 
 133:  1020 The call barring group must be configured first. 
 134:  1021 Obtaining the call source code failed. Please run ADD NUMSEGSRCMAP to configure the call source code that maps the IMPU. 
 135:  1022 Obtaining the local DN set failed. Please run ADD CALLSRC to configure the local DN set that maps the call source code. 
 136:  1200 The PBX user cannot be deleted by running RMV SBR. 
 137:  1300 No user data. 
 138:  1600 The same service data has been registered on the HSS. 
 139:  1601 The CFDATA service data does not exist. 
 140:  1602 Failed to register the CFDATA service because one parameter is invalid. 
 141:  1603 The CFDATA record number reaches the maximum. 
 142:  1604 No right to register the CFDATA service. 
 143:  1700 No user data. 
 144:  1701 One parameter in the RMV CFDATA command is invalid. 
 145:  1702 No CFDATA service data. 
 146:  1703 The data to be removed is not found. 
 147:  1800 No CFDATA service data. 
 148:  1900 The user already has the number change service. 
 149:  1901 The SOAP data is empty. 
 150:  1902 The new number is the same as itself. 
 151:  1903 The new number cannot be the same as one in the ImplicitIdentitys set. 
 152:  1910 The number invalidation status is incorrect. 
 153:  1911 The new number format is incorrect. 
 154:  2000 The SOAP data is empty. 
 155:  2001 The user does not have the number change service. 
 156:  2100 The user status is normal and thus cannot be modified. 
 157:  2101 No service data. 
 158:  2102 One parameter of the MOD NUMCHG command in the SOAP text is not found. 
 159:  2103 New IMPU, Number change mode, and Send short message flag are not specified. 
 160:  2104 The new number is the same as itself. 
 161:  2105 The modified data is the same as the data from HSS. 
 162:  2106 The new number cannot be the same as one in the ImplicitIdentitys set. 
 163:  2200 No number change service data. 
 164:  2300 The service data already exists. 
 165:  2400 No STRATEGY service data. 
 166:  2500 No STRATEGY service data. 
 167:  2700 The ADD SBR command is not found. 
 168:  2801 Barred by the call forwarding barring (CDIVBAR). 
 169:  2802 Barred by selective outgoing call (SOC). 
 170:  2803 Barred by operator determined barring (ODB). 
 171:  2804 Barred by outgoing call barring (CBA). 
 172:  2805 Barred by incoming only line (ICO). 
 173:  2806 Barred by the owing restricted service. 
 174:  2807 Barred by dial number call-out barring service (DNCALLOUTBAR). 
 175:  2808 Barred by outgoing call barring except green call (OCBEG). 
 176:  2809 Barred by customized call-out authority (CUSTOM). 
 177:  2810 Barred by outgoing call barring (OCB). 
 178:  2811 Barred by operator determined barring outgoing call (ODBBOC). 
 179:  2812 Barred by operator determined barring outgoing call when roaming outside home public land mobile network (ODBBOCROAM). 
 180:  2813 Barred by operator determined barring outgoing call except mobile subscriber. 
 181:  2814 Barring for international call. 
 182:  2815 Barring for prepaid user. 
 183:  2816 Barred by the carrier selection on call by call (CBC) restriction right. 
 184:  2817 Barred by illegal configuration of carrier selection on call by call (CBC). 
 185:  2818 Barred by dial number call-out allowing service (DNCALLOUTALLOW). 
 186:  2828 No service data. 
 187:  2829 At least one parameter must be specified. 
 188:  2830 The number of IMPU in ImplicitIdentitys set(IRS) exceeds the maximum. 
 189:  10000 No SOC service data. 
 190:  10001 The SOC service already exists. 
 191:  10002 The SOC record reaches the maximum. 
 192:  10003 The time of the SOC service conflicts with one existing record. 
 193:  10004 The start time of the SOC service is invalid. 
 194:  10005 The end time of the SOC service is invalid. 
 195:  10006 The end time of the SOC service is earlier than the start time. 
 196:  10007 The time of the SOC service conflicts. 
 197:  10008 The start time and end time of the SOC service are invalid. 
 198:  10009 The SOC number cannot be the same as the user number. 
 199:  10010 The SOC number cannot be the same as one in the ImplicitIdentitys set. 
 200:  10100 No SOC service data. 
 201:  10200 The user has not registered the SOC service. 
 202:  10201 The user has not registered the SOC service. 
 203:  10202 The SOC service data does not exist. 
 204:  10203 No SOC service data. 
 205:  10300 The SIC record reaches the maximum. 
 206:  10301 The start time of the SIC service is invalid. 
 207:  10302 The end time of the SIC service is invalid. 
 208:  10303 The time and IMPU are the same as those on the HSS and thus a conflict occurs. 
 209:  10304 The restricted number cannot be the same as the user number. 
 210:  10305 The restricted number cannot be the same as one in the ImplicitIdentitys set. 
 211:  10308 Caller IMPU must be specified. 
 212:  10400 No SIC service data. 
 213:  10500 The user has not registered the SIC service. 
 214:  10501 No SIC service data. 
 215:  10502 No SIC service data. 
 216:  10503 The length of the caller number must be 10 digits. 
 217:  10600 The DND service data does not exist. 
 218:  10601 The DND service data already exists. 
 219:  10602 Failed to download the service data. 
 220:  10603 The DND record reaches the maximum. 
 221:  10604 The Time parameter is invalid. 
 222:  10605 The Mode parameter is invalid. 
 223:  10606 The Group number parameter is invalid. 
 224:  10607 The Start year parameter is invalid. 
 225:  10608 The Start month parameter is invalid. 
 226:  10609 The Start day parameter is invalid. 
 227:  10610 The Start hour parameter is invalid. 
 228:  10611 The End year parameter is invalid. 
 229:  10612 The End month parameter is invalid. 
 230:  10613 The End day parameter is invalid. 
 231:  10614 The End hour parameter is invalid. 
 232:  10615 The mode is week, but the weekpattern is not set. 
 233:  10616 The mode is month, but the day is not set. 
 234:  10617 The mode is year, but the day and month are not set. 
 235:  10618 The hour and minute parameters must be specified or must not be specified simultaneously. 
 236:  10619 The end hour and end minute parameters must be specified or must not be specified simultaneously. 
 237:  10620 The start hour, start minute, end hour, and end minute parameters must be specified or not be specified simultaneously. 
 238:  10621 No valid date between start date and end date. 
 239:  10622 The end time of the DND is earlier than the start time of the DND. 
 240:  10623 The DND access mode can not be configured on the Web portal. 
 241:  10624 The start year, month, and day must be specified. 
 242:  10700 No service data. 
 243:  10800 The user has not registered the DND service. 
 244:  10801 No right to register the GOIR service. 
 245:  10900 The K value is not defined in the MOD PFXOCR command. 
 246:  11000 No CBA service data. 
 247:  11300 No GOIR service data. 
 248:  11301 No service data. 
 249:  11400 The user has not registered the GOIR service. 
 250:  11500 The GOIR service is registered and thus the MOIR service cannot be registered. 
 251:  11600 No MOIR service data. 
 252:  11601 The user has not registered the MOIR service. 
 253:  11800 The same number already exists. 
 254:  11801 The DN_CALL_OUT_ALLOW record reaches the maximum. 
 255:  11802 The number to be registered is a prefix of a number registered on the HSS. 
 256:  11900 No DN_CALL_OUT_ALLOW service data. 
 257:  12000 The user has not registered the service. 
 258:  12001 No DN_CALL_OUT_ALLOW service data. 
 259:  12002 Failed to obtain the DN_CALL_OUT_ALLOW service data. 
 260:  12003 The user has not registered the service. 
 261:  12100 The same number already exists. 
 262:  12101 The DN_CALL_OUT_BAR record reaches the maximum. 
 263:  12102 The number to be registered is a prefix of an existing number. 
 264:  12103 The number to be registered is sip URI. 
 265:  12200 No DN_CALL_OUT_BAR service data. 
 266:  12300 The user has not registered the service. 
 267:  12301 No DN_CALLOUT_BAR service data. 
 268:  12302 Failed to obtain the DN_CALL_OUT_BAR service data. 
 269:  12303 The user has not registered the service. 
 270:  12400 The value of one parameter in the SET_OWSBR command is invalid. 
 271:  12401 The parameter indicating the owing status of a user is invalid. 
 272:  12500 Failed to obtain the user data. 
 273:  12501 No user data. 
 274:  12700 The value of one parameter in the PRK_OWSBR command is invalid. 
 275:  12900 No user data. 
 276:  12901 No response data. 
 277:  12902 The REG COMSS command includes unauthorized services. 
 278:  12903 The RID, NRID and CLIR conflict. 
 279:  12904 The RID,NRID and CLIR rights are not configured. 
 280:  12905 The service(s) to be configured is not authorized to subscribers of the customized type (indicated by Customized user category). 
 281:  13100 When the TMODE is PERMANENT, the start time and end time can not be specified. 
 282:  13101 When the TMODE is TEMP, the start time and end time should be specified. 
 283:  13400 Failed to obtain the system time. 
 284:  13401 The WAKEUP service cannot be registered near the current system time. 
 285:  13402 The same record already exists. 
 286:  13403 The WAKEUP service record reaches the maximum. 
 287:  13404 The week time parameter is not specified. 
 288:  13405 The day time parameter is not specified. 
 289:  13406 The value of week is out of range. 
 290:  13407 The weeks value is small. 
 291:  13408 The WCLAN parameter is invalid. Please first configure LANGDEF on the OMU client. 
 292:  13500 No WAKEUP service data. 
 293:  13600 The service is not registered. 
 294:  13601 The hour and minute must be specified together. 
 295:  13602 No record is found. 
 296:  13900 No CFTB service data. 
 297:  13901 The record to be cancelled by running RPL CFTB is not found. 
 298:  14000 All the parameters in REG UINFO are empty. 
 299:  14100 No UINFO service data. 
 300:  14300 In REG MRINGMODE, IMPUn parameter format error: invalid URI format. 
 301:  14301 The CFMODE parameter in REG MRONGMOD must be specified. 
 302:  14302 In the multi-ringing service, each IMPU is unique. 
 303:  14303 REG MRINGMODE IMPU list is empty. 
 304:  14400 No MRINGMODE service data. 
 305:  14600 In the ImplicitIdentitys set, there is no SIP IMPU. 
 306:  14601 In the ImplicitIdentitys set, there is no TEL IMPU. 
 307:  14602 The PC-ONLY subscriber is not a SIP subscriber. 
 308:  14603 The PC-ONLY subscriber and the subscriber number are not in the same implicit registration set. 
 309:  14604 The user does not have the ImplicitIdentitys list. 
 310:  14700 The user has not registered the service. 
 311:  14800 No user data. 
 312:  14900 There are two identical services in REG SS. 
 313:  14901 The service to be activated is not registered. 
 314:  14902 The service to be deactivated is not registered. 
 315:  14903 The ACT SS command contains services that the subscriber does not have the right to use. 
 316:  14904 The DEA SS command contains services that the subscriber does not have the right to use. 
 317:  -15000 No service data. 
 318:  15100 No right to register the CFU service. 
 319:  15200 No right to register the CFU service. 
 320:  15201 No user data. 
 321:  15202 No right to register the service. 
 322:  15203 No extended user data. 
 323:  15204 The IMPU must be a TEL URI or the alias group to which the IMPU belongs must contain a TEL URI. 
 324:  15300 No service data. 
 325:  15400 The CFU service is not registered and thus running RPL CFU fails. 
 326:  15401 No CFU service data. 
 327:  15402 No user data. 
 328:  15500 No right to register the CFB service. 
 329:  15600 No CFB service data. 
 330:  15601 No right to register the CFNR service. 
 331:  15602 No CFNR service data. 
 332:  15900 No CFNR service data. 
 333:  16200 No CFNL service data. 
 334:  16500 No CFNRC service data. 
 335:  16800 No CWCFNR service data. 
 336:  16900 The time parameter in REG CFS is invalid. 
 337:  16901 The CFS record reaches the maximum. 
 338:  16902 The CFS record reaches the maximum. 
 339:  16903 One parameter in REG CFS is invalid. 
 340:  16904 The same service has registered on the HSS. 
 341:  16905 The caller IMPU and the subscriber number cannot be in the same ImplicitIdentitys list. 
 342:  16906 The caller IMPU cannot be the same as the user IMPU. 
 343:  16907 Please enter a valid 10-digit caller number. 
 344:  17000 No user service data. 
 345:  17001 No CFS service data. 
 346:  17002 Failed to obtain the service that has the same EP parameter. 
 347:  17100 No CFS service data. 
 348:  17300 The start time is the same as an existing record. 
 349:  17301 The value of the Cycle type parameter is DEFAULT, which is the same as an existing record. 
 350:  17302 The CFTB record reaches the maximum. 
 351:  17303 The end time is smaller than the start time. 
 352:  17304 The start time of the CFTB is invalid. 
 353:  17305 The end time of the CFTB is invalid. 
 354:  17306 The year, month and date must be specified when cycle type is NORMAL. 
 355:  17307 The hour and minute must be specified when cycle type is not DEFAULT. 
 356:  17308 The week must be specified when cycle type is WEEK. 
 357:  17309 Service type must be specified. 
 358:  17400 One parameter in REG CFSB is invalid. 
 359:  17401 No CFSB service data. 
 360:  17600 No TMP_LIN service data. 
 361:  17700 One parameter in REG TMPLIN is invalid. 
 362:  17701 No TPMLIN service data. 
 363:  17900 One parameter in REG CODEC_CNTRL is invalid. 
 364:  18000 No user service data. 
 365:  18001 No user service data. 
 366:  18002 The user has not registered the service. 
 367:  18003 The user has not registered the CODEC CONTROL service. 
 368:  18100 No user service data. 
 369:  18101 The CODEC_CNTRL service is not registered. 
 370:  18102 Failed to obtain the user data. 
 371:  18200 Invalid parameter. 
 372:  18201 The bind mode DOUBLE is not applicable to Centrex user. 
 373:  18202 The bound-to IMPU can not be the IMPU of the service subscriber. 
 374:  18203 The bound-to IMPU can not be the IMPU forbidden by service provider. 
 375:  18204 The bind mode DOUBLE is used only when Binding IMPU is specified. 
 376:  18205 No user data. 
 377:  18206 The green call service is not registered. 
 378:  18207 The green call data does not exist. 
 379:  18208 Registering the green call service failed. 
 380:  18209 A mobile phone number can not bound to another mobile phone number. 
 381:  18210 The binding number is not a local number. 
 382:  18211 The IMPU of the bound-to subscriber must have the same country code as that of the service subscriber. 
 383:  18301 No extended subscriber data. 
 384:  18302 The service is not registered 
 385:  18303 The service data does not exist. 
 386:  18401 The hotline IMPU must be in Tel URI format. 
 387:  18402 No extended subscriber data. 
 388:  18403 The service is not registered. 
 389:  18404 The service data does not exist. 
 390:  18405 The hotline number cannot be the number of the hotline service subscriber or another IMPU in the same alias group. 
 391:  18406 The value of Hotline Delay Time is invalid. 
 392:  18501 No extended subscriber data. 
 393:  18502 The service is not registered. 
 394:  18503 The service data does not exist. 
 395:  18601 The nightservice IMPU cannot be the IMPU of the service subscriber. 
 396:  18602 No extended subscriber data. 
 397:  18603 The service is not registered. 
 398:  18604 The service data does not exist. 
 399:  18701 The backup IMPU cannot be the IMPU of the service subscriber. 
 400:  18702 No extended subscriber data. 
 401:  18703 The service is not registered. 
 402:  18704 The service data does not exist. 
 403:  18801 The console IMPU cannot be the IMPU of the service subscriber. 
 404:  18802 No extended subscriber data. 
 405:  18803 The service is not registered. 
 406:  18804 The service data does not exist. 
 407:  18900 IMS subscribers are not allowed to use the following services: 
 408:  18901 POTS subscribers are not allowed to use the following services: 
 409:  18902 G/U subscribers are not allowed to use the following services: 
 410:  18903 CDMA subscribers are not allowed to use the following services: 
 411:  18904 PSTN subscribers are not allowed to use the following services: 
 412:  19000 The service is not registered. 
 413:  19001 The service data does not exist. 
 414:  19002 The Multiple Subscriber Number service right cannot be configured for a non-IRS subscriber. 
 415:  19003 The Multiple Subscriber Number service right can be configured only for the default IMPU of the IRS. 
 416:  19004 The CET mode is not configured. You can run MOD MCIDCFG to configure it. 
 417:  19005 Invalid MCID phase parameter. 
 418:  19100 The subscriber has not registered the service. 
 419:  19101 No service data. 
 420:  19102 The Busy Notify, No Answer Notify, and Not Reachable Notify parameters cannot be set to FALSE at the same time. 
 421:  19103 The Videotelephony subscriber is not allowed to register the miss call notify(MCN) service. 
 422:  19200 The number of records of Distinct Alerting service has reached the maximum. 
 423:  19201 The record does not exist. 
 424:  19202 Source IMPU must be a valid 10-digit number. 
 425:  19300 The alias set must contains at least one SIP URI number. 
 426:  19301 The alias set must contains at least one TEL URI number. 
 427:  19302 The PC IMPU must be a SIP URI number. 
 428:  19303 The PC IMPU is not in the alias set. 
 429:  19400 The STB IMPU and the subscriber number cannot be in the same implicit registration set. 
 430:  19401 The STB IMPU cannot be the same as the subscriber number. 
 431:  19402 The STB IMPU must be a global number. 
 432:  19500 The paramer of Priority call number is invalid. 
 433:  19501 The record of Priority call number already exists. 
 434:  19502 Start time or Stop time is invalid. 
 435:  19503 The record of Priority call number is not found. 
 436:  19600 The Binding IMPU must be a global number. 
 437:  20014 The subscriber has applied for VIMPU. 
 438:  20016 The INBOUND and OUTBOUND services are mutually exclusively. 
 439:  20019 The system is locked. Thus, you can perform service query only. 
 440:  20020 Please enter a valid 10-digit forwarded-to number. 
 441:  20021 Please enter a valid 11-digit forwarded-to number that is prefixed with 1. 
 442:  20022 Please enter a valid 7-digit forwarded-to number. 
 443:  30100 The one number service data records registered for the subscriber have reached the maximum number. 
 444:  30101 A one number service data record with the same index or priority already exists. 
 445:  30102 The specified one number service data record does not exist. 
 446:  30103 The subscriber can register one Caller One Number data record only. 
 447:  30104 The service type conflicts with the number type. 
 448:  30105 Service type or Ringing type cannot match the association data. 
 449:  30106 The association list does not exist. 
 450:  30201 The association list data records registered for the subscriber have reached the maximum number. 
 451:  30202 The specified association list data record does not exist. 
 452:  30203 A association list data record with the same index and type already exists. 
 453:  30204 The association type of this record conflicts with that of another record in the same association index. 
 454:  30205 The association number of a record must be unique. 
 455:  30206 Invalid association number format. 
 456:  30207 The displayed number must be a valid global number. 
 457:  30208 The primary number must be a valid global number. 
 458:  30209 This record is referenced by the One Number service data and thus it cannot be removed. 
 459:  30210 Failed to obtain the country code of the asssociation number. 
 460:  30107 The Filter criteria is invalid. Only digits, letters, underscores and semicolons are allowed. 
 461:  30108 When the Ringing type is set to Call forwarding or Call forwarding to voice mailbox, the Call forwarding mode must be selected. 
 462:  30300 The number of registered Filter criteria records has reached the maximum number that a single subscriber can register. 
 463:  30301 The Filter criteria name is invalid. Only digits, letters, and underscores are allowed. 
 464:  30302 Please configure at least one Filter criteria. 
 465:  30303 If Filter by caller information is selected as a Filter criteria, the Caller information must be filled. 
 466:  30304 If Filter by presence status is selected as a Filter criteria, the Presence status must be filled. 
 467:  30305 If Filter by time is selected as a Filter criteria, the Holiday group index or the Date mode must be filled. 
 468:  30306 The specified Holiday group index does not exist. Please run ADD HLDYGRP to configure the Holiday group index first. 
 469:  30307 The Date mode is Month+order+day of week. The parameters Month, Order and Day of week must be specified. 
 470:  30308 The Date mode is Month+start day+end day. The parameters Month, Start day and End day must be specified. 
 471:  30309 The Date mode is Start date+end date. The parameters Start date and End date must be specified. 
 472:  30310 The End day cannot be earlier than the Start day. 
 473:  30311 The End date cannot be earlier than the Start date. 
 474:  30312 The Start date is invalid. 
 475:  30313 The End date is invalid. 
 476:  30314 A record with the same Filter criteria name already exits. 
 477:  30315 The specified record does not exist. 
 478:  30316 The Start time is invalid. 
 479:  30317 The End time is invalid. 
 480:  30318 The End time cannot be earlier than the Start time. 
 481:  30319 The Start day is invalid. 
 482:  30320 The End day is invalid. 
 483:  30211 Please enter a valid 10-digit Association number. 
 484:  30212 Please enter a valid 11-digit Association number that is prefixed with 1. 
 485:  30213 Please enter a valid 7-digit Association number. 
 486:  30400 The format of the Caller number is invalid. 
 487:  30401 The Caller number must be a global number. 
 488:  30403 The specified record already exists. 
 489:  30404 The specified record does not exist. 
 490:  30405 The number of registered Caller information records has reached the maximum number that a single subscriber can register. 
 491:  35604 The subscriber does not register the One Number service. 
 492:  35609 There is a service conflict. 
 493:  35610 The service right of the number is restricted. 
 494:  35611 The maximum number of secondary numbers has been exceeded. 
 495:  35612 The specified number is already associated with another subscriber. 
 496:  35616 Invalid domain name. 
 497:  35617 Invalid phone number. 
 498:  35625 Cannot remove the subscriber data: The input parameters are incorrect. 
 499:  35669 Cannot remove the subscriber data: The specified data is associated with other subscribers. 
 500:  35799 Other errors. 
 501:  90000 In ADD BLKNUM, BIMPU parameter format error: invalid URI format. 
 502:  90001 The black or white IMPU already exists in the service data. 
 503:  90002 The MCR, DND, or call forwarding service right must be configured. 
 504:  90003 No basic user data. 
 505:  90004 The record reaches the maximum. 
 506:  90005 The black number cannot be the same as the user number. 
 507:  90006 The black number cannot be the same as one in the ImplicitIdentitys set. 
 508:  90100 The record is not found in the black or white number service data. 
 509:  90300 The ACR, ACRTOVM, DND, or call forwarding service right must be configured. 
 510:  90301 The white number cannot be the same as the user number. 
 511:  90302 The number cannot be the same as one in the ImplicitIdentitys set. 
 512:  90600 Green or red number format error: invalid URI format. 
 513:  90601 The green or red number already exists. 
 514:  90602 The green number cannot be the same as the user number. 
 515:  90603 The green number cannot be the same as one in the ImplicitIdentitys set. 
 516:  90604 The record reaches the maximum. 
 517:  90700 The green or red number is not found. 
 518:  90900 The red number cannot be the same as one in the ImplicitIdentitys set. 
 519:  90901 The red IMPU cannot be the same as the user IMPU. 
 520:  91000 The NPAS state of the subscriber is incorrect. 
 521:  91001 The Permissive time is illegal. 
 522:  91002 The Announce time is illegal. 
 523:  91003 The End time is illegal. 
 524:  91004 The Permissive time must be smaller than or equal to the Announce time. 
 525:  91005 The Announce time must be smaller than or equal to the End time. 
 526:  91006 At least one of the Permissive time, the Announce time, and the End time must be greater than the current time. 
 527:  91100 The VIMPU parameter must be set to a TEL URI number. 
 528:  92400 The basic service group is not supported. 
 529:  92401 The Basic service group in http command is not the same as the one in CFX service data. 
 530:  92402 User is not allowed to perform the operation. 
 531:  92403 Can not get the home and visited nation code. 
 532:  92404 Can not get the forward number nation code. 
 533:  92405 Barred by ODBBRACF. 
 534:  92406 Barred by ODBBRICF. 
 535:  92407 Barred by ODBBRICFEXHC. 
 536:  92408 Barred by BAOC. 
 537:  92409 Barred by BAIC. 
 538:  92410 Barred by BOIC. 
 539:  92411 Barred by BOICEXHC. 
 540:  92412 Barred by BICROM. 
 541:  92413 Activating the CCF service is barred by CFU. 
 542:  92414 Failed to obtain the CFU service data. 
 543:  92415 Failed to obtain the CFB service data. 
 544:  92416 Failed to obtain the CFNR service data. 
 545:  92417 Failed to obtain the CFNRC service data. 
 546:  92418 Failed to obtain the CCF service data. 
 547:  92200 The user is not mobile subscriber. 
 548:  92201 Some field does not match usertype. 
 549:  92202 The service has not been activated. 
 550:  92210 The BAOC service has not been activated. 
 551:  92211 The BOIC service has not been activated. 
 552:  92212 The BOICEXHC service has not been activated. 
 553:  92213 The BAIC service has not been activated. 
 554:  92214 The BICROM service has not been activated. 
 555:  92224 The CFU service has been activated. The CFU and BAOC services are mutually exclusive. 
 556:  92225 The CFB Service has been activated. The CFB and BAOC services are mutually exclusive. 
 557:  92226 The CFNR Service has been activated. The CFNR and BAOC services are mutually exclusive. 
 558:  92227 The CFNRC Service has been activated. The CFNRC and BAOC services are mutually exclusive. 
 559:  92237 The CFU Service has been activated. The CFU and BOIC services are mutually exclusive. 
 560:  92238 The CFB Service has been activated. The CFB and BOIC services are mutually exclusive. 
 561:  92239 The CFNR Service has been activated. The CFNR and BOIC services are mutually exclusive. 
 562:  92240 The CFNRC Service has been activated. The CFNRC and BOIC services are mutually exclusive. 
 563:  92250 The CFU Service has been activated. The CFU and BOICExHC services are mutually exclusive. 
 564:  92251 The CFB Service has been activated. The CFB and BOICExHC services are mutually exclusive. 
 565:  92252 The CFNR Service has been activated. The CFNR and BOICExHC services are mutually exclusive. 
 566:  92253 The CFNRC Service has been activated. The CFNRC and BOICExHC services are mutually exclusive. 
 567:  92263 The CFU Service has been activated. The CFU and BAIC services are mutually exclusive. 
 568:  92264 The CFB Service has been activated. The CFB and BAIC services are mutually exclusive. 
 569:  92265 The CFNR Service has been activated. The CFNR and BAIC services are mutually exclusive. 
 570:  92266 The CFNRC Service has been activated. The CFNRC and BAIC services are mutually exclusive. 
 571:  92276 The CFU Service has been activated. The CFU and BICROM services are mutually exclusive. 
 572:  92277 The CFB Service has been activated. The CFB and BICROM services are mutually exclusive. 
 573:  92278 The CFNR Service has been activated. The CFNR and BICROM services are mutually exclusive. 
 574:  92279 The CFNRC Service has been activated. The CFNRC and BICROM services are mutually exclusive. 
 575:  92280 An unknown error occurs during number analysis. 
 576:  92281 An internal error occurs during number analysis. 
 577:  92300 The length of Abbreviated Dial Number exceed three. 
 578:  92301 The abbreviated dial Number contains invalid character. 
 579:  92302 The number of SpeedDial codes registered by a subscriber reaches the maximum. 
 580:  92303 The number of SpeedDial services registered on a single CCU reaches the maximum. 
 581:  92304 The number of subscribers that has registered the SpeedDial service on a single CCU reaches the maximum. 
 582:  92305 The destination dial number cannot be the sip URI type. 
 583:  92306 The destination dial number cannot be the same as the user IMPU. 
 584:  92307 The destination dial number cannot be the same as one in the ImplicitIdentitys set. 
 585:  92308 The destination dial number contains invalid character. 
 586:  92309 The service data does not exist. 
 587:  92310 The specific speed dial data does not exist. 
 588:  92311 The destination dial number cannot be configured in ADD SPDLBAR. 
 589:  92312 The format of new IMPU is invalid. 
 590:  92313 The short number is invalid. 
 591:  92314 The short number is smaller than the configured value. 
 592:  92315 The length of the destination number reaches the maximum. 
 593:  93001 The service is restricted by license. 
 594:  94000 Some parameters conflict with those in the template. 
 595:  94001 Failed to obtain the template data. 
 596:  94002 The subscriber does not have the right to use the service in the template. 
 597:  94003 No template data. 
 598:      */
 599:              #endregion
 600:          }
 601:   
 602:          ////////////////////////////////////////////////////////////////////////////
 603:   
 604:          /// <summary>
 605:          ///
 606:          /// </summary>
 607:          public Ims()
 608:          {
 609:              // below: trust all certificates
 610:              System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);
 611:          }
 612:   
 613:          ////////////////////////////////////////////////////////////////////////////
 614:   
 615:          /// <summary>
 616:          ///
 617:          /// </summary>
 618:          public Ia.Ngn.Cl.Model.Huawei.HuSbr LstSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 619:          {
 620:              Ia.Ngn.Cl.Model.Huawei.HuSbr sbr;
 621:   
 622:              SendSoapRequestAndReadResponse(LstSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 623:   
 624:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
 625:   
 626:              if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
 627:              {
 628:                  sbr = Ia.Ngn.Cl.Model.Business.Huawei.HuSbr.ParseFromDictionary(parameterDictionaryList[0]);
 629:              }
 630:              else sbr = null;
 631:   
 632:              return sbr;
 633:          }
 634:   
 635:          ////////////////////////////////////////////////////////////////////////////
 636:          ////////////////////////////////////////////////////////////////////////////
 637:   
 638:          /// <summary>
 639:          ///
 640:          /// </summary>
 641:          public void AddSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 642:          {
 643:              SendSoapRequestAndReadResponse(AddSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 644:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 645:          }
 646:   
 647:          ////////////////////////////////////////////////////////////////////////////
 648:   
 649:          /// <summary>
 650:          ///
 651:          /// </summary>
 652:          public void RmvSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 653:          {
 654:              SendSoapRequestAndReadResponse(RmvSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 655:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 656:          }
 657:   
 658:          ////////////////////////////////////////////////////////////////////////////
 659:          ////////////////////////////////////////////////////////////////////////////
 660:   
 661:          /// <summary>
 662:          ///
 663:          /// </summary>
 664:          public void ModSbrNsabrc(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 665:          {
 666:              SendSoapRequestAndReadResponse(ModSbrNsabrcSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 667:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 668:          }
 669:   
 670:          ////////////////////////////////////////////////////////////////////////////
 671:   
 672:          /// <summary>
 673:          ///
 674:          /// </summary>
 675:          public void ModSbrNsclip(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 676:          {
 677:              SendSoapRequestAndReadResponse(ModSbrNsclipSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 678:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 679:          }
 680:   
 681:          ////////////////////////////////////////////////////////////////////////////
 682:   
 683:          /// <summary>
 684:          ///
 685:          /// </summary>
 686:          public void ModSbrNscfu(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 687:          {
 688:              SendSoapRequestAndReadResponse(ModSbrNscfuSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 689:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 690:          }
 691:   
 692:          ////////////////////////////////////////////////////////////////////////////
 693:   
 694:          /// <summary>
 695:          ///
 696:          /// </summary>
 697:          public void ModSbrNscw(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 698:          {
 699:              SendSoapRequestAndReadResponse(ModSbrNscwSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 700:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 701:          }
 702:   
 703:          ////////////////////////////////////////////////////////////////////////////
 704:   
 705:          /// <summary>
 706:          ///
 707:          /// </summary>
 708:          public void ModSbrNs3pty(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 709:          {
 710:              SendSoapRequestAndReadResponse(ModSbrNs3ptySoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 711:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 712:          }
 713:   
 714:          ////////////////////////////////////////////////////////////////////////////
 715:   
 716:          /// <summary>
 717:          ///
 718:          /// </summary>
 719:          public void ModSbrNswakeup(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 720:          {
 721:              SendSoapRequestAndReadResponse(ModSbrNswakeupSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 722:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 723:          }
 724:   
 725:          ////////////////////////////////////////////////////////////////////////////
 726:   
 727:          /// <summary>
 728:          ///
 729:          /// </summary>
 730:          public void ModSbrItt(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 731:          {
 732:              SendSoapRequestAndReadResponse(ModSbrIttSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 733:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 734:          }
 735:   
 736:          ////////////////////////////////////////////////////////////////////////////
 737:   
 738:          /// <summary>
 739:          ///
 740:          /// </summary>
 741:          public void ModSbrNscba(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 742:          {
 743:              SendSoapRequestAndReadResponse(ModSbrNscbaSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 744:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 745:          }
 746:   
 747:          ////////////////////////////////////////////////////////////////////////////
 748:   
 749:          /// <summary>
 750:          ///
 751:          /// </summary>
 752:          public void SetOwSbr(string service, bool state, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 753:          {
 754:              SendSoapRequestAndReadResponse(SetOwSbrSoapEnvelopeXml(service, state, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 755:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 756:          }
 757:   
 758:          ////////////////////////////////////////////////////////////////////////////
 759:   
 760:          /// <summary>
 761:          ///
 762:          /// </summary>
 763:          public Ia.Ngn.Cl.Model.Huawei.Owsbr LstOwSbr(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 764:          {
 765:              Ia.Ngn.Cl.Model.Huawei.Owsbr owsbr;
 766:   
 767:              SendSoapRequestAndReadResponse(LstOwSbrSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 768:   
 769:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
 770:   
 771:              if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
 772:              {
 773:                  owsbr = Ia.Ngn.Cl.Model.Business.Huawei.Owsbr.ParseFromDictionary(parameterDictionaryList[0]);
 774:              }
 775:              else owsbr = null;
 776:   
 777:              return owsbr;
 778:          }
 779:   
 780:          ////////////////////////////////////////////////////////////////////////////
 781:          ////////////////////////////////////////////////////////////////////////////
 782:   
 783:          /// <summary>
 784:          ///
 785:          /// </summary>
 786:          public void RmvHsub(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 787:          {
 788:              SendSoapRequestAndReadResponse(RmvHsubSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 789:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 790:          }
 791:   
 792:          ////////////////////////////////////////////////////////////////////////////
 793:   
 794:          /// <summary>
 795:          ///
 796:          /// </summary>
 797:          public void RmvHsdainf(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 798:          {
 799:              SendSoapRequestAndReadResponse(RmvHsdainfSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 800:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 801:          }
 802:   
 803:          ////////////////////////////////////////////////////////////////////////////
 804:   
 805:          /// <summary>
 806:          ///
 807:          /// </summary>
 808:          public void AddDnaptrrec(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 809:          {
 810:              SendSoapRequestAndReadResponse(AddDnaptrrecSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 811:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 812:          }
 813:   
 814:          ////////////////////////////////////////////////////////////////////////////
 815:   
 816:          /// <summary>
 817:          ///
 818:          /// </summary>
 819:          public void AddHsifc(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 820:          {
 821:              SendSoapRequestAndReadResponse(AddHsifcSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 822:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 823:          }
 824:   
 825:          ////////////////////////////////////////////////////////////////////////////
 826:   
 827:          /// <summary>
 828:          ///
 829:          /// </summary>
 830:          public void AddHimpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 831:          {
 832:              SendSoapRequestAndReadResponse(AddHimpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 833:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 834:          }
 835:   
 836:          ////////////////////////////////////////////////////////////////////////////
 837:   
 838:          /// <summary>
 839:          ///
 840:          /// </summary>
 841:          public void AddHsub(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 842:          {
 843:              SendSoapRequestAndReadResponse(AddHsubSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 844:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 845:          }
 846:   
 847:          ////////////////////////////////////////////////////////////////////////////
 848:   
 849:          /// <summary>
 850:          ///
 851:          /// </summary>
 852:          public void AddHsdainf(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 853:          {
 854:              SendSoapRequestAndReadResponse(AddHsdainfSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 855:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 856:          }
 857:   
 858:          ////////////////////////////////////////////////////////////////////////////
 859:   
 860:          /// <summary>
 861:          ///
 862:          /// </summary>
 863:          public void SetHregauth(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 864:          {
 865:              SendSoapRequestAndReadResponse(SetHregauthSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 866:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 867:          }
 868:   
 869:          ////////////////////////////////////////////////////////////////////////////
 870:   
 871:          /// <summary>
 872:          ///
 873:          /// </summary>
 874:          public void SetHvntplidForImpuSipDomain(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 875:          {
 876:              SendSoapRequestAndReadResponse(SetHvntplidForImpuSipDomainSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 877:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 878:          }
 879:   
 880:          ////////////////////////////////////////////////////////////////////////////
 881:   
 882:          /// <summary>
 883:          ///
 884:          /// </summary>
 885:          public void SetHvntplidForImpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 886:          {
 887:              SendSoapRequestAndReadResponse(SetHvntplidForImpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 888:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 889:          }
 890:   
 891:          ////////////////////////////////////////////////////////////////////////////
 892:   
 893:          /// <summary>
 894:          ///
 895:          /// </summary>
 896:          public void SetHirs(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 897:          {
 898:              SendSoapRequestAndReadResponse(SetHirsSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 899:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 900:          }
 901:   
 902:          ////////////////////////////////////////////////////////////////////////////
 903:   
 904:          /// <summary>
 905:          ///
 906:          /// </summary>
 907:          public void SetHdefimpu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 908:          {
 909:              SendSoapRequestAndReadResponse(SetHdefimpuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 910:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 911:          }
 912:   
 913:          ////////////////////////////////////////////////////////////////////////////
 914:   
 915:          /// <summary>
 916:          ///
 917:          /// </summary>
 918:          public void SetHspshare(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 919:          {
 920:              SendSoapRequestAndReadResponse(SetHspshareSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 921:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 922:          }
 923:   
 924:          ////////////////////////////////////////////////////////////////////////////
 925:   
 926:          /// <summary>
 927:          ///
 928:          /// </summary>
 929:          public void SetHaliaspu(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 930:          {
 931:              SendSoapRequestAndReadResponse(SetHaliaspuSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 932:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 933:          }
 934:   
 935:          ////////////////////////////////////////////////////////////////////////////
 936:   
 937:          /// <summary>
 938:          ///
 939:          /// </summary>
 940:          public void RmvDnaptrrec(string service, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
 941:          {
 942:              SendSoapRequestAndReadResponse(RmvDnaptrrecSoapEnvelopeXml(service, 1), out XmlDocument soapResultEnvelopeXmlDocument);
 943:              ParseSoapResultXml(soapResultEnvelopeXmlDocument, out resultCode);
 944:          }
 945:   
 946:          ////////////////////////////////////////////////////////////////////////////
 947:          ////////////////////////////////////////////////////////////////////////////
 948:   
 949:          /// <summary>
 950:          /// List Sbr (LST SBR)
 951:          /// </summary>
 952:          private static XmlDocument LstSbrSoapEnvelopeXml(string service, int messageId)
 953:          {
 954:              string impuSipDomain, xmlContent;
 955:              XmlDocument soapEnvelopeXml;
 956:   
 957:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 958:   
 959:              xmlContent = @"
 960:        <ats:LST_SBR>
 961:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
 962:        </ats:LST_SBR>
 963:  ";
 964:   
 965:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
 966:   
 967:              return soapEnvelopeXml;
 968:          }
 969:   
 970:          ////////////////////////////////////////////////////////////////////////////
 971:          ////////////////////////////////////////////////////////////////////////////
 972:   
 973:          /// <summary>
 974:          /// Add Sbr (ADD SBR)
 975:          /// </summary>
 976:          private static XmlDocument AddSbrSoapEnvelopeXml(string service, int messageId)
 977:          {
 978:              string impuSipDomain, xmlContent;
 979:              XmlDocument soapEnvelopeXml;
 980:   
 981:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
 982:   
 983:              xmlContent = @"
 984:  <ats:ADD_SBR>
 985:    <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
 986:    <ats:TEMPLATEIDX>65535</ats:TEMPLATEIDX>
 987:    <ats:DSPIDX>65534</ats:DSPIDX>
 988:    <ats:LP>0</ats:LP>
 989:    <ats:CSC>0</ats:CSC>
 990:    <ats:UTYPE>1</ats:UTYPE>
 991:    <ats:VCCFLAG>0</ats:VCCFLAG>
 992:    <ats:VTFLAG>0</ats:VTFLAG>
 993:    <ats:NSCFU>0</ats:NSCFU>
 994:    <ats:NSCFUVM>0</ats:NSCFUVM>
 995:    <ats:NSCFB>0</ats:NSCFB>
 996:    <ats:NSCFBVM>0</ats:NSCFBVM>
 997:    <ats:NSCFNR>0</ats:NSCFNR>
 998:    <ats:NSCFNRVM>0</ats:NSCFNRVM>
 999:    <ats:NSCFNL>0</ats:NSCFNL>
1000:    <ats:NSCFNLVM>0</ats:NSCFNLVM>
1001:    <ats:NSCD>0</ats:NSCD>
1002:    <ats:NSCDVM>0</ats:NSCDVM>
1003:    <ats:NSCFNRC>0</ats:NSCFNRC>
1004:    <ats:NSCFNRCVM>0</ats:NSCFNRCVM>
1005:    <ats:NSCLIP>0</ats:NSCLIP>
1006:    <ats:NSCIDCW>0</ats:NSCIDCW>
1007:    <ats:NSRIO>0</ats:NSRIO>
1008:    <ats:NSCNIP>0</ats:NSCNIP>
1009:    <ats:NSCLIR>0</ats:NSCLIR>
1010:    <ats:NSRIP>0</ats:NSRIP>
1011:    <ats:NSCNIR>0</ats:NSCNIR>
1012:    <ats:NSRID>0</ats:NSRID>
1013:    <ats:NSNRID>0</ats:NSNRID>
1014:    <ats:NSRND>0</ats:NSRND>
1015:    <ats:NSNRND>0</ats:NSNRND>
1016:    <ats:NSCW>0</ats:NSCW>
1017:    <ats:NSCCW>0</ats:NSCCW>
1018:    <ats:NSOIP>0</ats:NSOIP>
1019:    <ats:NSACRM>0</ats:NSACRM>
1020:    <ats:NSGOIR>0</ats:NSGOIR>
1021:    <ats:NSMOIR>0</ats:NSMOIR>
1022:    <ats:NSTIP>0</ats:NSTIP>
1023:    <ats:NSTIR>0</ats:NSTIR>
1024:    <ats:NSOTIR>0</ats:NSOTIR>
1025:    <ats:NSCLIPNOSCREENING>0</ats:NSCLIPNOSCREENING>
1026:    <ats:NSCR>0</ats:NSCR>
1027:    <ats:NSWAKE_UP>0</ats:NSWAKE_UP>
1028:    <ats:NSAOC_D>0</ats:NSAOC_D>
1029:    <ats:NSAOC_E>0</ats:NSAOC_E>
1030:    <ats:NSXEXH>0</ats:NSXEXH>
1031:    <ats:NSXEGJ>0</ats:NSXEGJ>
1032:    <ats:NSCWCFNR>0</ats:NSCWCFNR>
1033:    <ats:NSIIFC>0</ats:NSIIFC>
1034:    <ats:NSDN_CALL_OUT_BAR>0</ats:NSDN_CALL_OUT_BAR>
1035:    <ats:NSCCBS>0</ats:NSCCBS>
1036:    <ats:NSCCNR>0</ats:NSCCNR>
1037:    <ats:NSCCBSR>0</ats:NSCCBSR>
1038:    <ats:NSCCNRR>0</ats:NSCCNRR>
1039:    <ats:NS3PTY>0</ats:NS3PTY>
1040:    <ats:NSNPTY>0</ats:NSNPTY>
1041:    <ats:NSDND>0</ats:NSDND>
1042:    <ats:NSMCR>0</ats:NSMCR>
1043:    <ats:NSCBA>0</ats:NSCBA>
1044:    <ats:NSTMP_LIN>0</ats:NSTMP_LIN>
1045:    <ats:NSCODEC_CNTRL>0</ats:NSCODEC_CNTRL>
1046:    <ats:NSMWI>0</ats:NSMWI>
1047:    <ats:NSDC>0</ats:NSDC>
1048:    <ats:NSHOLD>0</ats:NSHOLD>
1049:    <ats:NSECT>0</ats:NSECT>
1050:    <ats:NSCFTB>0</ats:NSCFTB>
1051:    <ats:NSDAN>0</ats:NSDAN>
1052:    <ats:NSSTOP_SECRET>0</ats:NSSTOP_SECRET>
1053:    <ats:NSMCID>0</ats:NSMCID>
1054:    <ats:NSEBO>0</ats:NSEBO>
1055:    <ats:NSICO>0</ats:NSICO>
1056:    <ats:NSOUTG>0</ats:NSOUTG>
1057:    <ats:NSINQYH>0</ats:NSINQYH>
1058:    <ats:NSUINFO>0</ats:NSUINFO>
1059:    <ats:NSDN_CALL_OUT_ALLOW>0</ats:NSDN_CALL_OUT_ALLOW>
1060:    <ats:NSSIC>0</ats:NSSIC>
1061:    <ats:NSSOC>0</ats:NSSOC>
1062:    <ats:NSSETCFNRTIME>0</ats:NSSETCFNRTIME>
1063:    <ats:NSCFS>0</ats:NSCFS>
1064:    <ats:NSCFSB>0</ats:NSCFSB>
1065:    <ats:NSFAX>0</ats:NSFAX>
1066:    <ats:NSABRC>0</ats:NSABRC>
1067:    <ats:NSACRTOVM>0</ats:NSACRTOVM>
1068:    <ats:NSPREPAID>0</ats:NSPREPAID>
1069:    <ats:NSCRBT>0</ats:NSCRBT>
1070:    <ats:NSICB>0</ats:NSICB>
1071:    <ats:NSMRINGING>0</ats:NSMRINGING>
1072:    <ats:NSCIS>0</ats:NSCIS>
1073:    <ats:NSCBEG>0</ats:NSCBEG>
1074:    <ats:NSCOLP>0</ats:NSCOLP>
1075:    <ats:NSCOLR>0</ats:NSCOLR>
1076:    <ats:NSCOLPOVR>0</ats:NSCOLPOVR>
1077:    <ats:NSBAOC>0</ats:NSBAOC>
1078:    <ats:NSBOIC>0</ats:NSBOIC>
1079:    <ats:NSBOICEXHC>0</ats:NSBOICEXHC>
1080:    <ats:NSBAIC>0</ats:NSBAIC>
1081:    <ats:NSBICROM>0</ats:NSBICROM>
1082:    <ats:NSSPEED_DIAL>0</ats:NSSPEED_DIAL>
1083:    <ats:NSSD1D>0</ats:NSSD1D>
1084:    <ats:NSSD2D>0</ats:NSSD2D>
1085:    <ats:NSGRNCALL>0</ats:NSGRNCALL>
1086:    <ats:NSCPARK>0</ats:NSCPARK>
1087:    <ats:NSGAA>0</ats:NSGAA>
1088:    <ats:NSQSNS>0</ats:NSQSNS>
1089:    <ats:NSMSN>0</ats:NSMSN>
1090:    <ats:NSHOTLINE>0</ats:NSHOTLINE>
1091:    <ats:NSAOC_S>0</ats:NSAOC_S>
1092:    <ats:NSNIGHTSRV>0</ats:NSNIGHTSRV>
1093:    <ats:NSBACKNUM>0</ats:NSBACKNUM>
1094:    <ats:NSAUTOCON>0</ats:NSAUTOCON>
1095:    <ats:NSCAMPON>0</ats:NSCAMPON>
1096:    <ats:NSCTD>0</ats:NSCTD>
1097:    <ats:NSCLICKHOLD>0</ats:NSCLICKHOLD>
1098:    <ats:NSQUEUE>0</ats:NSQUEUE>
1099:    <ats:NSSANSWER>0</ats:NSSANSWER>
1100:    <ats:NSICENCF>0</ats:NSICENCF>
1101:    <ats:NSCFGO>0</ats:NSCFGO>
1102:    <ats:NSCECT>0</ats:NSCECT>
1103:    <ats:NSCTGO>0</ats:NSCTGO>
1104:    <ats:NSCTIO>0</ats:NSCTIO>
1105:    <ats:NSSETBUSY>0</ats:NSSETBUSY>
1106:    <ats:NSOVERSTEP>0</ats:NSOVERSTEP>
1107:    <ats:NSABSENT>0</ats:NSABSENT>
1108:    <ats:NSMONITOR>0</ats:NSMONITOR>
1109:    <ats:NSFMONITOR>0</ats:NSFMONITOR>
1110:    <ats:NSDISCNT>0</ats:NSDISCNT>
1111:    <ats:NSFDISCNT>0</ats:NSFDISCNT>
1112:    <ats:NSINSERT>0</ats:NSINSERT>
1113:    <ats:NSFINSERT>0</ats:NSFINSERT>
1114:    <ats:NSASI>0</ats:NSASI>
1115:    <ats:NSPWCB>0</ats:NSPWCB>
1116:    <ats:NSRD>0</ats:NSRD>
1117:    <ats:NSLCPS>0</ats:NSLCPS>
1118:    <ats:NSNCPS>0</ats:NSNCPS>
1119:    <ats:NSICPS>0</ats:NSICPS>
1120:    <ats:NSCBCLOCK>0</ats:NSCBCLOCK>
1121:    <ats:NSMINIBAR>0</ats:NSMINIBAR>
1122:    <ats:NSMCN>0</ats:NSMCN>
1123:    <ats:NSDSTR>0</ats:NSDSTR>
1124:    <ats:NSOPRREG>0</ats:NSOPRREG>
1125:    <ats:NSONEKEY>0</ats:NSONEKEY>
1126:    <ats:NSINBOUND>0</ats:NSINBOUND>
1127:    <ats:NSOUTBOUND>0</ats:NSOUTBOUND>
1128:    <ats:NSCALLERID>0</ats:NSCALLERID>
1129:    <ats:NSCUN>0</ats:NSCUN>
1130:    <ats:NSIPTVVC>0</ats:NSIPTVVC>
1131:    <ats:NSNP>0</ats:NSNP>
1132:    <ats:NSSEC>0</ats:NSSEC>
1133:    <ats:NSSECSTA>0</ats:NSSECSTA>
1134:    <ats:NSHRCN>0</ats:NSHRCN>
1135:    <ats:NSSB>0</ats:NSSB>
1136:    <ats:LCO>1</ats:LCO>
1137:    <ats:LC>1</ats:LC>
1138:    <ats:LCT>1</ats:LCT>
1139:    <ats:NTT>1</ats:NTT>
1140:    <ats:ITT>0</ats:ITT>
1141:    <ats:ICTX>1</ats:ICTX>
1142:    <ats:OCTX>1</ats:OCTX>
1143:    <ats:INTT>0</ats:INTT>
1144:    <ats:IITT>0</ats:IITT>
1145:    <ats:ICLT>0</ats:ICLT>
1146:    <ats:ICDDD>0</ats:ICDDD>
1147:    <ats:ICIDD>0</ats:ICIDD>
1148:    <ats:IOLT>0</ats:IOLT>
1149:    <ats:CTLCO>1</ats:CTLCO>
1150:    <ats:CTLCT>1</ats:CTLCT>
1151:    <ats:CTLD>1</ats:CTLD>
1152:    <ats:CTINTNANP>1</ats:CTINTNANP>
1153:    <ats:CTINTWORLD>1</ats:CTINTWORLD>
1154:    <ats:CTDA>1</ats:CTDA>
1155:    <ats:CTOSM>1</ats:CTOSM>
1156:    <ats:CTOSP>0</ats:CTOSP>
1157:    <ats:CTOSP1>0</ats:CTOSP1>
1158:    <ats:CCO1>0</ats:CCO1>
1159:    <ats:CCO2>0</ats:CCO2>
1160:    <ats:CCO3>0</ats:CCO3>
1161:    <ats:CCO4>0</ats:CCO4>
1162:    <ats:CCO5>0</ats:CCO5>
1163:    <ats:CCO6>0</ats:CCO6>
1164:    <ats:CCO7>0</ats:CCO7>
1165:    <ats:CCO8>0</ats:CCO8>
1166:    <ats:CCO9>0</ats:CCO9>
1167:    <ats:CCO10>0</ats:CCO10>
1168:    <ats:CCO11>0</ats:CCO11>
1169:    <ats:CCO12>0</ats:CCO12>
1170:    <ats:CCO13>0</ats:CCO13>
1171:    <ats:CCO14>0</ats:CCO14>
1172:    <ats:CCO15>0</ats:CCO15>
1173:    <ats:CCO16>0</ats:CCO16>
1174:    <ats:HIGHENTCO>0</ats:HIGHENTCO>
1175:    <ats:OPERATOR>1</ats:OPERATOR>
1176:    <ats:SUPYSRV>1</ats:SUPYSRV>
1177:    <ats:IDDCI>1</ats:IDDCI>
1178:    <ats:NTCI>1</ats:NTCI>
1179:    <ats:LTCI>1</ats:LTCI>
1180:    <ats:RSC>65535</ats:RSC>
1181:    <ats:CIG>4294967295</ats:CIG>
1182:    <ats:OUTRST>0</ats:OUTRST>
1183:    <ats:INRST>0</ats:INRST>
1184:    <ats:NOAT>20</ats:NOAT>
1185:    <ats:VMAIND>65535</ats:VMAIND>
1186:    <ats:VDMAIND>65535</ats:VDMAIND>
1187:    <ats:TGRP>65534</ats:TGRP>
1188:    <ats:TIDHLD>28</ats:TIDHLD>
1189:    <ats:TIDCW>23</ats:TIDCW>
1190:    <ats:SCF>0</ats:SCF>
1191:    <ats:LMTGRP>65534</ats:LMTGRP>
1192:    <ats:FLBGRP>65535</ats:FLBGRP>
1193:    <ats:SLBGRP>65535</ats:SLBGRP>
1194:    <ats:COP>0000</ats:COP>
1195:    <ats:G711_64K_A_LAW>1</ats:G711_64K_A_LAW>
1196:    <ats:G711_64K_U_LAW>1</ats:G711_64K_U_LAW>
1197:    <ats:G722>1</ats:G722>
1198:    <ats:G723>1</ats:G723>
1199:    <ats:G726>1</ats:G726>
1200:    <ats:G728>1</ats:G728>
1201:    <ats:G729>1</ats:G729>
1202:    <ats:CODEC_MP4A>1</ats:CODEC_MP4A>
1203:    <ats:CODEC2833>1</ats:CODEC2833>
1204:    <ats:CODEC2198>1</ats:CODEC2198>
1205:    <ats:G726_40>1</ats:G726_40>
1206:    <ats:G726_32>1</ats:G726_32>
1207:    <ats:G726_24>1</ats:G726_24>
1208:    <ats:G726_16>1</ats:G726_16>
1209:    <ats:AMR>1</ats:AMR>
1210:    <ats:CLEARMODE>1</ats:CLEARMODE>
1211:    <ats:ILBC>1</ats:ILBC>
1212:    <ats:SPEEX>1</ats:SPEEX>
1213:    <ats:G729EV>1</ats:G729EV>
1214:    <ats:EVRC>1</ats:EVRC>
1215:    <ats:EVRCB>1</ats:EVRCB>
1216:    <ats:H261>1</ats:H261>
1217:    <ats:H263>1</ats:H263>
1218:    <ats:CODEC_MP4V>1</ats:CODEC_MP4V>
1219:    <ats:H264>1</ats:H264>
1220:    <ats:T38>1</ats:T38>
1221:    <ats:T120>1</ats:T120>
1222:    <ats:G711A_VBD>1</ats:G711A_VBD>
1223:    <ats:G711U_VBD>1</ats:G711U_VBD>
1224:    <ats:G726_VBD>1</ats:G726_VBD>
1225:    <ats:G726_40_VBD>1</ats:G726_40_VBD>
1226:    <ats:G726_32_VBD>1</ats:G726_32_VBD>
1227:    <ats:G726_24_VBD>1</ats:G726_24_VBD>
1228:    <ats:G726_16_VBD>1</ats:G726_16_VBD>
1229:    <ats:WIND_BAND_AMR>1</ats:WIND_BAND_AMR>
1230:    <ats:GSM610>1</ats:GSM610>
1231:    <ats:H263_2000>1</ats:H263_2000>
1232:    <ats:BROADVOICE_32>1</ats:BROADVOICE_32>
1233:    <ats:UNKNOWN_CODEC>1</ats:UNKNOWN_CODEC>
1234:    <ats:ACODEC>255</ats:ACODEC>
1235:    <ats:VCODEC>255</ats:VCODEC>
1236:    <ats:POLIDX>255</ats:POLIDX>
1237:    <ats:NCPI>255</ats:NCPI>
1238:    <ats:ICPI>255</ats:ICPI>
1239:    <ats:EBOCL>0</ats:EBOCL>
1240:    <ats:EBOPL>0</ats:EBOPL>
1241:    <ats:EBOIT>2</ats:EBOIT>
1242:    <ats:RM>0</ats:RM>
1243:    <ats:CPC>0</ats:CPC>
1244:    <ats:PCHG>65535</ats:PCHG>
1245:    <ats:TFPT>4</ats:TFPT>
1246:    <ats:CHT>0</ats:CHT>
1247:    <ats:MCIDMODE>0</ats:MCIDMODE>
1248:    <ats:MCIDCMODE>255</ats:MCIDCMODE>
1249:    <ats:MCIDAMODE>0</ats:MCIDAMODE>
1250:    <ats:PREPAIDIDX>65535</ats:PREPAIDIDX>
1251:    <ats:CRBTID>65535</ats:CRBTID>
1252:    <ats:ODBBICTYPE>0</ats:ODBBICTYPE>
1253:    <ats:ODBBOCTYPE>0</ats:ODBBOCTYPE>
1254:    <ats:ODBBARTYPE>0</ats:ODBBARTYPE>
1255:    <ats:ODBSS>0</ats:ODBSS>
1256:    <ats:ODBBRCFTYPE>0</ats:ODBBRCFTYPE>
1257:    <ats:PNOTI>0</ats:PNOTI>
1258:    <ats:MAXPARACALL>1</ats:MAXPARACALL>
1259:    <ats:ATSDTMBUSY>1</ats:ATSDTMBUSY>
1260:    <ats:CALLCOUNT>1</ats:CALLCOUNT>
1261:    <ats:CDNOTICALLER>0</ats:CDNOTICALLER>
1262:    <ats:ISCHGFLAG>0</ats:ISCHGFLAG>
1263:    <ats:CHC>0</ats:CHC>
1264:    <ats:CUSER>0</ats:CUSER>
1265:    <ats:STCF>0</ats:STCF>
1266:    <ats:CHARSC>65535</ats:CHARSC>
1267:    <ats:REGUIDX>0</ats:REGUIDX>
1268:    <ats:SOCBFUNC>255</ats:SOCBFUNC>
1269:    <ats:SOCBPTONEIDX>65535</ats:SOCBPTONEIDX>
1270:    <ats:ADMINCBA>0</ats:ADMINCBA>
1271:    <ats:ADCONTROL_DIVERSION>0</ats:ADCONTROL_DIVERSION>
1272:    <ats:CPCRUS>255</ats:CPCRUS>
1273:    <ats:CUSCAT>0</ats:CUSCAT>
1274:    <ats:SPT100REL>1</ats:SPT100REL>
1275:  </ats:ADD_SBR>
1276:  ";
1277:   
1278:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1279:   
1280:              return soapEnvelopeXml;
1281:          }
1282:   
1283:          ////////////////////////////////////////////////////////////////////////////
1284:   
1285:          /// <summary>
1286:          /// Remove Sbr (RMV SBR)
1287:          /// </summary>
1288:          private static XmlDocument RmvSbrSoapEnvelopeXml(string service, int messageId)
1289:          {
1290:              string impu, xmlContent;
1291:              XmlDocument soapEnvelopeXml;
1292:   
1293:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1294:   
1295:              xmlContent = @"
1296:        <ats:RMV_SBR>
1297:           <ats:IMPU>" + impu + @"</ats:IMPU>
1298:        </ats:RMV_SBR>
1299:  ";
1300:   
1301:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1302:   
1303:              return soapEnvelopeXml;
1304:          }
1305:   
1306:          ////////////////////////////////////////////////////////////////////////////
1307:          ////////////////////////////////////////////////////////////////////////////
1308:   
1309:          /// <summary>
1310:          /// Modify Sbr Abbriviated Calling (MOD SBR NSABRC)
1311:          /// </summary>
1312:          private static XmlDocument ModSbrNsabrcSoapEnvelopeXml(string service, bool state, int messageId)
1313:          {
1314:              int i;
1315:              string impuSipDomain, xmlContent;
1316:              XmlDocument soapEnvelopeXml;
1317:   
1318:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1319:   
1320:              i = (state) ? 1 : 0;
1321:   
1322:              xmlContent = @"
1323:        <ats:MOD_SBR>
1324:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1325:           <ats:NSABRC>" + i + @"</ats:NSABRC>
1326:        </ats:MOD_SBR>
1327:  ";
1328:   
1329:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1330:   
1331:              return soapEnvelopeXml;
1332:          }
1333:   
1334:          ////////////////////////////////////////////////////////////////////////////
1335:   
1336:          /// <summary>
1337:          /// Modify Sbr Caller Id (MOD SBR NSCLIP)
1338:          /// </summary>
1339:          private static XmlDocument ModSbrNsclipSoapEnvelopeXml(string service, bool state, int messageId)
1340:          {
1341:              int i;
1342:              string impuSipDomain, xmlContent;
1343:              XmlDocument soapEnvelopeXml;
1344:   
1345:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1346:   
1347:              i = (state) ? 1 : 0;
1348:   
1349:              xmlContent = @"
1350:        <ats:MOD_SBR>
1351:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1352:           <ats:NSCLIP>" + i + @"</ats:NSCLIP>
1353:        </ats:MOD_SBR>
1354:  ";
1355:   
1356:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1357:   
1358:              return soapEnvelopeXml;
1359:          }
1360:   
1361:          ////////////////////////////////////////////////////////////////////////////
1362:   
1363:          /// <summary>
1364:          /// Modify Sbr Call Forwarding (MOD SBR NSCFU)
1365:          /// </summary>
1366:          private static XmlDocument ModSbrNscfuSoapEnvelopeXml(string service, bool state, int messageId)
1367:          {
1368:              int i;
1369:              string impuSipDomain, xmlContent;
1370:              XmlDocument soapEnvelopeXml;
1371:   
1372:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1373:   
1374:              i = (state) ? 1 : 0;
1375:   
1376:              xmlContent = @"
1377:        <ats:MOD_SBR>
1378:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1379:           <ats:NSCFU>" + i + @"</ats:NSCFU>
1380:        </ats:MOD_SBR>
1381:  ";
1382:   
1383:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1384:   
1385:              return soapEnvelopeXml;
1386:          }
1387:   
1388:          ////////////////////////////////////////////////////////////////////////////
1389:   
1390:          /// <summary>
1391:          /// Modify Sbr Call Waiting (MOD SBR NSCW)
1392:          /// </summary>
1393:          private static XmlDocument ModSbrNscwSoapEnvelopeXml(string service, bool state, int messageId)
1394:          {
1395:              int i;
1396:              string impuSipDomain, xmlContent;
1397:              XmlDocument soapEnvelopeXml;
1398:   
1399:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1400:   
1401:              i = (state) ? 1 : 0;
1402:   
1403:              xmlContent = @"
1404:        <ats:MOD_SBR>
1405:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1406:           <ats:NSCW>" + i + @"</ats:NSCW>
1407:        </ats:MOD_SBR>
1408:  ";
1409:   
1410:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1411:   
1412:              return soapEnvelopeXml;
1413:          }
1414:   
1415:          ////////////////////////////////////////////////////////////////////////////
1416:   
1417:          /// <summary>
1418:          /// Modify Sbr Conference Call (MOD SBR NS3PTY)
1419:          /// </summary>
1420:          private static XmlDocument ModSbrNs3ptySoapEnvelopeXml(string service, bool state, int messageId)
1421:          {
1422:              int i;
1423:              string impuSipDomain, xmlContent;
1424:              XmlDocument soapEnvelopeXml;
1425:   
1426:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1427:   
1428:              i = (state) ? 1 : 0;
1429:   
1430:              xmlContent = @"
1431:        <ats:MOD_SBR>
1432:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1433:           <ats:NS3PTY>" + i + @"</ats:NS3PTY>
1434:        </ats:MOD_SBR>
1435:  ";
1436:   
1437:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1438:   
1439:              return soapEnvelopeXml;
1440:          }
1441:   
1442:          ////////////////////////////////////////////////////////////////////////////
1443:   
1444:          /// <summary>
1445:          /// Modify Sbr Wakeup Call (MOD SBR NSWAKE_UP)
1446:          /// </summary>
1447:          private static XmlDocument ModSbrNswakeupSoapEnvelopeXml(string service, bool state, int messageId)
1448:          {
1449:              int i;
1450:              string impuSipDomain, xmlContent;
1451:              XmlDocument soapEnvelopeXml;
1452:   
1453:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1454:   
1455:              i = (state) ? 1 : 0;
1456:   
1457:              xmlContent = @"
1458:        <ats:MOD_SBR>
1459:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1460:           <ats:NSWAKE_UP>" + i + @"</ats:NSWAKE_UP>
1461:        </ats:MOD_SBR>
1462:  ";
1463:   
1464:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1465:   
1466:              return soapEnvelopeXml;
1467:          }
1468:   
1469:          ////////////////////////////////////////////////////////////////////////////
1470:   
1471:          /// <summary>
1472:          /// Modify Sbr International Calling User Controlled (MOD SBR ITT)
1473:          /// </summary>
1474:          private static XmlDocument ModSbrIttSoapEnvelopeXml(string service, bool state, int messageId)
1475:          {
1476:              int i;
1477:              string impuSipDomain, xmlContent;
1478:              XmlDocument soapEnvelopeXml;
1479:   
1480:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1481:   
1482:              i = (state) ? 1 : 0;
1483:   
1484:              xmlContent = @"
1485:        <ats:MOD_SBR>
1486:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1487:           <ats:ITT>" + i + @"</ats:ITT>
1488:        </ats:MOD_SBR>
1489:  ";
1490:   
1491:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1492:   
1493:              return soapEnvelopeXml;
1494:          }
1495:   
1496:          ////////////////////////////////////////////////////////////////////////////
1497:   
1498:          /// <summary>
1499:          /// Modify Sbr International Calling (MOD SBR NSCBA)
1500:          /// </summary>
1501:          private static XmlDocument ModSbrNscbaSoapEnvelopeXml(string service, bool state, int messageId)
1502:          {
1503:              int i;
1504:              string impuSipDomain, xmlContent;
1505:              XmlDocument soapEnvelopeXml;
1506:   
1507:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1508:   
1509:              i = (state) ? 1 : 0;
1510:   
1511:              xmlContent = @"
1512:        <ats:MOD_SBR>
1513:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1514:           <ats:NSCBA>" + i + @"</ats:NSCBA>
1515:        </ats:MOD_SBR>
1516:  ";
1517:   
1518:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1519:   
1520:              return soapEnvelopeXml;
1521:          }
1522:   
1523:          ////////////////////////////////////////////////////////////////////////////
1524:   
1525:          /// <summary>
1526:          /// Set Owed Restrict (SET OWSBR)
1527:          /// 
1528:          /// Function
1529:          /// 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.
1530:          /// 
1531:          /// Parameter Description
1532:          /// IMPU: sip:+96522904211@ims.moc.kw
1533:          /// US: User Stat: It specifies the owing status of a subscriber.
1534:          /// 
1535:          /// Options:
1536:          /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
1537:          /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
1538:          /// 2: INOWN(INOWN): The subscriber is forbidden to answer calls but can originate calls.
1539:          /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
1540:          /// </summary>
1541:          private static XmlDocument SetOwSbrSoapEnvelopeXml(string service, bool state, int messageId)
1542:          {
1543:              int i;
1544:              string impuSipDomain, xmlContent;
1545:              XmlDocument soapEnvelopeXml;
1546:   
1547:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1548:   
1549:              i = (state) ? 3 : 1;
1550:   
1551:              xmlContent = @"
1552:        <ats:SET_OWSBR>
1553:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1554:           <ats:US>" + i + @"</ats:US>
1555:        </ats:SET_OWSBR>
1556:  ";
1557:   
1558:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1559:   
1560:              return soapEnvelopeXml;
1561:          }
1562:   
1563:          ////////////////////////////////////////////////////////////////////////////
1564:   
1565:          /// <summary>
1566:          /// List Owed Restrict (LST OWSBR)
1567:          /// 
1568:          /// Function
1569:          /// This command is used to list the owing status of a subscriber.
1570:          /// 
1571:          /// Parameter Description
1572:          /// IMPU: here you will write the subscriber number in sip format, for example the number is (22904211)
1573:          /// IMPU: sip:+96522904211@ims.moc.kw
1574:          /// US: User Stat: It specifies the owing status of a subscriber.
1575:          /// 
1576:          /// Options:
1577:          /// 0: NORMAL (NORMAL): The subscriber can originate and answer calls normally.
1578:          /// 1: OUTOWN (OUTOWN): The subscriber can answer calls but is forbidden to originate any call except for owing override calls.
1579:          /// 2: INOWN(INOWN): The subscriber is forbidden to answer calls but can originate calls.
1580:          /// 3: BOTHOWN (BOTHOWN): The subscriber is forbidden to answer and originate any calls.
1581:          /// </summary>
1582:          private static XmlDocument LstOwSbrSoapEnvelopeXml(string service, int messageId)
1583:          {
1584:              string impuSipDomain, xmlContent;
1585:              XmlDocument soapEnvelopeXml;
1586:   
1587:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1588:   
1589:              xmlContent = @"
1590:        <ats:LST_OWSBR>
1591:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1592:        </ats:LST_OWSBR>
1593:  ";
1594:   
1595:              soapEnvelopeXml = Tecats0SoapEnvelopeXml(xmlContent, messageId);
1596:   
1597:              return soapEnvelopeXml;
1598:          }
1599:   
1600:          ////////////////////////////////////////////////////////////////////////////
1601:   
1602:          /// <summary>
1603:          /// RMV HSUB
1604:          /// 
1605:          /// RMV HSUB: SUBID="+96522220000@ims.moc.kw";
1606:          /// </summary>
1607:          private static XmlDocument RmvHsubSoapEnvelopeXml(string service, int messageId)
1608:          {
1609:              string subid, xmlContent;
1610:              XmlDocument soapEnvelopeXml;
1611:   
1612:              subid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.SubId(service);
1613:   
1614:              xmlContent = @"
1615:        <ats:RMV_HSUB>
1616:           <ats:SUBID>" + subid + @"</ats:SUBID>
1617:        </ats:RMV_HSUB>
1618:  ";
1619:   
1620:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1621:   
1622:              return soapEnvelopeXml;
1623:          }
1624:   
1625:          ////////////////////////////////////////////////////////////////////////////
1626:   
1627:          /// <summary>
1628:          /// RMV HSDAINF
1629:          /// 
1630:          /// RMV HSDAINF: IMPI="+96522220000@ims.moc.kw";
1631:          /// </summary>
1632:          private static XmlDocument RmvHsdainfSoapEnvelopeXml(string service, int messageId)
1633:          {
1634:              string impi, xmlContent;
1635:              XmlDocument soapEnvelopeXml;
1636:   
1637:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1638:   
1639:              xmlContent = @"
1640:        <ats:RMV_HSDAINF>
1641:           <ats:IMPI>" + impi + @"</ats:IMPI>
1642:        </ats:RMV_HSDAINF>
1643:  ";
1644:   
1645:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1646:   
1647:              return soapEnvelopeXml;
1648:          }
1649:   
1650:          ////////////////////////////////////////////////////////////////////////////
1651:   
1652:          /// <summary>
1653:          /// ADD DNAPTRREC
1654:          /// 
1655:          /// 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.";
1656:          /// </summary>
1657:          private static XmlDocument AddDnaptrrecSoapEnvelopeXml(string service, int messageId)
1658:          {
1659:              string name, impuSipDomain, xmlContent;
1660:              XmlDocument soapEnvelopeXml;
1661:   
1662:              name = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.E164ProtocolUserNumber(service);
1663:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1664:   
1665:              xmlContent = @"
1666:        <ats:ADD_DNAPTRREC>
1667:           <ats:NAME>" + name + @"</ats:NAME>
1668:           <ats:ZONENAME>5.6.9.e164.arpa</ats:ZONENAME>
1669:           <ats:ORDER>0</ats:ORDER>
1670:           <ats:PREFERENCE>10</ats:PREFERENCE>
1671:           <ats:FLAGS>U</ats:FLAGS>
1672:           <ats:SERVICE>E2U+sip</ats:SERVICE>
1673:           <ats:REGEXP>!^..*$!" + impuSipDomain + @"!</ats:REGEXP>
1674:           <ats:REPLACEMENT>ims.moc.kw.</ats:REPLACEMENT>
1675:        </ats:ADD_DNAPTRREC>
1676:  ";
1677:   
1678:              soapEnvelopeXml = TecensSoapEnvelopeXml(xmlContent, messageId);
1679:   
1680:              return soapEnvelopeXml;
1681:          }
1682:   
1683:          ////////////////////////////////////////////////////////////////////////////
1684:   
1685:          /// <summary>
1686:          /// ADD HSIFC
1687:          /// 
1688:          /// ADD HSIFC:IMPU="sip:+96522220000@ims.moc.kw",SIFCID=1;
1689:          /// </summary>
1690:          private static XmlDocument AddHsifcSoapEnvelopeXml(string service, int messageId)
1691:          {
1692:              string impuSipDomain, xmlContent;
1693:              XmlDocument soapEnvelopeXml;
1694:   
1695:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1696:   
1697:              xmlContent = @"
1698:        <ats:ADD_HSIFC>
1699:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1700:           <ats:SIFCID>1</ats:SIFCID>
1701:        </ats:ADD_HSIFC>
1702:  ";
1703:   
1704:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1705:   
1706:              return soapEnvelopeXml;
1707:          }
1708:   
1709:          ////////////////////////////////////////////////////////////////////////////
1710:   
1711:          /// <summary>
1712:          /// ADD HIMPU
1713:          /// 
1714:          /// ADD HIMPU:IMPI="+96522220000@ims.moc.kw",IMPU="tel:+96522220000";
1715:          /// </summary>
1716:          private static XmlDocument AddHimpuSoapEnvelopeXml(string service, int messageId)
1717:          {
1718:              string impi, impu, xmlContent;
1719:              XmlDocument soapEnvelopeXml;
1720:   
1721:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1722:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1723:   
1724:              xmlContent = @"
1725:        <ats:ADD_HIMPU>
1726:           <ats:IMPI>" + impi + @"</ats:IMPI>
1727:           <ats:IMPU>" + impu + @"</ats:IMPU>
1728:        </ats:ADD_HIMPU>
1729:  ";
1730:   
1731:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1732:   
1733:              return soapEnvelopeXml;
1734:          }
1735:   
1736:          ////////////////////////////////////////////////////////////////////////////
1737:   
1738:          /// <summary>
1739:          /// ADD HSUB
1740:          /// 
1741:          /// ADD HSUB:SUBID="+96522220000@ims.moc.kw",IMPI="+96522220000@ims.moc.kw",IMPU="sip:+96522220000@ims.moc.kw";
1742:          /// </summary>
1743:          private static XmlDocument AddHsubSoapEnvelopeXml(string service, int messageId)
1744:          {
1745:              string impi, impuSipDomain, subid, xmlContent;
1746:              XmlDocument soapEnvelopeXml;
1747:   
1748:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1749:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1750:              subid = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.SubId(service);
1751:   
1752:              xmlContent = @"
1753:        <ats:ADD_HSUB>
1754:           <ats:SUBID>" + subid + @"</ats:SUBID>
1755:           <ats:IMPI>" + impi + @"</ats:IMPI>
1756:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1757:        </ats:ADD_HSUB>
1758:  ";
1759:   
1760:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1761:   
1762:              return soapEnvelopeXml;
1763:          }
1764:   
1765:          ////////////////////////////////////////////////////////////////////////////
1766:   
1767:          /// <summary>
1768:          /// ADD HSDAINF
1769:          /// 
1770:          /// ADD HSDAINF:IMPI="+96522220000@ims.moc.kw",HUSERNAME="+96522220000@ims.moc.kw",PWD=admin,REALM="ims.moc.kw";
1771:          /// </summary>
1772:          private static XmlDocument AddHsdainfSoapEnvelopeXml(string service, int messageId)
1773:          {
1774:              string impi, husername, pwd, realm, xmlContent;
1775:              XmlDocument soapEnvelopeXml;
1776:   
1777:              impi = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impi(service);
1778:              husername = impi;
1779:              pwd = "admin";
1780:              realm = "ims.moc.kw";
1781:   
1782:              xmlContent = @"
1783:        <ats:ADD_HSDAINF>
1784:           <ats:IMPI>" + impi + @"</ats:IMPI>
1785:           <ats:HUSERNAME>" + husername + @"</ats:HUSERNAME>
1786:           <ats:PWD>" + pwd + @"</ats:PWD>
1787:           <ats:REALM>" + realm + @"</ats:REALM>
1788:        </ats:ADD_HSDAINF>
1789:  ";
1790:   
1791:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1792:   
1793:              return soapEnvelopeXml;
1794:          }
1795:   
1796:          ////////////////////////////////////////////////////////////////////////////
1797:   
1798:          /// <summary>
1799:          /// SET HREGAUTH
1800:          /// 
1801:          /// SET HREGAUTH:IMPU="sip:+96522220000@ims.moc.kw",REGAUTH=TRUE;
1802:          /// </summary>
1803:          private static XmlDocument SetHregauthSoapEnvelopeXml(string service, int messageId)
1804:          {
1805:              string impuSipDomain, xmlContent;
1806:              XmlDocument soapEnvelopeXml;
1807:   
1808:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1809:   
1810:              xmlContent = @"
1811:        <ats:SET_HREGAUTH>
1812:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1813:           <ats:REGAUTH>TRUE</ats:REGAUTH>
1814:        </ats:SET_HREGAUTH>
1815:  ";
1816:   
1817:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1818:   
1819:              return soapEnvelopeXml;
1820:          }
1821:   
1822:          ////////////////////////////////////////////////////////////////////////////
1823:   
1824:          /// <summary>
1825:          /// SET HVNTPLID
1826:          /// 
1827:          /// SET HVNTPLID: IMPU="sip:+96522220000@ims.moc.kw", VNTPLID=0;
1828:          /// </summary>
1829:          private static XmlDocument SetHvntplidForImpuSipDomainSoapEnvelopeXml(string service, int messageId)
1830:          {
1831:              string impuSipDomain, xmlContent;
1832:              XmlDocument soapEnvelopeXml;
1833:   
1834:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1835:   
1836:              xmlContent = @"
1837:        <ats:SET_HVNTPLID>
1838:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1839:           <ats:VNTPLID>0</ats:VNTPLID>
1840:        </ats:SET_HVNTPLID>
1841:  ";
1842:   
1843:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1844:   
1845:              return soapEnvelopeXml;
1846:          }
1847:   
1848:          ////////////////////////////////////////////////////////////////////////////
1849:   
1850:          /// <summary>
1851:          /// SET HVNTPLID
1852:          /// 
1853:          /// SET HVNTPLID: IMPU="tel:+96522220000", VNTPLID=0;
1854:          /// </summary>
1855:          private static XmlDocument SetHvntplidForImpuSoapEnvelopeXml(string service, int messageId)
1856:          {
1857:              string impu, xmlContent;
1858:              XmlDocument soapEnvelopeXml;
1859:   
1860:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1861:   
1862:              xmlContent = @"
1863:        <ats:SET_HVNTPLID>
1864:           <ats:IMPU>" + impu + @"</ats:IMPU>
1865:           <ats:VNTPLID>0</ats:VNTPLID>
1866:        </ats:SET_HVNTPLID>
1867:  ";
1868:   
1869:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1870:   
1871:              return soapEnvelopeXml;
1872:          }
1873:   
1874:          ////////////////////////////////////////////////////////////////////////////
1875:   
1876:          /// <summary>
1877:          /// SET HIRS
1878:          /// 
1879:          /// SET HIRS:IRSID=1,IMPULIST="\"sip:+96522220000@ims.moc.kw\"&\"tel:+96522220000\""; 
1880:          /// </summary>
1881:          private static XmlDocument SetHirsSoapEnvelopeXml(string service, int messageId)
1882:          {
1883:              string impu, impuSipDomain, impuList, xmlContent;
1884:              XmlDocument soapEnvelopeXml;
1885:   
1886:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1887:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1888:   
1889:              // Copy in SetHaliaspuSoapEnvelopeXml and SetHirsSoapEnvelopeXml
1890:              //impuList = @"""" + impuSipDomain + @"""&""" + impu + @"""";
1891:              impuList = @"""" + impuSipDomain + @"""&amp;""" + impu + @"""";
1892:              //impuList = impuSipDomain + @"&amp;" + impu;
1893:   
1894:              xmlContent = @"
1895:        <ats:SET_HIRS>
1896:           <ats:IMPULIST>" + impuList + @"</ats:IMPULIST>
1897:           <ats:IRSID>1</ats:IRSID>
1898:        </ats:SET_HIRS>
1899:  ";
1900:   
1901:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1902:   
1903:              return soapEnvelopeXml;
1904:          }
1905:   
1906:          ////////////////////////////////////////////////////////////////////////////
1907:   
1908:          /// <summary>
1909:          /// SET HDEFIMPU
1910:          /// 
1911:          /// SET HDEFIMPU: IRSID=1, IMPU="sip:+96522220000@ims.moc.kw";
1912:          /// </summary>
1913:          private static XmlDocument SetHdefimpuSoapEnvelopeXml(string service, int messageId)
1914:          {
1915:              string impuSipDomain, xmlContent;
1916:              XmlDocument soapEnvelopeXml;
1917:   
1918:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1919:   
1920:              xmlContent = @"
1921:        <ats:SET_HDEFIMPU>
1922:           <ats:IMPU>" + impuSipDomain + @"</ats:IMPU>
1923:           <ats:IRSID>1</ats:IRSID>
1924:        </ats:SET_HDEFIMPU>
1925:  ";
1926:   
1927:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1928:   
1929:              return soapEnvelopeXml;
1930:          }
1931:   
1932:          ////////////////////////////////////////////////////////////////////////////
1933:   
1934:          /// <summary>
1935:          /// SET HSPSHARE
1936:          /// 
1937:          /// SET HSPSHARE:BASEIMPU="sip:+96522220000@ims.moc.kw",IMPU="tel:+96522220000";
1938:          /// </summary>
1939:          private static XmlDocument SetHspshareSoapEnvelopeXml(string service, int messageId)
1940:          {
1941:              string impu, impuSipDomain, xmlContent;
1942:              XmlDocument soapEnvelopeXml;
1943:   
1944:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1945:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1946:   
1947:              xmlContent = @"
1948:        <ats:SET_HSPSHARE>
1949:           <ats:IMPU>" + impu + @"</ats:IMPU>
1950:           <ats:BASEIMPU>" + impuSipDomain + @"</ats:BASEIMPU>
1951:        </ats:SET_HSPSHARE>
1952:  ";
1953:   
1954:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1955:   
1956:              return soapEnvelopeXml;
1957:          }
1958:   
1959:          ////////////////////////////////////////////////////////////////////////////
1960:   
1961:          /// <summary>
1962:          /// SET HALIASPU
1963:          /// 
1964:          /// SET HALIASPU:ALIASID=1,IMPULIST="\"sip:+96522220000@ims.moc.kw\"&\"tel:+96522220000\"";
1965:          /// </summary>
1966:          private static XmlDocument SetHaliaspuSoapEnvelopeXml(string service, int messageId)
1967:          {
1968:              string impu, impuSipDomain, impuList, xmlContent;
1969:              XmlDocument soapEnvelopeXml;
1970:   
1971:              impu = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Impu(service);
1972:              impuSipDomain = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ImpuSipDomain(service);
1973:   
1974:              // Copy in SetHaliaspuSoapEnvelopeXml and SetHirsSoapEnvelopeXml
1975:              //impuList = @"""" + impuSipDomain + @"""&""" + impu + @"""";
1976:              impuList = @"""" + impuSipDomain + @"""&amp;""" + impu + @"""";
1977:              //impuList = impuSipDomain + @"&amp;" + impu;
1978:   
1979:              xmlContent = @"
1980:        <ats:SET_HALIASPU>
1981:           <ats:IMPULIST>" + impuList + @"</ats:IMPULIST>
1982:           <ats:ALIASID>1</ats:ALIASID>
1983:        </ats:SET_HALIASPU>
1984:  ";
1985:   
1986:              soapEnvelopeXml = TechssSoapEnvelopeXml(xmlContent, messageId);
1987:   
1988:              return soapEnvelopeXml;
1989:          }
1990:   
1991:          ////////////////////////////////////////////////////////////////////////////
1992:   
1993:          /// <summary>
1994:          /// RMV DNAPTRREC
1995:          /// 
1996:          /// RMV DNAPTRREC: NAME="0.0.0.0.2.2.2.2.5.6.9.e164.arpa";
1997:          /// </summary>
1998:          private static XmlDocument RmvDnaptrrecSoapEnvelopeXml(string service, int messageId)
1999:          {
2000:              string name, xmlContent;
2001:              XmlDocument soapEnvelopeXml;
2002:   
2003:              name = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.E164ProtocolUserNumber(service);
2004:   
2005:              xmlContent = @"
2006:        <ats:RMV_DNAPTRREC>
2007:           <ats:NAME>" + name + @"</ats:NAME>
2008:        </ats:RMV_DNAPTRREC>
2009:  ";
2010:   
2011:              soapEnvelopeXml = TecensSoapEnvelopeXml(xmlContent, messageId);
2012:   
2013:              return soapEnvelopeXml;
2014:          }
2015:   
2016:          ////////////////////////////////////////////////////////////////////////////
2017:          ////////////////////////////////////////////////////////////////////////////
2018:   
2019:          /// <summary>
2020:          ///
2021:          /// </summary>
2022:          private static XmlDocument TechssSoapEnvelopeXml(string xmlBodyContent, int messageId)
2023:          {
2024:              return SoapEnvelopeXml("techss", xmlBodyContent, messageId);
2025:          }
2026:   
2027:          ////////////////////////////////////////////////////////////////////////////
2028:   
2029:          /// <summary>
2030:          ///
2031:          /// </summary>
2032:          private static XmlDocument Tecats0SoapEnvelopeXml(string xmlBodyContent, int messageId)
2033:          {
2034:              return SoapEnvelopeXml("tecats0", xmlBodyContent, messageId);
2035:          }
2036:   
2037:          ////////////////////////////////////////////////////////////////////////////
2038:   
2039:          /// <summary>
2040:          ///
2041:          /// </summary>
2042:          private static XmlDocument TecensSoapEnvelopeXml(string xmlBodyContent, int messageId)
2043:          {
2044:              return SoapEnvelopeXml("tecens", xmlBodyContent, messageId);
2045:          }
2046:   
2047:          ////////////////////////////////////////////////////////////////////////////
2048:   
2049:          /// <summary>
2050:          ///
2051:          /// </summary>
2052:          private static XmlDocument SoapEnvelopeXml(string meName, string xmlBodyContent, int messageId)
2053:          {
2054:              string s, userName, password;
2055:              XmlDocument soapEnvelopeXml = new XmlDocument();
2056:   
2057:              userName = Ia.Ngn.Cl.Model.Business.Huawei.Ims.UserName;
2058:              password = Ia.Ngn.Cl.Model.Business.Huawei.Ims.Password;
2059:   
2060:              s = @"<?xml version=""1.0"" encoding=""UTF-8""?>
2061:  <soap-env:Envelope xmlns:soap-env=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:ats=""http://www.huawei.com/ATS"" >
2062:      <soap-env:Header>
2063:          <ats:MessageID>" + messageId + @"</ats:MessageID>
2064:          <ats:MEName>" + meName + @"</ats:MEName>
2065:          <ats:Authentication>
2066:              <ats:Username>" + userName + @"</ats:Username>
2067:              <ats:Password>" + password + @"</ats:Password>
2068:          </ats:Authentication>
2069:      </soap-env:Header>
2070:      <soap-env:Body>" + xmlBodyContent + @"</soap-env:Body>
2071:  </soap-env:Envelope>";
2072:   
2073:              soapEnvelopeXml.LoadXml(s);
2074:   
2075:              return soapEnvelopeXml;
2076:          }
2077:   
2078:          ////////////////////////////////////////////////////////////////////////////
2079:   
2080:          /// <summary>
2081:          ///
2082:          /// </summary>
2083:          private void SendSoapRequestAndReadResponse(XmlDocument soapEnvelopeXml, out XmlDocument soapResultXmlDocument)
2084:          {
2085:              string url, soapAction;
2086:              string soapResult;
2087:              HttpWebRequest request;
2088:   
2089:              //sessionId = "";
2090:              soapResultXmlDocument = new XmlDocument();
2091:   
2092:              url = Ia.Ngn.Cl.Model.Business.Huawei.Ims.BaseAddress + "/" + Ia.Ngn.Cl.Model.Business.Huawei.Ims.ServiceUrl;
2093:              soapAction = "ATSV100R003C01SPC100";
2094:   
2095:              request = (HttpWebRequest)WebRequest.Create(url);
2096:   
2097:              request.Headers.Add(@"SOAP:" + soapAction);
2098:              request.ContentType = "text/xml;charset=utf-8";
2099:              request.Accept = "text/xml";
2100:              request.Method = "POST";
2101:   
2102:              byte[] bytes;
2103:              bytes = System.Text.Encoding.ASCII.GetBytes(soapEnvelopeXml.OuterXml);
2104:              request.ContentLength = bytes.Length;
2105:   
2106:              try
2107:              {
2108:                  using (Stream stream = request.GetRequestStream())
2109:                  {
2110:                      stream.Write(bytes, 0, bytes.Length);
2111:                      //soapEnvelopeXml.Save(stream);
2112:                  }
2113:   
2114:                  using (WebResponse response = request.GetResponse())
2115:                  {
2116:                      using (StreamReader rd = new StreamReader(response.GetResponseStream()))
2117:                      {
2118:                          soapResult = rd.ReadToEnd();
2119:   
2120:                          soapResultXmlDocument.LoadXml(soapResult);
2121:                      }
2122:                  }
2123:              }
2124:              catch (Exception)
2125:              {
2126:              }
2127:          }
2128:   
2129:          ////////////////////////////////////////////////////////////////////////////
2130:   
2131:          /// <summary>
2132:          ///
2133:          /// </summary>
2134:          private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode)
2135:          {
2136:              ParseSoapResultXml(soapResultXmlDocument, out resultCode, out List<Dictionary<string, string>> parameterDictionaryList);
2137:          }
2138:   
2139:          ////////////////////////////////////////////////////////////////////////////
2140:   
2141:          /// <summary>
2142:          ///
2143:          /// </summary>
2144:          private void ParseSoapResultXml(XmlDocument soapResultXmlDocument, out Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode resultCode, out List<Dictionary<string, string>> parameterDictionaryList)
2145:          {
2146:              string resultDescription;
2147:              Dictionary<string, string> parameterDictionary;
2148:              XmlNode resultXmlNode, itemXmlNode;
2149:   
2150:              XmlNamespaceManager ns = new XmlNamespaceManager(soapResultXmlDocument.NameTable);
2151:              ns.AddNamespace("SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/");
2152:              ns.AddNamespace("ns1", "http://www.huawei.com/ATS");
2153:   
2154:              parameterDictionary = new Dictionary<string, string>();
2155:              parameterDictionaryList = new List<Dictionary<string, string>>(32);
2156:   
2157:              if (soapResultXmlDocument.DocumentElement != null)
2158:              {
2159:                  resultXmlNode = soapResultXmlDocument.DocumentElement.SelectSingleNode("SOAP-ENV:Body/*/ns1:Result", ns);
2160:   
2161:                  if (resultXmlNode != null && resultXmlNode.HasChildNodes)
2162:                  {
2163:                      if (resultXmlNode["ns1:ResultCode"] != null) resultCode = (Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode)int.Parse(resultXmlNode["ns1:ResultCode"].InnerText);
2164:                      else if (resultXmlNode["ResultCode"] != null) resultCode = (Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode)int.Parse(resultXmlNode["ResultCode"].InnerText);
2165:                      else resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2166:   
2167:                      if (resultXmlNode["ns1:ResultDesc"] != null) resultDescription = resultXmlNode["ns1:ResultDesc"].InnerText;
2168:                      else if (resultXmlNode["ResultDesc"] != null) resultDescription = resultXmlNode["ResultDesc"].InnerText;
2169:                      else resultDescription = string.Empty;
2170:   
2171:                      if (resultCode != Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed && resultDescription != string.Empty)
2172:                      {
2173:                          //System.Diagnostics.Debug.WriteLine(resultCode + ": " + resultDescription);
2174:   
2175:                          if (resultCode == Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.OperationSucceeded)
2176:                          {
2177:                              itemXmlNode = soapResultXmlDocument.DocumentElement.SelectSingleNode("SOAP-ENV:Body/*/ns1:Result/ns1:ResultData/ns1:Table1/ns1:Item", ns);
2178:   
2179:                              if (itemXmlNode != null && itemXmlNode.HasChildNodes)
2180:                              {
2181:                                  parameterDictionary = CollectXmlNodeChildNodesValuesIntoDictionary(itemXmlNode, "ns1:");
2182:   
2183:                                  parameterDictionaryList.Add(parameterDictionary);
2184:                              }
2185:                          }
2186:                          else
2187:                          {
2188:   
2189:                          }
2190:                      }
2191:                      else
2192:                      {
2193:                          resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2194:                      }
2195:                  }
2196:                  else
2197:                  {
2198:                      resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2199:                  }
2200:              }
2201:              else
2202:              {
2203:                  resultCode = Ia.Ngn.Cl.Model.Client.Huawei.Ims.ResultCode.Failed;
2204:              }
2205:          }
2206:   
2207:          ////////////////////////////////////////////////////////////////////////////
2208:   
2209:          /// <summary>
2210:          ///
2211:          /// </summary>
2212:          /// <returns></returns>
2213:          private Dictionary<string, string> CollectXmlNodeChildNodesValuesIntoDictionary(XmlNode xn, string prefixToRemove)
2214:          {
2215:              string name;
2216:              Dictionary<string, string> parameterDictionary;
2217:   
2218:              parameterDictionary = new Dictionary<string, string>();
2219:   
2220:              foreach (XmlElement xe in xn.ChildNodes)
2221:              {
2222:                  name = xe.Name.Replace(prefixToRemove, "");
2223:   
2224:                  // below: if the node has children(?) we will treat it as an XDocument and add its name to a top level tag
2225:                  if (xe.ChildNodes.Count > 1) parameterDictionary.Add(name, xe.OuterXml);
2226:                  else parameterDictionary.Add(name, xe.InnerText);
2227:              }
2228:   
2229:              return parameterDictionary;
2230:          }
2231:   
2232:          ////////////////////////////////////////////////////////////////////////////
2233:          ////////////////////////////////////////////////////////////////////////////
2234:      }
2235:   
2236:      ////////////////////////////////////////////////////////////////////////////
2237:      ////////////////////////////////////////////////////////////////////////////
2238:  }