TALKAPHONE-MIB DEFINITIONS ::= BEGIN

-- Copyright &copy; 2018 Talk-A-Phone Co. All rights reserved.
-- Talkaphone enterprise number is 25956
-- ASN.1 prefix, including Talkaphone enterprise is:
--     1.3.6.1.4.1.25956
-- MIB objects for tap voip500/voip600 implementations
--

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE            FROM SNMPv2-SMI
    NOTIFICATION-TYPE, Unsigned32           FROM SNMPv2-SMI
    enterprises							    FROM SNMPv2-SMI
    MODULE-COMPLIANCE, OBJECT-GROUP         FROM SNMPv2-CONF
    NOTIFICATION-GROUP                      FROM SNMPv2-CONF
    InetAddressType, InetAddress            FROM INET-ADDRESS-MIB
    DisplayString                           FROM SNMPv2-TC
;


talkaphone MODULE-IDENTITY
    LAST-UPDATED "202306210000Z"
    ORGANIZATION "www.talkaphone.com"
    CONTACT-INFO    
	 "postal:   Talkaphone
                7530 North Natchez Ave.
                Niles, IL 60714

      email:    info@talkaphone.com"
    DESCRIPTION
    "Draft 6 splits out failure unAuthenticate(7) from regFailure(1)
         because it should  be a temporary/recoverable error
     EVP_1.0.2.3c4"
    REVISION "202306210000Z"
    DESCRIPTION
    "Draft 5 version includes reporting of firmware updates
             version includes reporting paging status
             version includes reporting device state
     EVP_1.0.2.9b5"
    REVISION "202211100000Z"
    DESCRIPTION
    "Draft 4 clarified status values for OID"
    REVISION "201810150000Z"
    DESCRIPTION
    "Draft 3 version includes reporting of self diagnostics results
     call, auxiliary output, and register OID elements changed from text string to enumeration
     EVP_1.0.2.9b3 & EVP_1.0.2.9b4"
    REVISION "201810030000Z"
    DESCRIPTION
	"Draft 1 version of Talkaphone enterprise MIB (25956) for voip500/voip600 supporting registration success/failure
     Draft 2 version includes support for status of primary call {placed, connected, failure, terminated}
             version includes support for Auxiliary Output [De]activated
     EVP_1.0.2.9b2"
    REVISION "201808020000Z"
    DESCRIPTION
	"initial version of Talkaphone enterprise MIB (25956) for voip500/voip600
     EVP_1.0.2.9b1
     SNMP libraries prior to 1st release of talkaphone enterprise MIB
     EVP_1.0.2.9b"
    ::= { enterprises 25956}

--
-- top level structure
--

tapNotifications                   OBJECT IDENTIFIER ::=  { talkaphone 0 }
tapObjects                         OBJECT IDENTIFIER ::=  { talkaphone 1 }
tapConformance                     OBJECT IDENTIFIER ::=  { talkaphone 2 }

-- Notification Definition Section

tapRegistration NOTIFICATION-TYPE
    OBJECTS {
            trapSequence,
            phoneNumber,          -- phone number of voip500
            usedIPAddressType,    -- defaults to always being IPv4
            usedIPAddress,        -- IP address for registrar (be it registrar 1, 2, or 3)
            usedIPPort,           -- port number for IP at registrar
            sIPRegistrationStatus -- see OBJECT-TYPE
            }
    STATUS current
    DESCRIPTION
            "Tells NMS server the results of last REGISTER sequence (success or failure)
            phoneNumber is phone number that identifies the voip500 to the registrar
            usedIPAddressType is always IPv4
            usedIPAddress is IP address of registrar
            usedIPPort is IP port used on registrar
            sIPRegistrationStatus see definition following OBJECT-TYPE
            when multiple registrars defined,
                one will see the REGISTER success for the successful registration for one of the defined registrars
                one will not see any registration failures
            "
    ::= { tapNotifications 1}


tapCall NOTIFICATION-TYPE
     OBJECTS {
            trapSequence,
            phoneNumber,          -- phone number of voip500
            usedPhoneNumber,      -- phone number being called at destination IP address
            usedIPAddressType,    -- defaults to always being IPv4
            usedIPAddress,        -- IP address for detination phone
            usedIPPort,           -- port number for IP address for phone being called
            callStatus,           -- current status of call, see OBJECT-TYPE
            button                -- method for originating phone call
            }
     STATUS current
     DESCRIPTION "Call status as it progresses through high level states
            phoneNumber is my phone number identifying the voip500 to the registrar
            usedPhoneNumber is phone number of destination
                for placing calls, usedPhoneNumber is phone number being called
                for receiving calls, usedPhoneNumber is phone number of remote caller
            usedIPAddressType is always IPv4
            usedIPAddress is IP address for call
            usedIPPort is IP port for call
            callStatus see definition following OBJECT-TYPE
            button     -- see definition following OBJECT-TYPE
            "
     ::= {tapNotifications 2}

