blob: 39aa2c44305b4e41e3ee911d0160f14bd2060119 [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling6e27b352020-02-14 09:10:01 -06005 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling6e27b352020-02-14 09:10:01 -060011 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * NOTE: This file was generated, manual edits will be overwritten!
19 *
20 * Generated by 'goCodeGenerator.py':
21 * https://github.com/cboling/OMCI-parser/README.md
22 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// SipAgentConfigDataClassID is the 16-bit ID for the OMCI
29// Managed entity SIP agent config data
Chip Boling610117d2021-09-09 11:24:34 -050030const SipAgentConfigDataClassID = ClassID(150) // 0x0096
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var sipagentconfigdataBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// SipAgentConfigData (Class ID: #150 / 0x0096)
Chip Boling6e27b352020-02-14 09:10:01 -060035// The SIP agent config data ME models a SIP signalling agent. It defines the configuration
36// necessary to establish communication for signalling between the SIP user agent (UA) and a SIP
37// server.
38//
39// NOTE 1 - If a non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The
40// non-OMCI interface supplies the necessary data, which may be read back to the OLT via the SIP
41// config portal ME.
42//
43// Instances of this ME are created and deleted by the OLT.
44//
45// Relationships
46// An instance of this ME serves one or more SIP user data MEs and points to a TCP/UDP config data
47// that carries signalling messages. Other pointers establish additional agent parameters such as
48// proxy servers.
49//
50// Attributes
51// Managed Entity Id
Chip Boling610117d2021-09-09 11:24:34 -050052// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
53// (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060054//
55// Proxy Server Address Pointer
Chip Boling610117d2021-09-09 11:24:34 -050056// This attribute points to a large string ME that contains the name (IP address or URI) of the SIP
57// proxy server for SIP signalling messages. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060058//
59// Outbound Proxy Address Pointer
Chip Boling610117d2021-09-09 11:24:34 -050060// An outbound SIP proxy may or may not be required within a given network. If an outbound SIP
61// proxy is used, the outbound proxy address pointer attribute must be set to point to a valid
62// large string ME that contains the name (IP address or URI) of the outbound proxy server for SIP
63// signalling messages. If an outbound SIP proxy is not used, the outbound proxy address pointer
64// attribute must be set to a null pointer. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060065//
66// Primary Sip Dns
Chip Boling610117d2021-09-09 11:24:34 -050067// This attribute specifies the primary SIP DNS IP address. If the value of this attribute is 0,
68// the primary DNS server is defined in the corresponding IP host config data or IPv6 host config
69// data ME. If the value is non-zero, it takes precedence over the primary DNS server defined in
70// the IP host config data or IPv6 host config data ME. (R,-W, set-by-create) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060071//
72// Secondary Sip Dns
Chip Boling610117d2021-09-09 11:24:34 -050073// This attribute specifies the secondary SIP DNS IP address. If the value of this attribute is 0,
74// the secondary DNS server is defined in the corresponding IP host config data or IPv6 host config
75// data ME. If the value is non-zero, it takes precedence over the secondary DNS server defined in
76// the IP host config data or IPv6 host config data ME. (R,-W, set-by-create) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060077//
78// Tcp_Udp Pointer
79// TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be
80// used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W)
81// (mandatory) (2-bytes)
82//
83// Sip Reg Exp Time
Chip Boling610117d2021-09-09 11:24:34 -050084// This attribute specifies the SIP registration expiration time in seconds. If its value is 0, the
85// SIP agent does not add an expiration time to the registration requests and does not perform
86// reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060087//
88// Sip Rereg Head Start Time
Chip Boling610117d2021-09-09 11:24:34 -050089// This attribute specifies the time in seconds prior to timeout that causes the SIP agent to start
90// the re-registration process. The default value is 360-s. (R,-W) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060091//
92// Host Part Uri
Chip Boling610117d2021-09-09 11:24:34 -050093// This attribute points to a large string ME that contains the host or domain part of the SIP
94// address of record for users connected to this ONU. A null pointer indicates that the current
95// address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060096//
97// Sip Status
Chip Boling610117d2021-09-09 11:24:34 -050098// 5 Failed - Timeout
99//
100// 6 Redundant, offline: this instance of the SIP agent config data occupies the role of a
101// redundant server, and is not presently in use.
102//
Chip Boling6e27b352020-02-14 09:10:01 -0600103// (R) (mandatory) (1-byte)
104//
Chip Boling610117d2021-09-09 11:24:34 -0500105// This attribute shows the current status of the SIP agent. Values are as follows.
106//
107// 0 Ok/initial
108//
109// 1 Connected
110//
111// 2 Failed - ICMP error
112//
113// 3 Failed - Malformed response
114//
115// 4 Failed - Inadequate info response
116//
Chip Boling6e27b352020-02-14 09:10:01 -0600117// Sip Registrar
Chip Boling610117d2021-09-09 11:24:34 -0500118// This attribute points to a network address ME that contains the name (IP address or resolved
119// name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10" and
120// "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600121//
122// Softswitch
Chip Boling610117d2021-09-09 11:24:34 -0500123// This attribute identifies the SIP gateway softswitch vendor. The format is four ASCII coded
124// alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes indicates
125// an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600126//
127// Sip Response Table
Chip Boling610117d2021-09-09 11:24:34 -0500128// This attribute specifies the tone and text to be presented to the subscriber upon receipt of
129// various SIP messages (normally 4xx, 5xx, 6xx message codes). The table is a sequence of entries,
130// each of which is defined as follows.
131//
132// SIP response code (2 bytes): This field is the value of the SIP message code. It also serves as
133// the index into the SIP response table. When a set operation is performed with the value 0 in
134// this field, the table is cleared.
135//
136// Tone (1 byte): This field specifies one of the tones in the tone pattern table of the associated
137// voice service profile. The specified tone is played to the subscriber.
138//
139// Text message (2 bytes): This field is a pointer to a large string that contains a message to be
140// displayed to the subscriber. If the value of this field is a null pointer, text pre-associated
141// with the tone may be displayed, or no text at all.
142//
143// (R, W) (optional) (N * 5 bytes)
144//
Chip Boling6e27b352020-02-14 09:10:01 -0600145// NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that
146// share a given SIP agent.
147//
148// Sip Option Transmit Control
Chip Boling610117d2021-09-09 11:24:34 -0500149// This Boolean attribute specifies that the ONU is (true) or is not (false) enabled to transmit
150// SIP options. The default value is recommended to be false. (R, W, setbycreate) (optional) (1
151// byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600152//
153// Sip Uri Format
Chip Boling610117d2021-09-09 11:24:34 -0500154// This attribute specifies the format of the URI in outgoing SIP messages. The recommended default
155// value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are reserved. (R, W,
156// setbycreate) (optional) (1 byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600157//
158// Redundant Sip Agent Pointer
Chip Boling610117d2021-09-09 11:24:34 -0500159// This attribute points to another SIP agent config data ME, which is understood to provide
160// redundancy. The initial SIP agent is determined by the pointer from the SIP user data ME. It is
161// the manager's responsibility to provision a group of redundant SIP agents with mutually
162// consistent attributes. (R, W, setbycreate) (optional) (2 bytes)
Chip Boling6e27b352020-02-14 09:10:01 -0600163//
164type SipAgentConfigData struct {
165 ManagedEntityDefinition
166 Attributes AttributeValueMap
167}
168
Chip Boling8cdd6392022-01-27 08:43:37 -0600169// Attribute name constants
170
171const SipAgentConfigData_ProxyServerAddressPointer = "ProxyServerAddressPointer"
172const SipAgentConfigData_OutboundProxyAddressPointer = "OutboundProxyAddressPointer"
173const SipAgentConfigData_PrimarySipDns = "PrimarySipDns"
174const SipAgentConfigData_SecondarySipDns = "SecondarySipDns"
175const SipAgentConfigData_TcpUdpPointer = "TcpUdpPointer"
176const SipAgentConfigData_SipRegExpTime = "SipRegExpTime"
177const SipAgentConfigData_SipReregHeadStartTime = "SipReregHeadStartTime"
178const SipAgentConfigData_HostPartUri = "HostPartUri"
179const SipAgentConfigData_SipStatus = "SipStatus"
180const SipAgentConfigData_SipRegistrar = "SipRegistrar"
181const SipAgentConfigData_Softswitch = "Softswitch"
182const SipAgentConfigData_SipResponseTable = "SipResponseTable"
183const SipAgentConfigData_SipOptionTransmitControl = "SipOptionTransmitControl"
184const SipAgentConfigData_SipUriFormat = "SipUriFormat"
185const SipAgentConfigData_RedundantSipAgentPointer = "RedundantSipAgentPointer"
186
Chip Boling6e27b352020-02-14 09:10:01 -0600187func init() {
188 sipagentconfigdataBME = &ManagedEntityDefinition{
189 Name: "SipAgentConfigData",
Chip Boling8cdd6392022-01-27 08:43:37 -0600190 ClassID: SipAgentConfigDataClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600191 MessageTypes: mapset.NewSetWith(
192 Create,
193 Delete,
194 Get,
Chip Boling17e17782021-10-06 08:29:06 -0500195 GetNext,
Chip Boling6e27b352020-02-14 09:10:01 -0600196 Set,
Chip Boling2d51f052021-02-09 09:04:15 -0600197 SetTable,
Chip Boling6e27b352020-02-14 09:10:01 -0600198 ),
199 AllowedAttributeMask: 0xfffe,
200 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600201 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
202 1: Uint16Field(SipAgentConfigData_ProxyServerAddressPointer, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
203 2: Uint16Field(SipAgentConfigData_OutboundProxyAddressPointer, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
204 3: Uint32Field(SipAgentConfigData_PrimarySipDns, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
205 4: Uint32Field(SipAgentConfigData_SecondarySipDns, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
206 5: Uint16Field(SipAgentConfigData_TcpUdpPointer, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
207 6: Uint32Field(SipAgentConfigData_SipRegExpTime, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
208 7: Uint32Field(SipAgentConfigData_SipReregHeadStartTime, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
209 8: Uint16Field(SipAgentConfigData_HostPartUri, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
210 9: ByteField(SipAgentConfigData_SipStatus, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
211 10: Uint16Field(SipAgentConfigData_SipRegistrar, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
212 11: Uint32Field(SipAgentConfigData_Softswitch, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
213 12: TableField(SipAgentConfigData_SipResponseTable, TableAttributeType, 0x0010, TableInfo{nil, 5}, mapset.NewSetWith(Read, Write), false, true, false, 12),
214 13: ByteField(SipAgentConfigData_SipOptionTransmitControl, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
215 14: ByteField(SipAgentConfigData_SipUriFormat, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
216 15: Uint16Field(SipAgentConfigData_RedundantSipAgentPointer, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
Chip Boling6e27b352020-02-14 09:10:01 -0600217 },
218 Access: CreatedByOlt,
219 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600220 Alarms: AlarmMap{
221 0: "SIP-UA register name",
222 1: "SIP-UA register reach",
223 2: "SIP-UA register connect",
224 3: "SIP-UA register validate",
Chip Boling17e17782021-10-06 08:29:06 -0500225 4: "SIP-UA register auth",
226 5: "SIP-UA register timeout",
227 6: "SIP-UA register fail",
Chip Boling34ebcb62021-02-02 12:13:58 -0600228 },
Chip Boling6e27b352020-02-14 09:10:01 -0600229 }
230}
231
232// NewSipAgentConfigData (class ID 150) creates the basic
233// Managed Entity definition that is used to validate an ME of this type that
234// is received from or transmitted to the OMCC.
235func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
236 return NewManagedEntity(*sipagentconfigdataBME, params...)
237}