blob: 53d6be03f91cdb0cd1c98c493379af5b483c5ccc [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// SipAgentConfigDataClassID is the 16-bit ID for the OMCI
26// Managed entity SIP agent config data
27const SipAgentConfigDataClassID ClassID = ClassID(150)
28
29var sipagentconfigdataBME *ManagedEntityDefinition
30
31// SipAgentConfigData (class ID #150)
32// The SIP agent config data ME models a SIP signalling agent. It defines the configuration
33// necessary to establish communication for signalling between the SIP user agent (UA) and a SIP
34// server.
35//
36// NOTE 1 - If a non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The
37// non-OMCI interface supplies the necessary data, which may be read back to the OLT via the SIP
38// config portal ME.
39//
40// Instances of this ME are created and deleted by the OLT.
41//
42// Relationships
43// An instance of this ME serves one or more SIP user data MEs and points to a TCP/UDP config data
44// that carries signalling messages. Other pointers establish additional agent parameters such as
45// proxy servers.
46//
47// Attributes
48// Managed Entity Id
49// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
50// (mandatory) (2-bytes)
51//
52// Proxy Server Address Pointer
53// Proxy server address pointer: This attribute points to a large string ME that contains the name
54// (IP address or URI) of the SIP proxy server for SIP signalling messages. (R,-W, setbycreate)
55// (mandatory) (2-bytes)
56//
57// Outbound Proxy Address Pointer
58// Outbound proxy address pointer: An outbound SIP proxy may or may not be required within a given
59// network. If an outbound SIP proxy is used, the outbound proxy address pointer attribute must be
60// set to point to a valid large string ME that contains the name (IP address or URI) of the
61// outbound proxy server for SIP signalling messages. If an outbound SIP proxy is not used, the
62// outbound proxy address pointer attribute must be set to a null pointer. (R,-W, setbycreate)
63// (mandatory) (2-bytes)
64//
65// Primary Sip Dns
66// Primary SIP DNS: This attribute specifies the primary SIP DNS IP address. If the value of this
67// attribute is 0, the primary DNS server is defined in the corresponding IP host config data or
68// IPv6 host config data ME. If the value is non-zero, it takes precedence over the primary DNS
69// server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-by-create)
70// (mandatory) (4-bytes)
71//
72// Secondary Sip Dns
73// Secondary SIP DNS: This attribute specifies the secondary SIP DNS IP address. If the value of
74// this attribute is 0, the secondary DNS server is defined in the corresponding IP host config
75// data or IPv6 host config data ME. If the value is non-zero, it takes precedence over the
76// secondary DNS server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-
77// by-create) (mandatory) (4-bytes)
78//
79// Tcp_Udp Pointer
80// TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be
81// used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W)
82// (mandatory) (2-bytes)
83//
84// Sip Reg Exp Time
85// SIP reg exp time: This attribute specifies the SIP registration expiration time in seconds. If
86// its value is 0, the SIP agent does not add an expiration time to the registration requests and
87// does not perform reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes)
88//
89// Sip Rereg Head Start Time
90// SIP rereg head start time: This attribute specifies the time in seconds prior to timeout that
91// causes the SIP agent to start the re-registration process. The default value is 360-s. (R,-W)
92// (mandatory) (4-bytes)
93//
94// Host Part Uri
95// Host part URI: This attribute points to a large string ME that contains the host or domain part
96// of the SIP address of record for users connected to this ONU. A null pointer indicates that the
97// current address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory)
98// (2-bytes)
99//
100// Sip Status
101// (R) (mandatory) (1-byte)
102//
103// Sip Registrar
104// SIP registrar: This attribute points to a network address ME that contains the name (IP address
105// or resolved name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10"
106// and "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes)
107//
108// Softswitch
109// Softswitch: This attribute identifies the SIP gateway softswitch vendor. The format is four
110// ASCII coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes
111// indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
112//
113// Sip Response Table
114// NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that
115// share a given SIP agent.
116//
117// Sip Option Transmit Control
118// SIP option transmit control: This Boolean attribute specifies that the ONU is (true) or is not
119// (false) enabled to transmit SIP options. The default value is recommended to be false. (R, W,
120// setbycreate) (optional) (1 byte)
121//
122// Sip Uri Format
123// SIP URI format: This attribute specifies the format of the URI in outgoing SIP messages. The
124// recommended default value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are
125// reserved. (R, W, setbycreate) (optional) (1 byte)
126//
127// Redundant Sip Agent Pointer
128// Redundant SIP agent pointer: This attribute points to another SIP agent config data ME, which is
129// understood to provide redundancy. The initial SIP agent is determined by the pointer from the
130// SIP user data ME. It is the manager's responsibility to provision a group of redundant SIP
131// agents with mutually consistent attributes. (R, W, setbycreate) (optional) (2 bytes)
132//
133type SipAgentConfigData struct {
134 ManagedEntityDefinition
135 Attributes AttributeValueMap
136}
137
138func init() {
139 sipagentconfigdataBME = &ManagedEntityDefinition{
140 Name: "SipAgentConfigData",
141 ClassID: 150,
142 MessageTypes: mapset.NewSetWith(
143 Create,
144 Delete,
145 Get,
146 Set,
147 ),
148 AllowedAttributeMask: 0xfffe,
149 AttributeDefinitions: AttributeDefinitionMap{
150 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
151 1: Uint16Field("ProxyServerAddressPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
152 2: Uint16Field("OutboundProxyAddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
153 3: Uint32Field("PrimarySipDns", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
154 4: Uint32Field("SecondarySipDns", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
155 5: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
156 6: Uint32Field("SipRegExpTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
157 7: Uint32Field("SipReregHeadStartTime", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
158 8: Uint16Field("HostPartUri", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
159 9: ByteField("SipStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
160 10: Uint16Field("SipRegistrar", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
161 11: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
162 12: MultiByteField("SipResponseTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
163 13: ByteField("SipOptionTransmitControl", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
164 14: ByteField("SipUriFormat", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
165 15: Uint16Field("RedundantSipAgentPointer", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
166 },
167 Access: CreatedByOlt,
168 Support: UnknownSupport,
169 }
170}
171
172// NewSipAgentConfigData (class ID 150) creates the basic
173// Managed Entity definition that is used to validate an ME of this type that
174// is received from or transmitted to the OMCC.
175func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
176 return NewManagedEntity(*sipagentconfigdataBME, params...)
177}