-- *********************************************************************
-- CISCO-VOICE-CAS-MODULE-MIB.my: MIB for CAS Signaling Bit Translation.
--
-- March 2004, Rashmi Purandare, George Ogagan
--
-- Copyright (c) 2004 by cisco Systems, Inc.
-- All rights reserved.
--
-- *********************************************************************

CISCO-VOICE-CAS-MODULE-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY,
    OBJECT-TYPE,
    Unsigned32                     FROM SNMPv2-SMI
    TEXTUAL-CONVENTION,
    RowStatus                      FROM SNMPv2-TC
    MODULE-COMPLIANCE, 
    OBJECT-GROUP                   FROM SNMPv2-CONF
    SnmpAdminString                FROM SNMP-FRAMEWORK-MIB
    EntPhysicalIndexOrZero         FROM CISCO-TC
    ciscoMgmt                      FROM CISCO-SMI;

ciscoVoiceCasModuleMIB  MODULE-IDENTITY
        LAST-UPDATED    "200403150000Z"
        ORGANIZATION    "Cisco Systems, Inc."
        CONTACT-INFO
                   "    Cisco Systems
                        Customer Service

                Postal: 170 W Tasman Drive
                        San Jose, CA 95134
                        USA

                        Tel: +1 800 553-NETS

                E-mail: cs-voice-gateway@cisco.com"

        DESCRIPTION
                "This MIB is used to support Programmable 
                 CAS signaling Bit configuration on modules
                 that support voice traffic.

                 This MIB will enable programming of the CAS
                 bits in order to translate incoming/outgoing 
                 bit patterns from/to the TDM or packet side 
                 interface.
                 
                 Terminology:
                 
                 ABCD - Signaling bits describing off-hook,
                        on-hook, idle, flash, etc events.

                 DSP - Digital Signal Processing

                 CAS - Channal Associated Signaling

                 E&M - Ear and Mouth Protocol

                 TDM - Time Division Multiplexed
                "
        REVISION        "200403150000Z"                                
        DESCRIPTION     "Initial version of the MIB"
                         
        ::= { ciscoMgmt 389 }

ciscoVoiceCasModuleNotifs   OBJECT IDENTIFIER ::=
                               { ciscoVoiceCasModuleMIB 0 }

ciscoVoiceCasModuleObjects  OBJECT IDENTIFIER ::= 
                               { ciscoVoiceCasModuleMIB 1 }

cvcmCasConfig                  OBJECT IDENTIFIER ::=
                               { ciscoVoiceCasModuleObjects 1 }

----------------------------------------------------------------
--TEXTUAL CONVENTIONS
----------------------------------------------------------------

CvcmCasPatternBitPosition::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Defines the bit positions for the incoming
         and outgoing ABCD bit patterns.
         All positions need to be set to 0 or 1 in
         order to have the correct pattern.

         dBit : Position of the D bit in the 
                ABCD bit pattern
         cBit : Position of the C bit in the 
                ABCD bit pattern
         bBit : Position of the B bit in the
                ABCD bit pattern
         aBit : Position of the A bit in the
                ABCD bit pattern
        "
    SYNTAX BITS {
                  dBit(0),
                  cBit(1),
                  bBit(2),
                  aBit(3)
                }

CvcmCasBitAction::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "Defines the actions that can be performed on the
         CAS ABCD bits.

         casBitNoAction   : No action on the bit specifed. 
                            Maintain incoming bit value. 
         casBitSetToZero  : Set bit to zero
         casBitSetToOne   : Set bit to one
         casBitInvertBit  : Invert incoming bit
         casBitInvertABit : Invert A bit and apply to the 
                            bit location specified
         casBitInvertBBit : Invert B bit and apply to the 
                            bit location specified 
         casBitInvertCBit : Invert C bit and apply to the 
                            bit location specified 
         casBitInvertDBit : Invert D bit and apply to the 
                            bit location specified 
         casBitABit       : Apply A bit value to the bit 
                            location specified
         casBitBBit       : Apply B bit value to the bit 
                            location specified
         casBitCBit       : Apply C bit value to the bit 
                            location specified
         casBitDBit       : Apply D bit value to the bit 
                            location specified
       "
    SYNTAX INTEGER {
               casBitNoAction(1),
               casBitSetToZero(2),
               casBitSetToOne(3),
               casBitInvertBit(4),
               casBitInvertABit(5),
               casBitInvertBBit(6),
               casBitInvertCBit(7),
               casBitInvertDBit(8),
               casBitABit(9),
               casBitBBit(10),
               casBitCBit(11),
               casBitDBit(12)
              }


cvcmABCDBitTemplateConfigTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF CvcmABCDBitTemplateConfigEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is used to configure templates
         on the module/card. These templates provide
         mapping information between the incoming CAS 
         ABCD signaling bit patterns and the outgoing 
         ABCD signaling bit patterns. The outgoing 
         bit patterns are derived from the incoming 
         bit patterns by applying a set of actions to
         each incoming bit.
         
         Thus, this table essentially contains 
         configuration information about CAS ABCD 
         signaling bits.

         The ABCD bit carries signaling information
         describing off-hook, on-hook event etc on a
         T1 or E1. The pattern representations
         differ in CAS variants on a T1 and E1.

         For example:
         On T1:
         E&M protocol ABCD seized is 1100
         On E1:
         CAS-R2 signaling ABCD seized is 0001

         This table is configured on a per module/ card 
         basis.

         Further, one can have multiple different actions
         performed on the different bits (A, B, C or D)
         consecutively for the same incoming ABCD bit 
         index. However, a given bit position can only 
         have one action being performed on it for a given
         incoming bit pattern.

         For example, for a given incoming bit index, 
         one can define the 'A' bit to be set to 0, the 'B'
         bit to be swapped with the 'C' bit, the 'C' bit to be 
         swapped with the 'B' bit and the 'D' bit to be inverted.
         Thus, using this table, the user can create a template
         with name (cvcmCasTemplateName) 'Template1' where for 
         incoming pattern (cvcmABCDIncomingPattern) '0000', 
         the action on the A bit (cvcmCasABitAction) is 
         'casBitSetToZero', the action on the B bit 
         (cvcmCasBBitAction) is 'casBitCBit', the action on the 
         C bit (cvcmCasCBitAction) is 'casBitBBit' and the action
         on the D bit (cvcmCasDBitAction) is 'casBitInvertBit'.
         This will create one entry in 'Template1' where the 
         resultant outgoing pattern (cvcmABCDOutgoingPattern)
         will be '0001'.
        " 
    ::= { cvcmCasConfig 1 }

cvcmABCDBitTemplateConfigEntry  OBJECT-TYPE
    SYNTAX      CvcmABCDBitTemplateConfigEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry in the table. Each entry consists of 
         user defined CAS ABCD bit information to configure
         a transmit or received signaling channel on a DSP.
        "
    INDEX { cvcmModuleIndex, 
            cvcmCasTemplateIndex, 
            cvcmABCDPatternIndex  
          }
    ::= { cvcmABCDBitTemplateConfigTable 1 }

CvcmABCDBitTemplateConfigEntry ::=
    SEQUENCE {
        cvcmModuleIndex          Unsigned32,          
        cvcmCasTemplateIndex     Unsigned32,
        cvcmABCDPatternIndex     Unsigned32,
        cvcmModulePhysicalIndex  EntPhysicalIndexOrZero,
        cvcmCasTemplateName      SnmpAdminString,
        cvcmABCDIncomingPattern  CvcmCasPatternBitPosition,
        cvcmABCDOutgoingPattern  CvcmCasPatternBitPosition,
        cvcmCasABitAction        CvcmCasBitAction,
        cvcmCasBBitAction        CvcmCasBitAction,
        cvcmCasCBitAction        CvcmCasBitAction,
        cvcmCasDBitAction        CvcmCasBitAction,
        cvcmCasBitRowStatus      RowStatus 
        }

cvcmModuleIndex     OBJECT-TYPE
    SYNTAX          Unsigned32 (1..2147483647)
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        " This object uniquely identifies the card/ module
          where this table resides. It could be the slot
          number of the module or be 1 where 'module' is 
          not applicable.
        "
    ::= { cvcmABCDBitTemplateConfigEntry 1 }

cvcmCasTemplateIndex  OBJECT-TYPE
    SYNTAX          Unsigned32 (1..2147483647)
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "This object will index into the template that 
         is configured in this table.
        " 
    ::= { cvcmABCDBitTemplateConfigEntry 2 }

cvcmABCDPatternIndex   OBJECT-TYPE
    SYNTAX      Unsigned32 (1..16)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Will be used to index into a particular pattern
         mapping in the template that is configured.
         Since there are only 4 signaling bits (A, B, C, D),
         there can only be (2^4) or 16 patterns per 
         template. 
        "
    ::= { cvcmABCDBitTemplateConfigEntry 3 }

cvcmModulePhysicalIndex  OBJECT-TYPE
    SYNTAX     EntPhysicalIndexOrZero
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "This object represents the entPhysicalIndex of 
         the module where this table is being configured. 
         If the entPhysicalTable is not supported on the 
         SNMP agent, then the value of this object will 
         be zero.
        "
    ::= { cvcmABCDBitTemplateConfigEntry 4 }

cvcmCasTemplateName OBJECT-TYPE
    SYNTAX      SnmpAdminString
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object identifies the name of the template
         configured.
         This object needs to be unique among all the
         instances of the cvcmABCDBitTemplateConfigTable.
         The SNMP agent will need to validate this value
         for uniqueness.
        "
    ::= { cvcmABCDBitTemplateConfigEntry 5 }

cvcmABCDIncomingPattern OBJECT-TYPE
    SYNTAX      CvcmCasPatternBitPosition
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object identifies the ABCD signaling bits
         that are received by the module. The actions
         specified in 'cvcmCasABitAction', 'cvcmCasBBitAction',
         'cvcmCasCBitAction' and 'cvcmCasDBitAction' are applied
         to this object.
        "
    ::= { cvcmABCDBitTemplateConfigEntry 6 }