tapAuxiliaryOutput NOTIFICATION-TYPE
     OBJECTS {
            trapSequence,
            phoneNumber,          -- phone number of voip500
            usedIPAddressType,    -- defaults to always being IPv4
            usedIPAddress,        -- IP address for voip500 phone
            button,               -- identify the auxiliary output 1, 2, or 3
                                  -- see definition following OBJECT-TYPE
            auxiliaryOutputStatus -- current status of auxiliary output [de]activation
            }
     STATUS current
     DESCRIPTION "Auxiliary Output status
            phoneNumber identifies phone number of voip500 for auxiliary output event
            usedIPAddressType is always IPv4
            usedIPAddress is IP address of voip500 for auxiliary output event
            button see definition following OBJECT-TYPE
            auxiliaryOutputStatus see definition following OBJECT-TYPE"
     ::= {tapNotifications 3}

tapSelfDiagnostics NOTIFICATION-TYPE
     OBJECTS {
            trapSequence,
            phoneNumber,          -- phone number of voip500
            usedIPAddressType,    -- defaults to always being IPv4
            usedIPAddress,        -- IP address for voip500 phone
            selfButton1Status,    -- diagnostic test results (pass/fail) of button 1  see OBJECT-TYPE
            selfButton2Status,    -- diagnostic test results (pass/fail) of button 2  see OBJECT-TYPE
            selfButton3Status,    -- diagnostic test results (pass/fail) of button 3  see OBJECT-TYPE
            selfButton4Status,    -- diagnostic test results (pass/fail) of button 4  see OBJECT-TYPE
            selfSpeakerMicStatus, -- diagnostic test results (pass/fail) of speaker/mic  see OBJECT-TYPE
            selfWEBStatus         -- diagnostic test results (pass/fail) of WEBs see OBJECT-TYPE
            }
     STATUS current
     DESCRIPTION "self diagnostics test status for each of the 4 buttons, 1 speaker/mic and 1 WEBs
                see definition following OBJECT-TYPE
            "
     ::= {tapNotifications 4}

tapDeviceState NOTIFICATION-TYPE
     OBJECTS {
            trapSequence,
            phoneNumber,               -- phone number of voip500
            usedIPAddressType,         -- defaults to always being IPv4
            usedIPAddress,             -- IP address for voip500 phone
            stateLEDs,                 -- see OBJECT-TYPE
            stateAuxiliaryInputs,      -- see OBJECT-TYPE
            stateAuxiliaryOutputs,     -- see OBJECT-TYPE
            stateOtherDevices          -- see OBJECT-TYPE
            }
     STATUS current
     DESCRIPTION "same information as that appearing on gui=>Maintenance=>Device State
            see definition following OBJECT-TYPE
            "
     ::= {tapNotifications 5}

tapPagingInbound NOTIFICATION-TYPE
     OBJECTS {
            trapSequence,
            phoneNumber,               -- phone number of voip500
            usedIPAddressType,         -- defaults to always being IPv4
            usedIPAddress,             -- IP address for voip500 phone
            pagingOutputDevice,        -- identify Speaker or LLO output, see OBJECT-TYPE
            pagingOutputStatus         -- [de]activated, see OBJECT-TYPE
            }
     STATUS current
     DESCRIPTION "same information as that appearing on gui=>Maintenance=>Device State
                see definition following OBJECT-TYPE
            "
     ::= {tapNotifications 6}

tapFirmwareUpgrade NOTIFICATION-TYPE
     OBJECTS {
            trapSequence,
            phoneNumber,               -- phone number of voip500
            usedIPAddressType,         -- defaults to always being IPv4
            usedIPAddress,             -- IP address for voip500 phone
            firmwareUpgradeStatus,     -- failure or success indication, see OBJECT-TYPE
            firmwareUpgradeNewVersion  -- version string of new image
            }
     STATUS current
     DESCRIPTION "results of upgrading (success/failure) to new image/flash from old image/flash"
     ::= {tapNotifications 7}

-- Conformance definitions

