Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 4 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 8 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 10 | * |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | */ |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // SipAgentConfigDataClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity SIP agent config data |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const SipAgentConfigDataClassID = ClassID(150) // 0x0096 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var sipagentconfigdataBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // SipAgentConfigData (Class ID: #150 / 0x0096) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | // |
| 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 52 | // This attribute uniquely identifies each instance of this ME. (R, setbycreate) (mandatory) |
| 53 | // (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 54 | // |
| 55 | // Proxy Server Address Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 56 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 58 | // |
| 59 | // Outbound Proxy Address Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 60 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 65 | // |
| 66 | // Primary Sip Dns |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 67 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // |
| 72 | // Secondary Sip Dns |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 73 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 77 | // |
| 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 84 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 87 | // |
| 88 | // Sip Rereg Head Start Time |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 89 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 91 | // |
| 92 | // Host Part Uri |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 93 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 96 | // |
| 97 | // Sip Status |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 98 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 103 | // (R) (mandatory) (1-byte) |
| 104 | // |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 105 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 117 | // Sip Registrar |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 118 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 121 | // |
| 122 | // Softswitch |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 123 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 126 | // |
| 127 | // Sip Response Table |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 128 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 145 | // 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 Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 149 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 152 | // |
| 153 | // Sip Uri Format |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 154 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 157 | // |
| 158 | // Redundant Sip Agent Pointer |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 159 | // 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 163 | // |
| 164 | type SipAgentConfigData struct { |
| 165 | ManagedEntityDefinition |
| 166 | Attributes AttributeValueMap |
| 167 | } |
| 168 | |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 169 | // Attribute name constants |
| 170 | |
| 171 | const SipAgentConfigData_ProxyServerAddressPointer = "ProxyServerAddressPointer" |
| 172 | const SipAgentConfigData_OutboundProxyAddressPointer = "OutboundProxyAddressPointer" |
| 173 | const SipAgentConfigData_PrimarySipDns = "PrimarySipDns" |
| 174 | const SipAgentConfigData_SecondarySipDns = "SecondarySipDns" |
| 175 | const SipAgentConfigData_TcpUdpPointer = "TcpUdpPointer" |
| 176 | const SipAgentConfigData_SipRegExpTime = "SipRegExpTime" |
| 177 | const SipAgentConfigData_SipReregHeadStartTime = "SipReregHeadStartTime" |
| 178 | const SipAgentConfigData_HostPartUri = "HostPartUri" |
| 179 | const SipAgentConfigData_SipStatus = "SipStatus" |
| 180 | const SipAgentConfigData_SipRegistrar = "SipRegistrar" |
| 181 | const SipAgentConfigData_Softswitch = "Softswitch" |
| 182 | const SipAgentConfigData_SipResponseTable = "SipResponseTable" |
| 183 | const SipAgentConfigData_SipOptionTransmitControl = "SipOptionTransmitControl" |
| 184 | const SipAgentConfigData_SipUriFormat = "SipUriFormat" |
| 185 | const SipAgentConfigData_RedundantSipAgentPointer = "RedundantSipAgentPointer" |
| 186 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 187 | func init() { |
| 188 | sipagentconfigdataBME = &ManagedEntityDefinition{ |
| 189 | Name: "SipAgentConfigData", |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 190 | ClassID: SipAgentConfigDataClassID, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 191 | MessageTypes: mapset.NewSetWith( |
| 192 | Create, |
| 193 | Delete, |
| 194 | Get, |
Chip Boling | 17e1778 | 2021-10-06 08:29:06 -0500 | [diff] [blame] | 195 | GetNext, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 196 | Set, |
Chip Boling | 2d51f05 | 2021-02-09 09:04:15 -0600 | [diff] [blame] | 197 | SetTable, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 198 | ), |
| 199 | AllowedAttributeMask: 0xfffe, |
| 200 | AttributeDefinitions: AttributeDefinitionMap{ |
Chip Boling | 8cdd639 | 2022-01-27 08:43:37 -0600 | [diff] [blame] | 201 | 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 Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 217 | }, |
| 218 | Access: CreatedByOlt, |
| 219 | Support: UnknownSupport, |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 220 | 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 Boling | 17e1778 | 2021-10-06 08:29:06 -0500 | [diff] [blame] | 225 | 4: "SIP-UA register auth", |
| 226 | 5: "SIP-UA register timeout", |
| 227 | 6: "SIP-UA register fail", |
Chip Boling | 34ebcb6 | 2021-02-02 12:13:58 -0600 | [diff] [blame] | 228 | }, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 229 | } |
| 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. |
| 235 | func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 236 | return NewManagedEntity(*sipagentconfigdataBME, params...) |
| 237 | } |