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

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Ims

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

Optical Fiber Network Management Intranet Portal (OFN) client support class for Huawei's Next Generation Network (NGN) client model.

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