-- ****************************************************************************
-- ****************************************************************************
--
--             Copyright(c) 2003-2005 Mediatrix Telecom, Inc.
--      Copyright(c) 2010 Media5 Corporation. ("Media5")
--
--  NOTICE:
--   This document contains information that is confidential and proprietary
--   to Media5.
--
--   Media5 reserves all rights to this document as well as to the Intellectual
--   Property of the document and the technology and know-how that it includes
--   and represents.
--
--   This publication cannot be reproduced, neither in whole nor in part, in
--   any form whatsoever without written prior approval by Media5.
--
--   Media5 reserves the right to revise this publication and make changes at
--   any time and without the obligation to notify any person and/or entity of
--   such revisions and/or changes.
--
-- ****************************************************************************
-- ****************************************************************************

MX-TELEPHONY-ATTRIBUTES-MIB
DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY,
        OBJECT-TYPE,
        Unsigned32
    FROM SNMPv2-SMI
        MODULE-COMPLIANCE,
        OBJECT-GROUP
    FROM SNMPv2-CONF
        ifIndex
    FROM RFC1213-MIB
        MxEnableState
    FROM MX-TC
        mediatrixConfig
    FROM MX-SMI;

telephonyAttributesMIB MODULE-IDENTITY
    LAST-UPDATED "201010050000Z"
    ORGANIZATION "Mediatrix Telecom, Inc."
    CONTACT-INFO "Mediatrix Telecom, Inc.
                  4229, Garlock Street
                  Sherbrooke (Quebec)
                  Canada
                  Phone: (819) 829-8749
                  "
    DESCRIPTION  "This MIB is used to configure the characteristics of
                  the telephony system being implemented. "


    -- ************************************************************************
    -- Revision history
    -- ************************************************************************
    REVISION    "201010050000Z"
    DESCRIPTION "Added telephonyAttributesAutomaticRejection."
    REVISION    "200611270000Z"
    DESCRIPTION "Added variables telephonyAttributesDelayedHotLineEnable, 
                 telephonyAttributesDelayedHotLineExtension and 
                 telephonyAttributesDelayedHotLineTargetAddress to the
                 telephonyAttributesIfFeaturesTable."
    REVISION    "200507040000Z"
    DESCRIPTION "Added outOfBandUsingRtp to the list of legal values for variable
                 telephonyAttributesHookFlashProcessing"
    REVISION    "200305160000Z"
    DESCRIPTION "Specified that telephonyAttributesHookFlashProcessing depends on protocol."
    REVISION    "200304300000Z"
    DESCRIPTION "Clarified description of variable telephonyAttributesCallDirectionRestriction."
    REVISION    "200303180000Z"
    DESCRIPTION "Added variable telephonyAttributesHookFlashProcessing.
                 Correction of the TelephonyAttributesIfFeaturesEntry."
    REVISION    "200303030000Z"
    DESCRIPTION "Creation.
                 The following variables were moved from MX-TELEPHONY-SERVICES-MIB
                 to this MIB, (the prefix was renamed to telephonyAttributes):

                 telephonyServicesIpAddressCallEnable
                 telephonyServicesAutomaticCallEnable
                 telephonyServicesAutomaticCallTargetAddress"

    ::= { mediatrixConfig 70 }

