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) data model.

   1:  using System;
   2:  using System.Collections;
   3:  using System.Collections.Generic;
   4:  using System.Linq;
   5:  using System.Data;
   6:  using System.Data.Entity;
   7:  using System.Text;
   8:   
   9:  namespace Ia.Ngn.Cl.Model.Data.Huawei
  10:  {
  11:      ////////////////////////////////////////////////////////////////////////////
  12:   
  13:      /// <summary publish="true">
  14:      /// Huawei's EMS VOIP PSTN User support class of Next Generation Network'a (NGN's) data model.
  15:      /// </summary>
  16:      /// 
  17:      /// <remarks> 
  18:      /// Copyright © 2017-2018 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  19:      ///
  20:      /// 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
  21:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  22:      ///
  23:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  24:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  25:      /// 
  26:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  27:      /// 
  28:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  29:      /// </remarks> 
  30:      public partial class VoipPstnUser
  31:      {
  32:          /// <summary/>
  33:          public VoipPstnUser() { }
  34:   
  35:          ////////////////////////////////////////////////////////////////////////////
  36:   
  37:          /// <summary>
  38:          /// Update a single EmsVoipPstnUser item
  39:          /// </summary>
  40:          public static bool Update(Ia.Ngn.Cl.Model.Business.Huawei.Ems.Response response, out Ia.Cl.Model.Result result)
  41:          {
  42:              bool isUpdated;
  43:              int did, queryFn, querySn, queryPn, readItemCount, existingItemCount, insertedItemCount, updatedItemCount, deletedItemCount, pnOrTid, fn, sn, pn;
  44:              string id, queryCommand, queryDev, dn;
  45:              DataColumnCollection columns;
  46:              DataRow columnDataRow;
  47:              Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt;
  48:              Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser voipPstnUser, newVoipPstnUser;
  49:              Ia.Ngn.Cl.Model.Huawei.EmsOnt emsOnt;
  50:              List<string> itemIdList;
  51:              List<Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser> voipPstnUserList;
  52:   
  53:              isUpdated = false;
  54:              readItemCount = existingItemCount = insertedItemCount = updatedItemCount = deletedItemCount = 0;
  55:              result = new Ia.Cl.Model.Result();
  56:   
  57:              if (response.QueryDataTable != null)
  58:              {
  59:                  queryCommand = response.CommandFromCorrelationTagDictionaryByCtag;
  60:   
  61:                  // LST-VOIPPSTNUSER::DEV=MDU-JBA-943-002,FN=0,SN=3,PN=10:1111::;
  62:                  queryDev = Ia.Cl.Model.Default.Match(queryCommand, @"DEV=(.+?),");
  63:                  queryFn = int.Parse(Ia.Cl.Model.Default.Match(queryCommand, @"FN=(\d+)"));
  64:                  querySn = int.Parse(Ia.Cl.Model.Default.Match(queryCommand, @"SN=(\d+)"));
  65:                  queryPn = int.Parse(Ia.Cl.Model.Default.Match(queryCommand, @"PN=(\d+)"));
  66:   
  67:                  columns = response.QueryDataTable.Columns;
  68:                  readItemCount = response.QueryDataTable.Rows.Count;
  69:   
  70:                  nddOnt = Ia.Ngn.Cl.Model.Business.Default.NddOntFromHuaweiEmsMduNameFormat(queryDev);
  71:   
  72:                  if (nddOnt != null)
  73:                  {
  74:                      itemIdList = new List<string>(response.QueryDataTable.Rows.Count + 1);
  75:   
  76:                      using (var db = new Ia.Ngn.Cl.Model.Ngn())
  77:                      {
  78:                          emsOnt = (from eo in db.EmsOnts where eo.Id == nddOnt.Id select eo).SingleOrDefault();
  79:   
  80:                          if (emsOnt != null)
  81:                          {
  82:                              // this should always give a single value or non
  83:                              voipPstnUserList = (from eo in db.EmsVoipPstnUsers where eo.EmsOnt.Id == emsOnt.Id && eo.PN == queryPn select eo).ToList();
  84:   
  85:                              existingItemCount = voipPstnUserList.Count;
  86:   
  87:                              if (response.QueryDataTable.Rows.Count >= 1)
  88:                              {
  89:                                  columnDataRow = response.QueryDataTable.Rows[0];
  90:   
  91:                                  foreach (DataRow dataRow in response.QueryDataTable.Rows)
  92:                                  {
  93:                                      did = int.Parse(dataRow[columns.IndexOf("DID")].ToString());
  94:                                      fn = int.Parse(dataRow[columns.IndexOf("FN")].ToString());
  95:                                      sn = int.Parse(dataRow[columns.IndexOf("SN")].ToString());
  96:                                      pn = int.Parse(dataRow[columns.IndexOf("PN")].ToString());
  97:   
  98:                                      dn = columns.Contains("DN") ? dataRow[columns.IndexOf("DN")].ToString() : string.Empty;
  99:   
 100:                                      if (pn == queryPn)
 101:                                      {
 102:                                          // we will check that the records is for a real 11 digit number, otherwise we will not send it to the database
 103:                                          if (Ia.Ngn.Cl.Model.Business.NumberFormatConverter.IsMatchToServiceWithCountryCode(dn))
 104:                                          {
 105:                                              id = Ia.Ngn.Cl.Model.Business.Huawei.VoipPstnUser.VoipPstnUserId(nddOnt.Id, pn);
 106:   
 107:                                              voipPstnUser = (from eo in voipPstnUserList where eo.Id == id select eo).SingleOrDefault();
 108:   
 109:                                              newVoipPstnUser = new Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser()
 110:                                              {
 111:                                                  Id = id,
 112:                                                  DID = did,
 113:                                                  FN = fn,
 114:                                                  SN = sn,
 115:                                                  PN = pn,
 116:                                                  DN = dn.ToString(),
 117:                                                  MGID = columns.Contains("MGID") ? int.Parse(dataRow[columns.IndexOf("MGID")].ToString()) : 0,
 118:                                                  MGNAME = columns.Contains("MGNAME") ? dataRow[columns.IndexOf("MGNAME")].ToString() : string.Empty,
 119:                                                  TID = columns.Contains("TID") ? Ia.Ngn.Cl.Model.Business.Huawei.VoipPstnUser.SpecialIntegerParameterHandling("TID", dataRow[columns.IndexOf("TID")].ToString()) : 0,
 120:                                                  LayeredConf = columns.Contains("LayeredConf") ? dataRow[columns.IndexOf("LayeredConf")].ToString() : string.Empty,
 121:                                                  HighLevelWidth = columns.Contains("HighLevelWidth") ? int.Parse(dataRow[columns.IndexOf("HighLevelWidth")].ToString()) : 0,
 122:                                                  LowerLevelWidth = columns.Contains("LowerLevelWidth") ? int.Parse(dataRow[columns.IndexOf("LowerLevelWidth")].ToString()) : 0,
 123:                                                  Voltage = columns.Contains("Voltage") ? dataRow[columns.IndexOf("Voltage")].ToString() : string.Empty,
 124:                                                  KCType = columns.Contains("KCType") ? dataRow[columns.IndexOf("KCType")].ToString() : string.Empty,
 125:                                                  VoiceGain = columns.Contains("VoiceGain") ? dataRow[columns.IndexOf("VoiceGain")].ToString() : string.Empty,
 126:                                                  LimitPulseDial = columns.Contains("LimitPulseDial") ? dataRow[columns.IndexOf("LimitPulseDial")].ToString() : string.Empty,
 127:                                                  RevPolarity = columns.Contains("RevPolarity") ? dataRow[columns.IndexOf("RevPolarity")].ToString() : string.Empty,
 128:                                                  RevPoleLevel = columns.Contains("RevPoleLevel") ? int.Parse(dataRow[columns.IndexOf("RevPoleLevel")].ToString()) : 0,
 129:                                                  RevPolePulse = columns.Contains("RevPolePulse") ? dataRow[columns.IndexOf("RevPolePulse")].ToString() : string.Empty,
 130:                                                  PSTAT = columns.Contains("PSTAT") ? dataRow[columns.IndexOf("PSTAT")].ToString() : string.Empty,
 131:                                                  ConfigStatus = columns.Contains("ConfigStatus") ? dataRow[columns.IndexOf("ConfigStatus")].ToString() : string.Empty,
 132:                                                  ServiceStatus = columns.Contains("ServiceStatus") ? dataRow[columns.IndexOf("ServiceStatus")].ToString() : string.Empty,
 133:                                                  ServiceType = columns.Contains("ServiceType") ? dataRow[columns.IndexOf("ServiceType")].ToString() : string.Empty,
 134:                                                  ALIAS = columns.Contains("ALIAS") ? dataRow[columns.IndexOf("ALIAS")].ToString() : string.Empty,
 135:                                                  UserType = columns.Contains("UserType") ? dataRow[columns.IndexOf("UserType")].ToString() : string.Empty,
 136:                                                  Impedance = columns.Contains("Impedance") ? dataRow[columns.IndexOf("Impedance")].ToString() : string.Empty,
 137:                                                  Current = columns.Contains("Current") ? dataRow[columns.IndexOf("Current")].ToString() : string.Empty,
 138:                                                  DCTime = columns.Contains("DCTime") ? int.Parse(dataRow[columns.IndexOf("DCTime")].ToString()) : 0,
 139:                                                  PITime = columns.Contains("PITime") ? Ia.Ngn.Cl.Model.Business.Huawei.VoipPstnUser.SpecialIntegerParameterHandling("PITime", dataRow[columns.IndexOf("PITime")].ToString()) : 0,
 140:                                                  FSKDelayInterval = columns.Contains("FSKDelayInterval") ? int.Parse(dataRow[columns.IndexOf("FSKDelayInterval")].ToString()) : 0,
 141:                                                  ActualVoiceGain = columns.Contains("ActualVoiceGain") ? dataRow[columns.IndexOf("ActualVoiceGain")].ToString() : string.Empty,
 142:                                                  CidTransWhen = columns.Contains("CidTransWhen") ? dataRow[columns.IndexOf("CidTransWhen")].ToString() : string.Empty,
 143:                                                  CidFormat = columns.Contains("CidFormat") ? dataRow[columns.IndexOf("CidFormat")].ToString() : string.Empty,
 144:                                                  OverloadPRI = columns.Contains("OverloadPRI") ? dataRow[columns.IndexOf("OverloadPRI")].ToString() : string.Empty,
 145:                                                  ImpedanceProfile = columns.Contains("ImpedanceProfile") ? dataRow[columns.IndexOf("ImpedanceProfile")].ToString() : string.Empty,
 146:                                                  SendVoiceGain = columns.Contains("SendVoiceGain") ? dataRow[columns.IndexOf("SendVoiceGain")].ToString() : string.Empty,
 147:                                                  RecvVoiceGain = columns.Contains("RecvVoiceGain") ? dataRow[columns.IndexOf("RecvVoiceGain")].ToString() : string.Empty,
 148:                                                  RevPolarityMode = columns.Contains("RevPolarityMode") ? dataRow[columns.IndexOf("RevPolarityMode")].ToString() : string.Empty,
 149:                                                  PortRunState = columns.Contains("PortRunState") ? dataRow[columns.IndexOf("PortRunState")].ToString() : string.Empty,
 150:                                                  PortTestState = columns.Contains("PortTestState") ? dataRow[columns.IndexOf("PortTestState")].ToString() : string.Empty,
 151:                                                  PortLineState = columns.Contains("PortLineState") ? dataRow[columns.IndexOf("PortLineState")].ToString() : string.Empty,
 152:                                                  PortLoopState = columns.Contains("PortLoopState") ? dataRow[columns.IndexOf("PortLoopState")].ToString() : string.Empty,
 153:                                                  ServiceRunState = columns.Contains("ServiceRunState") ? dataRow[columns.IndexOf("ServiceRunState")].ToString() : string.Empty,
 154:                                                  ServiceAdminState = columns.Contains("ServiceAdminState") ? dataRow[columns.IndexOf("ServiceAdminState")].ToString() : string.Empty,
 155:                                                  ActualSendVoiceGain = columns.Contains("ActualSendVoiceGain") ? dataRow[columns.IndexOf("ActualSendVoiceGain")].ToString() : string.Empty,
 156:                                                  ActualRecvVo = columns.Contains("ActualRecvVo") ? dataRow[columns.IndexOf("ActualRecvVo")].ToString() : string.Empty,
 157:                                                  AGCEnable = columns.Contains("AGCEnable") ? dataRow[columns.IndexOf("AGCEnable")].ToString() : string.Empty,
 158:                                                  AGCEnableLevel = columns.Contains("AGCEnableLevel") ? int.Parse(dataRow[columns.IndexOf("AGCEnableLevel")].ToString()) : 0,
 159:                                                  SNSEnable = columns.Contains("SNSEnable") ? dataRow[columns.IndexOf("SNSEnable")].ToString() : string.Empty,
 160:                                                  SNSEnableLevel = columns.Contains("SNSEnableLevel") ? int.Parse(dataRow[columns.IndexOf("SNSEnableLevel")].ToString()) : 0,
 161:                                                  NlpMode = columns.Contains("NlpMode") ? dataRow[columns.IndexOf("NlpMode")].ToString() : string.Empty,
 162:                                                  LineLockEnable = columns.Contains("LineLockEnable") ? dataRow[columns.IndexOf("LineLockEnable")].ToString() : string.Empty,
 163:                                                  DspInputGain = columns.Contains("DspInputGain") ? dataRow[columns.IndexOf("DspInputGain")].ToString() : string.Empty,
 164:                                                  DspOutputGain = columns.Contains("DspOutputGain") ? dataRow[columns.IndexOf("DspOutputGain")].ToString() : string.Empty,
 165:                                                  ClipReversePole = columns.Contains("ClipReversePole") ? dataRow[columns.IndexOf("ClipReversePole")].ToString() : string.Empty,
 166:                                                  DEFAULTCLI = columns.Contains("DEFAULTCLI") ? dataRow[columns.IndexOf("DEFAULTCLI")].ToString() : string.Empty,
 167:                                                  USERGROUPID = columns.Contains("USERGROUPID") ? int.Parse(dataRow[columns.IndexOf("USERGROUPID")].ToString()) : 0,
 168:                                                  ADJUSTFACTOR = columns.Contains("ADJUSTFACTOR") ? int.Parse(dataRow[columns.IndexOf("ADJUSTFACTOR")].ToString()) : 0,
 169:                                                  DSPPROFILE = columns.Contains("DSPPROFILE") ? dataRow[columns.IndexOf("DSPPROFILE")].ToString() : string.Empty,
 170:   
 171:                                                  EmsOnt = (from eo in db.EmsOnts where eo.Id == nddOnt.Id select eo).SingleOrDefault()
 172:                                              };
 173:   
 174:                                              if (voipPstnUser == null)
 175:                                              {
 176:                                                  newVoipPstnUser.Created = newVoipPstnUser.Updated = DateTime.UtcNow.AddHours(3);
 177:   
 178:                                                  db.EmsVoipPstnUsers.Add(newVoipPstnUser);
 179:   
 180:                                                  insertedItemCount++;
 181:                                              }
 182:                                              else // update
 183:                                              {
 184:                                                  // below: copy values from newVoipPstnUser to ontSipInfo
 185:   
 186:                                                  if (voipPstnUser.Update(newVoipPstnUser))
 187:                                                  {
 188:                                                      db.EmsVoipPstnUsers.Attach(voipPstnUser);
 189:                                                      db.Entry(voipPstnUser).State = System.Data.Entity.EntityState.Modified;
 190:   
 191:                                                      updatedItemCount++;
 192:                                                  }
 193:                                              }
 194:   
 195:                                              itemIdList.Add(id); // keep at the end
 196:                                          }
 197:                                      }
 198:                                      else
 199:                                      {
 200:                                          result.AddError("pn != queryPn for ont.Access.Name: " + nddOnt.Access.Name);
 201:                                      }
 202:                                  }
 203:   
 204:                                  // below: this function will remove values that were not present in the reading
 205:                                  if (voipPstnUserList.Count > 0)
 206:                                  {
 207:                                      foreach (Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser o in voipPstnUserList)
 208:                                      {
 209:                                          if (!itemIdList.Contains(o.Id))
 210:                                          {
 211:                                              voipPstnUser = (from osi in db.EmsVoipPstnUsers where osi.Id == o.Id select osi).SingleOrDefault();
 212:   
 213:                                              db.EmsVoipPstnUsers.Remove(voipPstnUser);
 214:   
 215:                                              deletedItemCount++;
 216:                                          }
 217:                                      }
 218:                                  }
 219:                              }
 220:                              else //if (response.QueryDataTable.Rows.Count == 0)
 221:                              {
 222:                                  // note sometimes the response is ONT IS OFFLINE
 223:                                  // delete all ONT SIP INFO elements for this ONT
 224:   
 225:                                  /*
 226:                                  if (ontSipInfoList.Count > 0)
 227:                                  {
 228:                                      foreach (Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser o in ontSipInfoList)
 229:                                      {
 230:                                          ontSipInfo = (from osi in db.EmsVoipPstnUsers where osi.Id == o.Id select osi).SingleOrDefault();
 231:  
 232:                                          db.EmsVoipPstnUsers.Remove(ontSipInfo);
 233:  
 234:                                          deletedItemCount++;
 235:                                      }
 236:                                  }
 237:                                  */
 238:                              }
 239:   
 240:                              db.SaveChanges();
 241:                          }
 242:                          else
 243:                          {
 244:                              result.AddWarning("EmsOnt is null for ont.Access.Name: " + nddOnt.Access.Name);
 245:                          }
 246:                      }
 247:   
 248:                      if (insertedItemCount != 0 || updatedItemCount != 0 || deletedItemCount != 0) isUpdated = true;
 249:                      else isUpdated = false;
 250:   
 251:                      result.AddSuccess("(" + readItemCount + "/" + existingItemCount + "/" + insertedItemCount + "," + updatedItemCount + "," + deletedItemCount + ")");
 252:                  }
 253:                  else
 254:                  {
 255:                      result.AddError("nddOnt is null");
 256:                  }
 257:              }
 258:              else
 259:              {
 260:                  result.AddWarning("response.QueryDataTable is null");
 261:              }
 262:   
 263:              return isUpdated;
 264:          }
 265:   
 266:          ////////////////////////////////////////////////////////////////////////////
 267:   
 268:          /// <summary>
 269:          ///
 270:          /// </summary>
 271:          public static List<Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser> List()
 272:          {
 273:              List<Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser> list;
 274:   
 275:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
 276:              {
 277:                  list = (from vpu in db.EmsVoipPstnUsers select vpu).ToList();
 278:              }
 279:   
 280:              return list;
 281:          }
 282:   
 283:          ////////////////////////////////////////////////////////////////////////////
 284:   
 285:          /// <summary>
 286:          /// List of service number ids within EmsVoipPstnUsers within a SIP designated OLT
 287:          /// </summary>
 288:          public static List<string> ServiceIdWithinSipOltList()
 289:          {
 290:              int serviceType;
 291:              string service, serviceId;
 292:              List<int> sipOltIdList;
 293:              List<string> list, serviceIdList;
 294:   
 295:              serviceType = 1;
 296:              sipOltIdList = Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.SipOltIdList;
 297:   
 298:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
 299:              {
 300:                  list = (from vpu in db.EmsVoipPstnUsers where vpu.EmsOnt.Access != null && sipOltIdList.Contains(vpu.EmsOnt.Access.Olt) select vpu.DN).ToList();
 301:              }
 302:   
 303:              if (list != null && list.Count > 0)
 304:              {
 305:                  serviceIdList = new List<string>(list.Count);
 306:   
 307:                  foreach (string s in list)
 308:                  {
 309:                      service = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.Service(s);
 310:   
 311:                      serviceId = Ia.Ngn.Cl.Model.Business.Service.ServiceToServiceId(service, serviceType);
 312:   
 313:                      serviceIdList.Add(serviceId);
 314:                  }
 315:              }
 316:              else
 317:              {
 318:                  serviceIdList = new List<string>();
 319:              }
 320:   
 321:              return serviceIdList;
 322:          }
 323:   
 324:          ////////////////////////////////////////////////////////////////////////////
 325:   
 326:          /// <summary>
 327:          ///
 328:          /// </summary>
 329:          public static Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser Read(string id)
 330:          {
 331:              Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser item;
 332:   
 333:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
 334:              {
 335:                  item = (from vpu in db.EmsVoipPstnUsers where vpu.Id == id select vpu).Include(o => o.EmsOnt).SingleOrDefault();
 336:              }
 337:   
 338:              return item;
 339:          }
 340:   
 341:          ////////////////////////////////////////////////////////////////////////////
 342:   
 343:          /// <summary>
 344:          ///
 345:          /// </summary>
 346:          public static Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser ReadByService(string service) //, Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Ont nddOnt)
 347:          {
 348:              string dn;
 349:              Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser item;
 350:   
 351:              dn = Ia.Ngn.Cl.Model.Business.NumberFormatConverter.ServiceWithCountryCode(service);
 352:   
 353:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
 354:              {
 355:                  item = (from vpu in db.EmsVoipPstnUsers where vpu.DN == dn select vpu).Include(o => o.EmsOnt).Include(o => o.EmsOnt.Access).SingleOrDefault();
 356:              }
 357:   
 358:              return item;
 359:          }
 360:   
 361:          ////////////////////////////////////////////////////////////////////////////
 362:   
 363:          /// <summary>
 364:          ///
 365:          /// </summary>
 366:          public static Dictionary<string, string> IdToOntIdDictionary
 367:          {
 368:              get
 369:              {
 370:                  Dictionary<string, string> dictionary;
 371:   
 372:                  using (var db = new Ia.Ngn.Cl.Model.Ngn())
 373:                  {
 374:                      dictionary = (from s in db.EmsVoipPstnUsers select new { s.Id, OntId = s.EmsOnt.Id }).ToDictionary(u => u.Id, u => u.OntId);
 375:                  }
 376:   
 377:                  return dictionary.ToDictionary(u => u.Key, u => u.Value);
 378:              }
 379:          }
 380:   
 381:          ////////////////////////////////////////////////////////////////////////////
 382:          ////////////////////////////////////////////////////////////////////////////
 383:   
 384:          /// <summary>
 385:          ///
 386:          /// </summary>
 387:          public static string ToSimpleTextString(Ia.Ngn.Cl.Model.Huawei.EmsVoipPstnUser emsVoipPstnUser)
 388:          {
 389:              StringBuilder sb;
 390:   
 391:              sb = new StringBuilder();
 392:   
 393:              //sb.AppendLine("Vendor: " + Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Vendor.Huawei.Name);
 394:              sb.AppendLine("DID: " + emsVoipPstnUser.DID);
 395:              sb.AppendLine("FN: " + emsVoipPstnUser.FN);
 396:              sb.AppendLine("SN: " + emsVoipPstnUser.SN);
 397:              sb.AppendLine("PN: " + emsVoipPstnUser.PN);
 398:              sb.AppendLine("MGID: " + emsVoipPstnUser.MGID);
 399:              sb.AppendLine("MGNAME: " + emsVoipPstnUser.MGNAME);
 400:              sb.AppendLine("TID: " + emsVoipPstnUser.TID);
 401:              sb.AppendLine("DN: " + emsVoipPstnUser.DN);
 402:              sb.AppendLine("LayeredConf: " + emsVoipPstnUser.LayeredConf);
 403:              sb.AppendLine("HighLevelWidth: " + emsVoipPstnUser.HighLevelWidth);
 404:              sb.AppendLine("LowerLevelWidth: " + emsVoipPstnUser.LowerLevelWidth);
 405:              sb.AppendLine("Voltage: " + emsVoipPstnUser.Voltage);
 406:              sb.AppendLine("KCType: " + emsVoipPstnUser.KCType);
 407:              sb.AppendLine("VoiceGain: " + emsVoipPstnUser.VoiceGain);
 408:              sb.AppendLine("LimitPulseDial: " + emsVoipPstnUser.LimitPulseDial);
 409:              sb.AppendLine("RevPolarity: " + emsVoipPstnUser.RevPolarity);
 410:              sb.AppendLine("RevPoleLevel: " + emsVoipPstnUser.RevPoleLevel);
 411:              sb.AppendLine("RevPolePulse: " + emsVoipPstnUser.RevPolePulse);
 412:              sb.AppendLine("PSTAT: " + emsVoipPstnUser.PSTAT);
 413:              sb.AppendLine("ConfigStatus: " + emsVoipPstnUser.ConfigStatus);
 414:              sb.AppendLine("ServiceStatus: " + emsVoipPstnUser.ServiceStatus);
 415:              sb.AppendLine("ServiceType: " + emsVoipPstnUser.ServiceType);
 416:              sb.AppendLine("ALIAS: " + emsVoipPstnUser.ALIAS);
 417:              sb.AppendLine("UserType: " + emsVoipPstnUser.UserType);
 418:              sb.AppendLine("Impedance: " + emsVoipPstnUser.Impedance);
 419:              sb.AppendLine("Current: " + emsVoipPstnUser.Current);
 420:              sb.AppendLine("DCTime: " + emsVoipPstnUser.DCTime);
 421:              sb.AppendLine("PITime: " + emsVoipPstnUser.PITime);
 422:              sb.AppendLine("FSKDelayInterval: " + emsVoipPstnUser.FSKDelayInterval);
 423:              sb.AppendLine("ActualVoiceGain: " + emsVoipPstnUser.ActualVoiceGain);
 424:              sb.AppendLine("CidTransWhen: " + emsVoipPstnUser.CidTransWhen);
 425:              sb.AppendLine("CidFormat: " + emsVoipPstnUser.CidFormat);
 426:              sb.AppendLine("OverloadPRI: " + emsVoipPstnUser.OverloadPRI);
 427:              sb.AppendLine("ImpedanceProfile: " + emsVoipPstnUser.ImpedanceProfile);
 428:              sb.AppendLine("SendVoiceGain: " + emsVoipPstnUser.SendVoiceGain);
 429:              sb.AppendLine("RecvVoiceGain: " + emsVoipPstnUser.RecvVoiceGain);
 430:              sb.AppendLine("RevPolarityMode: " + emsVoipPstnUser.RevPolarityMode);
 431:              sb.AppendLine("PortRunState: " + emsVoipPstnUser.PortRunState);
 432:              sb.AppendLine("PortTestState: " + emsVoipPstnUser.PortTestState);
 433:              sb.AppendLine("PortLineState: " + emsVoipPstnUser.PortLineState);
 434:              sb.AppendLine("PortLoopState: " + emsVoipPstnUser.PortLoopState);
 435:              sb.AppendLine("ServiceRunState: " + emsVoipPstnUser.ServiceRunState);
 436:              sb.AppendLine("ServiceAdminState: " + emsVoipPstnUser.ServiceAdminState);
 437:              sb.AppendLine("ActualSendVoiceGain: " + emsVoipPstnUser.ActualSendVoiceGain);
 438:              sb.AppendLine("ActualRecvVo: " + emsVoipPstnUser.ActualRecvVo);
 439:              sb.AppendLine("AGCEnable: " + emsVoipPstnUser.AGCEnable);
 440:              sb.AppendLine("AGCEnableLevel: " + emsVoipPstnUser.AGCEnableLevel);
 441:              sb.AppendLine("SNSEnable: " + emsVoipPstnUser.SNSEnable);
 442:              sb.AppendLine("SNSEnableLevel: " + emsVoipPstnUser.SNSEnableLevel);
 443:              sb.AppendLine("NlpMode: " + emsVoipPstnUser.NlpMode);
 444:              sb.AppendLine("LineLockEnable: " + emsVoipPstnUser.LineLockEnable);
 445:              sb.AppendLine("DspInputGain: " + emsVoipPstnUser.DspInputGain);
 446:              sb.AppendLine("DspOutputGain: " + emsVoipPstnUser.DspOutputGain);
 447:              sb.AppendLine("ClipReversePole: " + emsVoipPstnUser.ClipReversePole);
 448:              sb.AppendLine("DEFAULTCLI: " + emsVoipPstnUser.DEFAULTCLI);
 449:              sb.AppendLine("USERGROUPID: " + emsVoipPstnUser.USERGROUPID);
 450:              sb.AppendLine("ADJUSTFACTOR: " + emsVoipPstnUser.ADJUSTFACTOR);
 451:              sb.AppendLine("DSPPROFILE: " + emsVoipPstnUser.DSPPROFILE);
 452:   
 453:              return sb.ToString();
 454:          }
 455:   
 456:          ////////////////////////////////////////////////////////////////////////////
 457:          ////////////////////////////////////////////////////////////////////////////
 458:      }
 459:   
 460:      ////////////////////////////////////////////////////////////////////////////
 461:      ////////////////////////////////////////////////////////////////////////////
 462:  }