tapCompliances OBJECT IDENTIFIER ::= { tapConformance 1 }
tapGroups      OBJECT IDENTIFIER ::= { tapConformance 2 }


tapNotificationsGroups NOTIFICATION-GROUP
    NOTIFICATIONS {
                  tapRegistration,
                  tapCall,
                  tapAuxiliaryOutput,
                  tapSelfDiagnostics,
                  tapDeviceState,
                  tapPagingInbound,
                  tapFirmwareUpgrade
                  }
    STATUS current
    DESCRIPTION "Notifications"
    ::= {tapGroups 1}

tapRegistrationGroup OBJECT-GROUP
    OBJECTS {
            trapSequence,
            phoneNumber,
            usedIPAddressType,
            usedIPAddress,
            usedIPPort,
            sIPRegistrationStatus
            }
    STATUS current
    DESCRIPTION "More details on success/failure of request"
    ::= { tapGroups 2}


tapCallGroup OBJECT-GROUP
    OBJECTS {
            trapSequence,
            phoneNumber,
            usedPhoneNumber,
            usedIPAddressType,
            usedIPAddress,
            usedIPPort,
            button,
            callStatus
            }
    STATUS current
    DESCRIPTION "More details on success/failure of request"
    ::= { tapGroups 3}

tapAuxiliaryOutputGroup OBJECT-GROUP
    OBJECTS {
            trapSequence,
            phoneNumber,
            usedIPAddressType,
            usedIPAddress,
            button,
            auxiliaryOutputStatus
            }
    STATUS current
    DESCRIPTION "More details on success/failure of request"
    ::= { tapGroups 4}

tapSelfDiagnosticsGroup OBJECT-GROUP
    OBJECTS {
            trapSequence,
            phoneNumber,
            usedIPAddressType,
            usedIPAddress,
            selfButton1Status,
            selfButton2Status,
            selfButton3Status,
            selfButton4Status,
            selfSpeakerMicStatus,
            selfWEBStatus
            }
    STATUS current
    DESCRIPTION "More details on success/failure of request"
    ::= { tapGroups 5}

tapDeviceStateGroup OBJECT-GROUP
     OBJECTS {
            trapSequence,
            phoneNumber,               -- phone number of voip500
            usedIPAddressType,         -- defaults to always being IPv4
            usedIPAddress,             -- IP address for voip500 phone
            stateLEDs,
            stateAuxiliaryInputs,
            stateAuxiliaryOutputs,
            stateOtherDevices
            }
     STATUS current
     DESCRIPTION "same information as that appearing on gui=>Maintenance=>Device State"
     ::= {tapGroups 6}

tapPagingInboundGroup OBJECT-GROUP
     OBJECTS {
            trapSequence,
            phoneNumber,               -- phone number of voip500
            usedIPAddressType,         -- defaults to always being IPv4
            usedIPAddress,             -- IP address for voip500 phone
            pagingOutputDevice,        -- identify Speaker or LLO output
            pagingOutputStatus         -- [de]activated
            }
     STATUS current
     DESCRIPTION "same information as that appearing on gui=>Maintenance=>Device State"
     ::= {tapGroups 7}

tapFirmwareUpgradeGroup OBJECT-GROUP
     OBJECTS {
            trapSequence,
            phoneNumber,               -- phone number of voip500
            usedIPAddressType,         -- defaults to always being IPv4
            usedIPAddress,             -- IP address for voip500 phone
            firmwareUpgradeStatus,     -- failure or success indication
            firmwareUpgradeNewVersion -- complete version string of new image
            }
     STATUS current
     DESCRIPTION "self diagnostics test status"
     ::= {tapGroups 8}

-- Simple Object Definitions

trapSequence OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "incrementing number to identify missed traps at NMS"
    ::= {tapObjects 1}

phoneNumber OBJECT-TYPE
    SYNTAX DisplayString (SIZE (0..255))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the phone number of the voip500"
   ::= {tapObjects 2}

usedPhoneNumber OBJECT-TYPE
    SYNTAX DisplayString (SIZE (0..255))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the phone number of the destination (not that of the voip500)"
   ::= {tapObjects 3}

usedIPAddressType OBJECT-TYPE
    SYNTAX InetAddressType
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "A value that represents type of IP address.
                 voip500 only supports IPv4

         unknown(1)  An unknown address type.  This value MUST
                     be used if the value of the corresponding
                     InetAddress object is a zero-length string.
                     It may also be used to indicate an IP address
                     that is not in one of the formats defined
                     below.

         ipv4(2)     An IPv4 address as defined by the
                     InetAddressIPv4 textual convention."
    ::= {tapObjects 4}