telephonyAttributesMIBObjects OBJECT IDENTIFIER ::= { telephonyAttributesMIB 1 }
telephonyAttributesConformance OBJECT IDENTIFIER ::= { telephonyAttributesMIB 2 }


    -- ************************************************************************
    -- Features Table
    -- ************************************************************************
    telephonyAttributesIfFeaturesTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF TelephonyAttributesIfFeaturesEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "A table of the telephony features configuration for
                     the interface, indexed by the interface number."
        ::= { telephonyAttributesMIBObjects 10 }

        telephonyAttributesIfFeaturesEntry OBJECT-TYPE
            SYNTAX      TelephonyAttributesIfFeaturesEntry
            MAX-ACCESS  not-accessible
            STATUS      current
            DESCRIPTION "A row in the telephonyAttributesIfFeaturesTable table.
                         It contains the configuration of the telephony features for this interface."
            INDEX       {
                            ifIndex
                        }
            ::= { telephonyAttributesIfFeaturesTable 1 }

            TelephonyAttributesIfFeaturesEntry ::= SEQUENCE
                {
                    telephonyAttributesAutomaticCallEnable          MxEnableState,
                    telephonyAttributesAutomaticCallTargetAddress   OCTET STRING,
                    telephonyAttributesCallDirectionRestriction     INTEGER,
                    telephonyAttributesHookFlashProcessing          INTEGER,
                    telephonyAttributesDelayedHotLineEnable         MxEnableState,
                    telephonyAttributesDelayedHotLineExtension      MxEnableState,
                    telephonyAttributesDelayedHotLineTargetAddress  OCTET STRING
                }

            telephonyAttributesAutomaticCallEnable OBJECT-TYPE
                SYNTAX  MxEnableState
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "Enable/Disable the automatic call service.
                             This service provides a 'redphone'-like experience.

                             If enabled, the target address is automatically called when the user picks up
                             the phone.

                             When this service is enabled, the second line service will be disabled but the
                             call waiting feature will still be functional. The user can still accept
                             incoming calls.

                             See telephonyAttributesAutomaticCallTargetAddress."
                DEFVAL      { disable }
                ::= { telephonyAttributesIfFeaturesEntry 5 }

            telephonyAttributesAutomaticCallTargetAddress OBJECT-TYPE
                SYNTAX  OCTET STRING (SIZE(0..127))
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "A string that represents the address or telephone number that the user wants
                             to automatically call.

                             This variable's semantics are different depending on protocol
                             and/or hardware platforms.
                             Please refer to the documentation for more details."
                DEFVAL      { "" }
                ::= { telephonyAttributesIfFeaturesEntry 10 }

            telephonyAttributesCallDirectionRestriction OBJECT-TYPE
                SYNTAX  INTEGER {
                                  noRestriction(0),
                                  scnToIpOnly(1),
                                  ipToScnOnly(2)
                                }
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "Restriction on the direction of traffic on a specific line.

                             noRestriction : Allow incoming and outgoing calls.

                             scnToIpOnly : Allow only calls from the SCN to the IP network. For an FXS line,
                                        the unit allows making calls but not receiving calls. For an FXO
                                        line, the unit answers incoming calls but does not allow outgoing
                                        calls.

                             ipToScnOnly : Allow only calls from the IP network to the SCN. For an FXS line,
                                        the unit allows receiving calls but not making calls. For an FXO
                                        line, the unit allows outgoing calls but does not answer incoming
                                        calls."
                DEFVAL      { noRestriction }
                ::= { telephonyAttributesIfFeaturesEntry 15 }

            telephonyAttributesHookFlashProcessing OBJECT-TYPE
                SYNTAX  INTEGER {
                                  processLocally(0),
                                  transmitUsingSignalingProtocol(1),
                                  outOfBandUsingRtp(2)
                                }
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "Select how hook-flash detection is processed.

                             When a call is in progress and the 'flash' button of the telephone is pressed,
                             the user can normally put the call on hold, transfer the call or even initiate
                             a conference call. telephonyAttributesHookFlashProcessing allows these
                             subscriber services to be handled by the unit or to be delegated to a remote
                             party.

                             processLocally : Hook-flash is processed locally. The actual behavior of the
                                              'flash' button depends on which subscriber services are
                                              enabled for this line. See subscriberServicesIfEnablingTable.

                             transmitUsingSignalingProtocol : Hook-flash is processed by a remote party. The
                                                              hook-flash event is carried by a signaling
                                                              protocol message. The actual behavior of the
                                                              'flash' button depends on the remote party.

                             outOfBandUsingRtp : Hook-flash is processed by a remote party. The hook-flash  
                                                 event is relayed as telephone-event 16 via an RFC 2833 RTP packet. 
                                                 The actual behavior of the 'flash' button depends on the remote party.

                             This variable's semantics are different depending on protocol and/or hardware platforms.
                             Please refer to the documentation for more details."
                DEFVAL      { processLocally }
                ::= { telephonyAttributesIfFeaturesEntry 20 }

            telephonyAttributesDelayedHotLineEnable OBJECT-TYPE
                SYNTAX  MxEnableState
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "Enables/Disables the Delayed Hot Line feature.
                             This service places an automatic call whenever the digitMapTimeoutFirstDigit
                             timer expires.

                             When disabled, a user picking up the phone but not pressing any
                             telephone keys hears the Receiver Off-Hook tone after the 
                             amount of time specified in the digitMapTimeoutFirstDigit variable.

                             When enabled, the expiration of the above timeout rather results in an 
                             automatic call being placed to the destination specified by the
                             telephonyAttributesDelayedHotLineTargetAddress variable."
                DEFVAL      { disable }
                ::= { telephonyAttributesIfFeaturesEntry 70 }

            telephonyAttributesDelayedHotLineExtension OBJECT-TYPE
                SYNTAX  MxEnableState
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "Enables/Disables the extended version of the Delayed Hot Line feature.
                             With this extension, the automatic call mentioned in the basic feature is
                             placed upon expiration of the digitMapTimeoutCompletion timer.

                             When disabled, a user beginning to dial a telephone number but failing to 
                             complete the operation before the expiration of the digitMapTimeoutCompletion
                             timeout, hears the Receiver Off-Hook tone.

                             When enabled, the destination specified by the
                             telephonyAttributesDelayedHotLineTargetAddress variable is called 
                             upon expiration of the timeout.

                             See telephonyAttributesDelayedHotLineEnable."
                DEFVAL      { disable }
                ::= { telephonyAttributesIfFeaturesEntry 120 }

            telephonyAttributesDelayedHotLineTargetAddress OBJECT-TYPE
                SYNTAX  OCTET STRING (SIZE(0..127))
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "The destination (address or telephone number) that is automatically called
                             with both versions of the Delayed Hot Line feature.

                             See telephonyAttributesDelayedHotLineEnable and
                             telephonyAttributesDelayedHotLineExtension.

                             This variable's semantics are different depending on protocol
                             and/or hardware platforms.
                             Please refer to the documentation for more details."
                DEFVAL      { "" }
                ::= { telephonyAttributesIfFeaturesEntry 170 }

            telephonyAttributesAutomaticRejection OBJECT-TYPE
                SYNTAX  Unsigned32 ( 0..600 )
                MAX-ACCESS  read-write
                STATUS      current
                DESCRIPTION "The number of seconds a port is allowed to ring before
                             automatically rejecting the call.

                             A value of 0 means that there is no limit so the port
                             rings until the caller hangs up.

                             This variable's semantics are different depending on protocol
                             and/or hardware platforms.
                             Please refer to the documentation for more details."
                DEFVAL      { 0 }
                ::= { telephonyAttributesIfFeaturesEntry 220 }


    -- ************************************************************************
    -- IP Address Call group
    -- ************************************************************************
    telephonyAttributesIpAddressCallCustomization OBJECT IDENTIFIER ::= { telephonyAttributesMIBObjects 30 }

    telephonyAttributesIpAddressCallEnable OBJECT-TYPE
        SYNTAX  MxEnableState
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION "Enable/Disable the direct IP address call service.

                     This service allows a user to make a call without the help of a server.

                     When this service is enabled, the user can dial an IP address and enter
                     an optional phone number.  Note that the optional phone number will be matched
                     by using the same digit maps as for a normal call.

                     Using this method will bypass any server configuration found in your unit.

                     To make an IP address call:

                        1. Dial '**'

                        2. Dial the numerical digits of the IP address.  For the dot '.', use the
                           star '*' sign.

                        3. Terminate the IP call without specifying a phone number by using the star '*'.
                           - or -
                           Continue with a phone number by using the pound '#' sign.

                        4. Optionally, dial the phone number.

                     Example IP calls to a unit at IP address '1.2.3.4' :

                     1 - If phone number is of no concern, the user dials the following digits:
                         **1*2*3*4*

                     2 - To reach the phone number '3330001', the user dials the following digits:
                         **1*2*3*4#3330001"
        DEFVAL      { disable }
        ::= { telephonyAttributesIpAddressCallCustomization 5 }

    -- ************************************************************************
    -- Conformance information
    -- ************************************************************************
    telephonyAttributesCompliances OBJECT IDENTIFIER ::= { telephonyAttributesConformance 1 }

    telephonyAttributesComplVer1 MODULE-COMPLIANCE
        STATUS      current
        DESCRIPTION
            "List of groups required to support telephony attributes."
        MODULE  -- This Module
            MANDATORY-GROUPS {
                                telephonyAttributesFeaturesTableVer1,
                                telephonyAttributesIpAddressCallVer1
                             }
        ::= { telephonyAttributesCompliances 1 }

    -- ************************************************************************
    --  MIB variable grouping
    -- ************************************************************************
    telephonyAttributesGroups OBJECT IDENTIFIER ::= { telephonyAttributesConformance 5 }

    telephonyAttributesFeaturesTableVer1 OBJECT-GROUP
        OBJECTS {
                    telephonyAttributesAutomaticCallEnable,
                    telephonyAttributesAutomaticCallTargetAddress,
                    telephonyAttributesCallDirectionRestriction,
                    telephonyAttributesHookFlashProcessing,
                    telephonyAttributesDelayedHotLineEnable,
                    telephonyAttributesDelayedHotLineExtension,
                    telephonyAttributesDelayedHotLineTargetAddress,
                    telephonyAttributesAutomaticRejection
                }
        STATUS current
        DESCRIPTION
            "A collection of objects that defines the characteristics of telephony attributes."
        ::= { telephonyAttributesGroups 10 }

    telephonyAttributesIpAddressCallVer1 OBJECT-GROUP
        OBJECTS {
                    telephonyAttributesIpAddressCallEnable
                }
        STATUS current
        DESCRIPTION
            "A collection of objects that defines the characteristics of telephony attributes."
        ::= { telephonyAttributesGroups 15 }
END