cvcmABCDOutgoingPattern   OBJECT-TYPE
    SYNTAX      CvcmCasPatternBitPosition
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object identifies the ABCD signaling bits
         defined by user, and downloaded to DSP signaling
         channel. 
         This pattern is derived from the actions specified in 
         'cvcmCasABitAction', 'cvcmCasBBitAction', 'cvcmCasCBitAction' 
         and 'cvcmCasDBitAction'. 
         The same pattern can map to different 
         cvcmABCDIncomingPattern depending on the set of actions.
         This pattern is mapped to input ABCD bit pattern 
         received and reported to the TDM or network side.
        "
    ::= { cvcmABCDBitTemplateConfigEntry 7 }

cvcmCasABitAction  OBJECT-TYPE
    SYNTAX     CvcmCasBitAction
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
        "This object identifies the action on the 
         'A' bit of the incoming ABCD bit pattern
         specified in cvcmABCDIncomingPattern.
         For this object,
         'cvcmInvertBit' is same as 'cvcmInvertABit',
         'cvcmNoAction'  is same as 'cvcmABit'.
        " 
    DEFVAL { casBitABit }
    ::= { cvcmABCDBitTemplateConfigEntry 8 }

cvcmCasBBitAction  OBJECT-TYPE
    SYNTAX     CvcmCasBitAction
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
        "This object identifies the action on the 
         'B' bit of the incoming ABCD bit pattern
         specified in cvcmABCDIncomingPattern.
         For this object, 
         'cvcmInvertBit' is same as 'cvcmInvertBBit',
         'cvcmNoAction'  is same as 'cvcmBBit'.
        " 
    DEFVAL { casBitBBit }
    ::= { cvcmABCDBitTemplateConfigEntry 9 }

cvcmCasCBitAction  OBJECT-TYPE
    SYNTAX      CvcmCasBitAction
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object identifies the action on the 
         'C' bit of the incoming ABCD bit pattern
         specified in cvcmABCDIncomingPattern.
         For this object,
         'cvcmInvertBit' is same as 'cvcmInvertCBit',
         'cvcmNoAction'  is same as 'cvcmCBit'.
        " 
    DEFVAL { casBitCBit }
    ::= { cvcmABCDBitTemplateConfigEntry 10 }

cvcmCasDBitAction  OBJECT-TYPE
    SYNTAX      CvcmCasBitAction
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object identifies the action on the 
         'D' bit of the incoming ABCD bit pattern
         specified in cvcmABCDIncomingPattern.
         For this object, 
         'cvcmInvertBit' is same as 'cvcmInvertDBit',
         'cvcmNoAction'  is same as 'cvcmDBit'.
        " 
    DEFVAL { casBitDBit }
    ::= { cvcmABCDBitTemplateConfigEntry 11 }

 cvcmCasBitRowStatus OBJECT-TYPE
    SYNTAX          RowStatus
    MAX-ACCESS      read-create
    STATUS          current
    DESCRIPTION
        "An entry may be created using the 'createAndGo'
         option.  When the row is successfully created, 
         the object will be set to 'active' by the agent. 
         An entry may be deleted by setting the object 
         to 'destroy'.
        "
    ::= { cvcmABCDBitTemplateConfigEntry 12 }

-- ------------------------------------------------------------
-- conformance information
-- ------------------------------------------------------------

cvcmMIBConformance          OBJECT IDENTIFIER ::= 
                             { ciscoVoiceCasModuleMIB 2 }

cvcmMIBGroups OBJECT IDENTIFIER ::= 
                             { cvcmMIBConformance 1 }

cvcmMIBCompliances OBJECT IDENTIFIER ::= 
                             { cvcmMIBConformance 2 }

-- compliance statements

ciscoVoiceCasModuleMIBCompliance MODULE-COMPLIANCE
     STATUS current
     DESCRIPTION
        "Compliance statement for CISCO-VOICE-CAS-MODULE-MIB."
     MODULE -- this module
     MANDATORY-GROUPS { 
                       cvcmCasBitGroup
                      }

     OBJECT     cvcmCasBitRowStatus
     SYNTAX     INTEGER {
                  active      (1),
                  createAndGo (4),
                  destroy     (6)
                }
     DESCRIPTION
         "The values 'createAndGo', 'destroy' and
          'active' need to be supported.
         "

     ::= { cvcmMIBCompliances 1 }

-- units of conformance

cvcmCasBitGroup  OBJECT-GROUP
    OBJECTS {
             cvcmModulePhysicalIndex,
             cvcmCasTemplateName,
             cvcmABCDIncomingPattern,
             cvcmABCDOutgoingPattern,
             cvcmCasABitAction,
             cvcmCasBBitAction,
             cvcmCasCBitAction,
             cvcmCasDBitAction,
             cvcmCasBitRowStatus 
             }
    STATUS current
    DESCRIPTION
        "A collection of objects used for configuring 
         DSP signaling channel.
        "
    ::= { cvcmMIBGroups 1 }

END


