blob: ca86d96d5d344ea6ae60881997a4d51820f55a0b [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
17/*
18 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// SipAgentConfigDataClassID is the 16-bit ID for the OMCI
29// Managed entity SIP agent config data
30const SipAgentConfigDataClassID ClassID = ClassID(150)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var sipagentconfigdataBME *ManagedEntityDefinition
33
34// SipAgentConfigData (class ID #150)
35// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -080039// NOTE 1 - If a non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070040// 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
52// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070054//
55// Proxy Server Address Pointer
56// Proxy server address pointer: This attribute points to a large string ME that contains the name
Matteo Scandolof9d43412021-01-12 11:11:34 -080057// (IP address or URI) of the SIP proxy server for SIP signalling messages. (R,-W, setbycreate)
58// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070059//
60// Outbound Proxy Address Pointer
61// Outbound proxy address pointer: An outbound SIP proxy may or may not be required within a given
62// network. If an outbound SIP proxy is used, the outbound proxy address pointer attribute must be
63// set to point to a valid large string ME that contains the name (IP address or URI) of the
64// outbound proxy server for SIP signalling messages. If an outbound SIP proxy is not used, the
Matteo Scandolof9d43412021-01-12 11:11:34 -080065// outbound proxy address pointer attribute must be set to a null pointer. (R,-W, setbycreate)
66// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070067//
68// Primary Sip Dns
69// Primary SIP DNS: This attribute specifies the primary SIP DNS IP address. If the value of this
70// attribute is 0, the primary DNS server is defined in the corresponding IP host config data or
71// IPv6 host config data ME. If the value is non-zero, it takes precedence over the primary DNS
Matteo Scandolof9d43412021-01-12 11:11:34 -080072// server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-by-create)
73// (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070074//
75// Secondary Sip Dns
76// Secondary SIP DNS: This attribute specifies the secondary SIP DNS IP address. If the value of
77// this attribute is 0, the secondary DNS server is defined in the corresponding IP host config
78// data or IPv6 host config data ME. If the value is non-zero, it takes precedence over the
Matteo Scandolof9d43412021-01-12 11:11:34 -080079// secondary DNS server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-
80// by-create) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070081//
82// Tcp_Udp Pointer
83// TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be
Matteo Scandolof9d43412021-01-12 11:11:34 -080084// used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W)
85// (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070086//
87// Sip Reg Exp Time
88// SIP reg exp time: This attribute specifies the SIP registration expiration time in seconds. If
89// its value is 0, the SIP agent does not add an expiration time to the registration requests and
Matteo Scandolof9d43412021-01-12 11:11:34 -080090// does not perform reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070091//
92// Sip Rereg Head Start Time
93// SIP rereg head start time: This attribute specifies the time in seconds prior to timeout that
Matteo Scandolof9d43412021-01-12 11:11:34 -080094// causes the SIP agent to start the re-registration process. The default value is 360-s. (R,-W)
95// (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070096//
97// Host Part Uri
98// Host part URI: This attribute points to a large string ME that contains the host or domain part
99// of the SIP address of record for users connected to this ONU. A null pointer indicates that the
Matteo Scandolof9d43412021-01-12 11:11:34 -0800100// current address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory)
101// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700102//
103// Sip Status
Matteo Scandolof9d43412021-01-12 11:11:34 -0800104// (R) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700105//
106// Sip Registrar
107// SIP registrar: This attribute points to a network address ME that contains the name (IP address
108// or resolved name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10"
Matteo Scandolof9d43412021-01-12 11:11:34 -0800109// and "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700110//
111// Softswitch
112// Softswitch: This attribute identifies the SIP gateway softswitch vendor. The format is four
113// ASCII coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes
Matteo Scandolof9d43412021-01-12 11:11:34 -0800114// indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700115//
116// Sip Response Table
Matteo Scandolof9d43412021-01-12 11:11:34 -0800117// NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700118// share a given SIP agent.
119//
120// Sip Option Transmit Control
121// SIP option transmit control: This Boolean attribute specifies that the ONU is (true) or is not
122// (false) enabled to transmit SIP options. The default value is recommended to be false. (R, W,
123// setbycreate) (optional) (1 byte)
124//
125// Sip Uri Format
126// SIP URI format: This attribute specifies the format of the URI in outgoing SIP messages. The
127// recommended default value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are
128// reserved. (R, W, setbycreate) (optional) (1 byte)
129//
130// Redundant Sip Agent Pointer
131// Redundant SIP agent pointer: This attribute points to another SIP agent config data ME, which is
132// understood to provide redundancy. The initial SIP agent is determined by the pointer from the
133// SIP user data ME. It is the manager's responsibility to provision a group of redundant SIP
134// agents with mutually consistent attributes. (R, W, setbycreate) (optional) (2 bytes)
135//
136type SipAgentConfigData struct {
137 ManagedEntityDefinition
138 Attributes AttributeValueMap
139}
140
141func init() {
142 sipagentconfigdataBME = &ManagedEntityDefinition{
143 Name: "SipAgentConfigData",
144 ClassID: 150,
145 MessageTypes: mapset.NewSetWith(
146 Create,
147 Delete,
148 Get,
149 Set,
150 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800151 AllowedAttributeMask: 0xfffe,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700152 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800153 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
154 1: Uint16Field("ProxyServerAddressPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
155 2: Uint16Field("OutboundProxyAddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
156 3: Uint32Field("PrimarySipDns", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
157 4: Uint32Field("SecondarySipDns", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
158 5: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
159 6: Uint32Field("SipRegExpTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
160 7: Uint32Field("SipReregHeadStartTime", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
161 8: Uint16Field("HostPartUri", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
162 9: ByteField("SipStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
163 10: Uint16Field("SipRegistrar", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
164 11: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
165 12: MultiByteField("SipResponseTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
166 13: ByteField("SipOptionTransmitControl", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
167 14: ByteField("SipUriFormat", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
168 15: Uint16Field("RedundantSipAgentPointer", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
169 },
170 Access: CreatedByOlt,
171 Support: UnknownSupport,
172 Alarms: AlarmMap{
173 0: "SIP-UA register name",
174 1: "SIP-UA register reach",
175 2: "SIP-UA register connect",
176 3: "SIP-UA register validate",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700177 },
178 }
179}
180
Matteo Scandolof9d43412021-01-12 11:11:34 -0800181// NewSipAgentConfigData (class ID 150) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700182// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800183// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700184func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800185 return NewManagedEntity(*sipagentconfigdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700186}