Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » VoipPstnUser

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

Huawei's EMS VOIP PSTN User support class of Next Generation Network'a (NGN's) business model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Web.Security;
   6:  using System.Text.RegularExpressions;
   7:   
   8:  namespace Ia.Ngn.Cl.Model.Business.Huawei
   9:  {
  10:      ////////////////////////////////////////////////////////////////////////////
  11:   
  12:      /// <summary publish="true">
  13:      /// Huawei's EMS VOIP PSTN User support class of Next Generation Network'a (NGN's) business model.
  14:      /// </summary>
  15:      /// 
  16:      /// <remarks> 
  17:      /// Copyright © 2017-2018 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  18:      ///
  19:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  20:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  21:      ///
  22:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  23:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  24:      /// 
  25:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  26:      /// 
  27:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  28:      /// </remarks> 
  29:      public partial class VoipPstnUser
  30:      {
  31:          /// <summary/>
  32:          public VoipPstnUser() { }
  33:   
  34:          ////////////////////////////////////////////////////////////////////////////
  35:   
  36:          /// <summary>
  37:          ///
  38:          /// </summary>
  39:          public static string VoipPstnUserId(string ontId, int pnOrTid)
  40:          {
  41:              return ontId + pnOrTid.ToString().PadLeft(3, '0'); // 3 because an MDU might have more than 100 numbers
  42:          }
  43:   
  44:          ////////////////////////////////////////////////////////////////////////////
  45:   
  46:          /// <summary>
  47:          ///
  48:          /// </summary>
  49:          public static int SpecialIntegerParameterHandling(string parameterName, string parameterValue)
  50:          {
  51:              int i;
  52:   
  53:              if (parameterName == "TID")
  54:              {
  55:                  /// TID INTEGER 0-9999 Indicates the terminal ID
  56:   
  57:                  parameterValue = parameterValue.Replace("--", "-1");
  58:              }
  59:              else if (parameterName == "PITime")
  60:              {
  61:                  /// PITime INTEGER 0-20 Indicates the duration of waiting to collect digits. Unit: 10 ms. The MA5600T, MA5603T, MA5606T, MA5620E, MA5620G, MA5610, and MA5616 do not support this parameter. 
  62:   
  63:                  parameterValue = parameterValue.Replace("--", "-1");
  64:              }
  65:              else
  66:              {
  67:   
  68:              }
  69:   
  70:              i = int.Parse(parameterValue);
  71:   
  72:              return i;
  73:          }
  74:   
  75:          ////////////////////////////////////////////////////////////////////////////
  76:          ////////////////////////////////////////////////////////////////////////////
  77:      }
  78:   
  79:      ////////////////////////////////////////////////////////////////////////////
  80:      ////////////////////////////////////////////////////////////////////////////
  81:  }