blob: dcbe99edf066e56de2b6984a97c2b65c31953280 [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
4
5 * 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
8
9 * http://www.apache.org/licenses/LICENSE-2.0
10
11 * 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 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// SipUserDataClassID is the 16-bit ID for the OMCI
29// Managed entity SIP user data
Andrea Campanella10426e22021-10-15 17:58:04 +020030const SipUserDataClassID = ClassID(153) // 0x0099
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var sipuserdataBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// SipUserData (Class ID: #153 / 0x0099)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// The SIP user data defines the user specific configuration attributes associated with a specific
36// VoIP CTP. This entity is conditionally required for ONUs that offer VoIP SIP services. If a non-
37// OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The non-OMCI interface
38// supplies the necessary data, which may be read back to the OLT via the SIP config portal ME.
39//
40// An instance of this ME is created and deleted by the OLT. A SIP user data instance is required
41// for each POTS UNI port using SIP protocol and configured by the OMCI.
42//
43// Relationships
44// An instance of this ME is associated with one VoIP voice CTP ME and a PPTP POTS UNI.
45//
46// Attributes
47// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020048// This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory)
49// (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080050//
51// Sip Agent Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020052// This attribute points to the SIP agent config data ME to be used for signalling. (R,-W,
Matteo Scandolof9d43412021-01-12 11:11:34 -080053// setbycreate) (mandatory) (2-bytes)
54//
Andrea Campanella10426e22021-10-15 17:58:04 +020055// User Part Aor
56// This attribute points to a large string that contains the user identification part of the
57// address of record. This can take the form of an alphanumeric string or the subscriber's
58// directory number. A null pointer indicates the absence of an AOR. (R,-W, setbycreate)
59// (mandatory) (2-bytes)
60//
Matteo Scandolof9d43412021-01-12 11:11:34 -080061// Sip Display Name
Andrea Campanella10426e22021-10-15 17:58:04 +020062// This ASCII string attribute defines the customer ID used for the display attribute in outgoing
63// SIP messages. The default value is null (all zero bytes) (R,-W) (mandatory) (25-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080064//
65// Username And Password
Andrea Campanella10426e22021-10-15 17:58:04 +020066// This attribute points to an authentication security method ME that contains the SIP user name
67// and password used for authentication. A null pointer indicates no username and password. (R,-W,
68// setbycreate) (mandatory) (2)
Matteo Scandolof9d43412021-01-12 11:11:34 -080069//
70// Voicemail Server Sip Uri
Andrea Campanella10426e22021-10-15 17:58:04 +020071// This attribute points to a network address ME that contains the name (IP address or URI) of the
72// SIP voicemail server for SIP signalling messages. A null pointer indicates the absence of a SIP
73// voicemail server. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080074//
75// Voicemail Subscription Expiration Time
Andrea Campanella10426e22021-10-15 17:58:04 +020076// This attribute defines the voicemail subscription expiration time in seconds. If this value is
77// 0, the SIP agent uses an implementation-specific value. This attribute is recommended to be set
78// to 3600-s by default. (R,-W, setbycreate) (mandatory) (4-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080079//
80// Network Dial Plan Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020081// This attribute points to a network dial plan table. A null pointer indicates the absence of a
82// network dial plan. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080083//
84// Application Services Profile Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020085// This attribute points to a VoIP application services profile. (R,-W, setbycreate) (mandatory)
86// (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080087//
88// Feature Code Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020089// This attribute points to the VoIP feature access codes ME for this subscriber. A null pointer
90// indicates the absence of a VoIP feature access codes ME. (R,-W, set-by-create) (mandatory)
91// (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080092//
93// Pptp Pointer
Andrea Campanella10426e22021-10-15 17:58:04 +020094// This attribute points to the PPTP POTS UNI ME that provides the analogue telephony adaptor (ATA)
95// function. (R,-W, setbycreate) (mandatory) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080096//
97// Release Timer
Andrea Campanella10426e22021-10-15 17:58:04 +020098// This attribute contains a release timer defined in seconds. The value 0 specifies that the ONU
99// is to use its internal default. The default value of this attribute is 10-s. (R,-W) (optional)
100// (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -0800101//
102// Receiver Off Hook Roh Timer
103// Receiver off hook (ROH) timer: This attribute defines the time in seconds for the ROH condition
104// before ROH tone is applied. The value 0 disables ROH timing. The value 0xFF specifies that the
105// ONU is to use its internal default, which may or may not be the same as the 15-s OMCI default
106// value. (R,-W) (optional) (1-byte)
107//
108type SipUserData struct {
109 ManagedEntityDefinition
110 Attributes AttributeValueMap
111}
112
113func init() {
114 sipuserdataBME = &ManagedEntityDefinition{
115 Name: "SipUserData",
116 ClassID: 153,
117 MessageTypes: mapset.NewSetWith(
118 Create,
119 Delete,
120 Get,
121 Set,
122 ),
123 AllowedAttributeMask: 0xfff0,
124 AttributeDefinitions: AttributeDefinitionMap{
125 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
126 1: Uint16Field("SipAgentPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
127 2: Uint16Field("UserPartAor", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
128 3: MultiByteField("SipDisplayName", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
129 4: Uint16Field("UsernameAndPassword", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
130 5: Uint16Field("VoicemailServerSipUri", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
131 6: Uint32Field("VoicemailSubscriptionExpirationTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
132 7: Uint16Field("NetworkDialPlanPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
133 8: Uint16Field("ApplicationServicesProfilePointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
134 9: Uint16Field("FeatureCodePointer", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
135 10: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
136 11: ByteField("ReleaseTimer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
137 12: ByteField("ReceiverOffHookRohTimer", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
138 },
139 Access: CreatedByOlt,
140 Support: UnknownSupport,
141 Alarms: AlarmMap{
142 0: "SIP-UA register auth",
143 1: "SIP-UA register timeout",
144 2: "SIP-UA register fail",
145 },
146 }
147}
148
149// NewSipUserData (class ID 153) creates the basic
150// Managed Entity definition that is used to validate an ME of this type that
151// is received from or transmitted to the OMCC.
152func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) {
153 return NewManagedEntity(*sipuserdataBME, params...)
154}