)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Ims (Ia.Ftn.Cl.Models.Client.Huawei)

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

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