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