usedIPAddress OBJECT-TYPE
--  DISPLAY-HINT "1d.1d.1d.1d"
    SYNTAX InetAddress (SIZE(0|4))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the IP addresss at the registrar, 
                 which could be the primary, secondary, or tertiarary"
    ::= {tapObjects 5}

usedIPPort OBJECT-TYPE
    SYNTAX DisplayString (SIZE (0..255))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the port number at the registrar for SIP messages"
    ::= {tapObjects 6}

sIPRegistrationStatus OBJECT-TYPE
    SYNTAX INTEGER {
          regFailure(1),
          regSuccess(2),
          regRejected(3),
          regRefresh(4),
          regTerminated(5),
          unregSuccess(6),
          unAuthenticate(7) }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the registration completion code as defined above"
    ::= {tapObjects 7}

callStatus OBJECT-TYPE
    SYNTAX INTEGER {callFailure(1),
          callPlaced(2),
          callReceived(3), 
          callConnected(4),
          callTerminated(5),
          callRejected(6),
          callMissed(7) }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "indicating current SIP based call status
                 all calls can have status updates until the last status for call ended"
    ::= {tapObjects 8}

auxiliaryOutputStatus OBJECT-TYPE
    SYNTAX INTEGER {
          deactivated(1),
          activated(2)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the current auxiliary output activation or deactivation"
    ::= {tapObjects 9}

button OBJECT-TYPE
    SYNTAX INTEGER {
          unknown(-1),
          handset(1),
          button1(2),
          button2(3),
          button3(4),
          button4(5),
          auxiliaryinput1(6),
          auxiliaryinput2(7),
          auxiliaryinput3(8),
          keypad(9),
          remote(10),
          selftest(11),
          auxiliaryoutput1(12),
          auxiliaryoutput2(13),
          auxiliaryoutput3(14)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "handset (1) or button 2, 3, 4, 5
                 or auxin1, auxin2, auxin3
                 or keypad
                 or remote
                 or selftest
                 or auxout1, auxout2, auxout3 values are one of 12, 13, 14
                 identify the auxiliary output
                "
    ::= {tapObjects 10}

stateLEDs OBJECT-TYPE
    SYNTAX INTEGER {
          callPlacedOff(1),
          callPlacedOn(2), 
          callReceivedOff(3),
          callReceivedOn(4), 
          helpOnTheWayOff(5),
          helpOnTheWayOn(6) }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Indicating current LEDs state gui=>Maintenance=>Device State.
                 Considering LEDs can be switched on or off at any time based on current operation;
                 All LEDs are assumed off, this OID element is sent only when state changes between on and off"
    ::= {tapObjects 11}

stateAuxiliaryInputs OBJECT-TYPE
    SYNTAX INTEGER {
          auxiliaryInput1Off(1),
          auxiliaryInput1On(2),
          auxiliaryInput2Off(3),
          auxiliaryInput2On(4),
          auxiliaryInput3Off(5),
          auxiliaryInput3On(6)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Indicating current Auxiliary Inputs state gui=>Maintenance=>Device State.
                 Considering Auxiliary Input buttons can be switched on or off at any time based on current operation;
                 All Auxiliary Input buttons are assumed off, this OID element is sent only when state changes between on and off"
    ::= {tapObjects 12}

stateAuxiliaryOutputs OBJECT-TYPE
    SYNTAX INTEGER {
          auxiliaryOutput1Off(1),
          auxiliaryOutput1On(2),
          auxiliaryOutput2Off(3),
          auxiliaryOutput2On(4),
          auxiliaryOutput3Off(5),
          auxiliaryOutput3On(6)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Indicating current Auxiliary Outputs state gui=>Maintenance=>Device State.
                 Considering Auxiliary Outputs buttons can be switched on or off at any time based on current operation;
                 All Auxiliary Outputs buttons are assumed off, this OID element is sent only when state changes between on and off"
    ::= {tapObjects 13}

stateOtherDevices OBJECT-TYPE
    SYNTAX INTEGER {
          handsetOff(1),
          handsetOn(2),
          speakerOff(3),
          speakerOn(4),
          lloOff(5),
          lloOn(6),
          microphoneOff(7),
          microphoneOn(8)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Indicating current OtherDevices (microphone, speaker, llo) state gui=>Maintenance=>Device State.
                 Considering OtherDevices buttons can be switched on or off at any time based on current operation;
                 All OtherDevices buttons are assumed off, this OID element is sent only when state changes between on and off"
    ::= {tapObjects 14}

pagingOutputDevice OBJECT-TYPE
    SYNTAX INTEGER {
          llo(1),
          speaker(2)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Indicating for inbound call answered/ended as paging selection with output routed to speaker or line level output
                 reference gui=>VoIP=>Paging Settings=>Select paging output."
    ::= {tapObjects 15}
            
pagingOutputStatus OBJECT-TYPE
    SYNTAX INTEGER {
          deactivated(1),
          activated(2)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Indicating for inbound call answered/ended as paging selection with current [de]activated status
                 reference gui=>VoIP=>Paging Settings=>Select paging output."
    ::= {tapObjects 16}

selfButton1Status OBJECT-TYPE
    SYNTAX INTEGER {
          success(1),
          failed(2),
          disconnected(3),
          stuck(4),
          invalidResult(5)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Button 1 self diagnostics results - only included if (test run & failed) or (test run & always specified)"
    ::= {tapObjects 17}

selfButton2Status OBJECT-TYPE
    SYNTAX INTEGER {
          success(1),
          failed(2),
          disconnected(3),
          stuck(4),
          invalidResult(5)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Button 2 self diagnostics results - only included if (test run & failed) or (test run & always specified)"
    ::= {tapObjects 18}

selfButton3Status OBJECT-TYPE
    SYNTAX INTEGER {
          success(1),
          failed(2),
          disconnected(3),
          stuck(4),
          invalidResult(5)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Button 3self diagnostics results - only included if (test run & failed) or (test run & always specified)"
    ::= {tapObjects 19}

selfButton4Status OBJECT-TYPE
    SYNTAX INTEGER {
          success(1),
          failed(2),
          disconnected(3),
          stuck(4),
          invalidResult(5)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Button 4 self diagnostics results - only included if (test run & failed) or (test run & always specified)"
    ::= {tapObjects 20}

selfSpeakerMicStatus OBJECT-TYPE
    SYNTAX INTEGER {
         success(1),
         failure(2)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "Speaker & microphone self diagnostics results - only included if (test run & failed) or (test run & always specified)"
    ::= {tapObjects 21}

selfWEBStatus OBJECT-TYPE
    SYNTAX INTEGER {
         success(1),
         failure(2)}
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "WEBS self diagnostics results - only included if (test run & failed) or (test run & always specified)"
    ::= {tapObjects 22}

firmwareUpgradeStatus OBJECT-TYPE
    SYNTAX INTEGER {
         successFirmware(1),
         successConfig(2),
         failed(3),
         notDefined(4),
         downloadConfigError(5),
         downloadError(6),
         flashingError(7),
         networkProblem(8),
         failedConfig(9) }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "[Un]successful firmware upgrade
                successFirmware(1)     successful firmware upgrade
                successConfig(2)       successful configuration update
                failed(3)              non-specific failure
                notDefined(4)          deprecated
                downloadConfigError(5) unable to save download config information
                downloadError(6)       unable to retrieve the image file from the server, typically wrong name or wrong IP address
                                       or errors downloading the complete image file
                flashingError(7)       flashing of image failed
                networkProblem(8)      network problem, typically the physical eth0 link is down
                failedConfig(9)
                "
    ::= {tapObjects 23}

firmwareUpgradeNewVersion OBJECT-TYPE
    SYNTAX DisplayString (SIZE (0..255))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION "the version to which upgrade is occurring"
    ::= {tapObjects 24}

tapCompliance MODULE-COMPLIANCE
      STATUS current
      DESCRIPTION
          "Compliance statement for TALKAPHONE-MIB"
      MODULE -- this module
          GROUP tapNotificationsGroups
          DESCRIPTION "optional OID"
          GROUP tapRegistrationGroup
          DESCRIPTION "optional OID"
          GROUP tapCallGroup
          DESCRIPTION "optional OID"
          GROUP tapAuxiliaryOutputGroup
          DESCRIPTION "optional OID"
          GROUP tapDeviceStateGroup
          DESCRIPTION "optional OID"
          GROUP tapPagingInboundGroup
          DESCRIPTION "optional OID"
          GROUP tapSelfDiagnosticsGroup
          DESCRIPTION "optional OID"
          GROUP tapFirmwareUpgradeGroup
          DESCRIPTION "optional OID"
    ::= { tapCompliances 1}

END
