-- ==========================================================================
-- Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
--
-- Description: The purpose of this MIB file is to provide the definition of
--              voice call record.
-- Reference:
-- Version: V1.1
-- History:
-- V1.0 2008-02-17 Initial version, created by Tian Xiaoqiang, Qu Jin
-- V1.1 2009-12-09 Add g729br8 to "HpnicfCodecType", Wang Tong
-- ==========================================================================
HPN-ICF-VOICE-CALL-HISTORY-MIB DEFINITIONS ::= BEGIN
IMPORTS
        OBJECT-TYPE, MODULE-IDENTITY, Integer32, Gauge32
    FROM SNMPv2-SMI
        InetAddressType, InetAddress
    FROM INET-ADDRESS-MIB
        InterfaceIndexOrZero
    FROM IF-MIB
        AbsoluteCounter32
    FROM DIAL-CONTROL-MIB
        TEXTUAL-CONVENTION, DisplayString, TimeStamp
    FROM SNMPv2-TC
        hpnicfVoice
    FROM HPN-ICF-OID-MIB;

hpnicfVoCallHistory MODULE-IDENTITY
    LAST-UPDATED "200802170000Z"
    ORGANIZATION
        ""
    CONTACT-INFO
        ""
    DESCRIPTION
        "This MIB file is to provide the definition of voice call
        history record information."
    REVISION "200802170000Z"
    DESCRIPTION
        "The initial version of this MIB file."
    ::= { hpnicfVoice 16 }

-- ======================================
--          Type declaration
-- ======================================

HpnicfGUid ::= TEXTUAL-CONVENTION
STATUS       current
DESCRIPTION
        "Represents a global call identifier.  The global call identifier is
         used as a unique identifier for an end-to-end call.  A zero length
         HpnicfGUid indicates no value for the global call identifier."
SYNTAX       OCTET STRING(SIZE(0..16))

HpnicfCodecType      ::= TEXTUAL-CONVENTION
STATUS       current
DESCRIPTION
        "Type of Codec."
SYNTAX  INTEGER
        {
        g711a(1),
        g711u(2),
        g723r53(3),
        g723r63(4),
        g729r8(5),
        g729a(6),
        g726r16(7),
        g726r24(8),
        g726r32(9),
        g726r40(10),
        unknown(11),
        g729br8(12)
        }

hpnicfVoiceCallHistoryObjects OBJECT IDENTIFIER ::= { hpnicfVoCallHistory 1 }

-- ===========================================================================
--                        hpnicfCallHistoryTable
-- ===========================================================================
-- callHistoryTable
-- Table to store the past call information.  The destination number
-- and the call connect and disconnect time, and the disconnection
-- cause are stored.  These calls could be circuit switched or virtual
-- circuits.  History of each and every call is stored, of successful
-- calls as well as of unsuccessful and rejected calls.  An entry will
-- be created when a call is cleared.

hpnicfCallHistoryTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF HpnicfCallHistoryEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "A table containing information about specific
             calls to a specific destination."
        ::= { hpnicfVoiceCallHistoryObjects 1 }

hpnicfCallHistoryEntry OBJECT-TYPE
        SYNTAX      HpnicfCallHistoryEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The information regarding a single connection."
        INDEX       { hpnicfCallHistoryIndex }
        ::= { hpnicfCallHistoryTable 1 }


HpnicfCallHistoryEntry ::=
        SEQUENCE {
            hpnicfCallHistoryIndex                     Integer32,
            hpnicfCallHistorySetupTime                 TimeStamp,
            hpnicfCallHistoryConnectTime               TimeStamp,
            hpnicfCallHistoryTerminateTime             TimeStamp,
            hpnicfCallHistoryPeerAddress               DisplayString,
            hpnicfCallHistoryPeerId                    Integer32,
            hpnicfCallHistoryLogicalIfIndex            InterfaceIndexOrZero,
            hpnicfCallHistoryCallOrigin                INTEGER,
            hpnicfCallHistoryChargedUnits              AbsoluteCounter32,
            hpnicfCallHistoryInfoType                  INTEGER,
            hpnicfCallHistoryTransmitPackets           AbsoluteCounter32,
            hpnicfCallHistoryTransmitBytes             AbsoluteCounter32,
            hpnicfCallHistoryReceivePackets            AbsoluteCounter32,
            hpnicfCallHistoryReceiveBytes              AbsoluteCounter32
        }

hpnicfCallHistoryIndex OBJECT-TYPE
        SYNTAX      Integer32 (1..2147483647)
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The index of the call history table.  It's a monotonically
             increasing integer for the sole purpose of indexing call
             disconnection events.  When it reaches to the maximum value,
             the value will back to 1."
        ::= { hpnicfCallHistoryEntry 1 }

hpnicfCallHistorySetupTime OBJECT-TYPE
        SYNTAX      TimeStamp
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The value of sysUpTime when the call was started."
        ::= { hpnicfCallHistoryEntry 2 }

hpnicfCallHistoryConnectTime OBJECT-TYPE
        SYNTAX      TimeStamp
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The value of sysUpTime when the call was connected.
             If the call is not connected, this object will have a
             value of zero."
        ::= { hpnicfCallHistoryEntry 3 }

hpnicfCallHistoryTerminateTime OBJECT-TYPE
        SYNTAX      TimeStamp
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The value of sysUpTime when the call was terminated."
        ::= { hpnicfCallHistoryEntry 4 }

hpnicfCallHistoryPeerAddress OBJECT-TYPE
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number this call was connected to.  If the number is
             not available, it will have a length of zero."
        ::= { hpnicfCallHistoryEntry 5 }

hpnicfCallHistoryPeerId OBJECT-TYPE
        SYNTAX      Integer32 (0..2147483647)
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "This object identifies a single peer.  This is the Id value
             of the peer table entry to which this call was made.  If a
             peer table entry for this call does not exist or is unknown,
             the value of this object will be zero."
        ::= { hpnicfCallHistoryEntry 6 }

hpnicfCallHistoryLogicalIfIndex OBJECT-TYPE
        SYNTAX      InterfaceIndexOrZero
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "This is the ifIndex value of the logical interface through
             which this call was made.  For ISDN media, this would be
             the ifIndex of the B channel which was used for this call.
             If the ifIndex value is unknown, the value of this object
             will be zero."
        ::= { hpnicfCallHistoryEntry 7 }

hpnicfCallHistoryCallOrigin OBJECT-TYPE
        SYNTAX      INTEGER {
            originate(1),
            answer(2),
            callback(3)
        }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The call origin.
             originate        The call that is initiated.
             answer           The call that is accepted.
             callback         Either rejects the call and then calls back,
                              or uses the 'Reverse charging' information
                              element if it is available. Note that callback(3)
                              is supposed to control charging, not security,
                              and applies to callback prior to accepting a call.
                              Callback for security reasons can be handled using
                              PPP callback."
        ::= { hpnicfCallHistoryEntry 8 }

hpnicfCallHistoryChargedUnits OBJECT-TYPE
        SYNTAX      AbsoluteCounter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of charged units for this connection.
             For incoming calls or if charging information is
             not supplied by the switch, the value of this object
             will be zero."
        ::= { hpnicfCallHistoryEntry 9 }

hpnicfCallHistoryInfoType OBJECT-TYPE
        SYNTAX      INTEGER {
            other(1),
            speech(2),
            unrestrictedDigital(3),
            unrestrictedDigital56(4),
            restrictedDigital(5),
            audio31(6),
            audio7(7),
            video(8),
            packetSwitched(9),
            fax(10)
        }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The information type for this call.
             other                          E.g. for non-isdn media.
             speech                         Speech.
             unrestrictedDigital            Unrestricted digital information
                                            with 64k rate adaption.
             unrestrictedDigital56          Unrestricted digital information
                                            with 56k rate adaption.
             restrictedDigital              Restricted digital information.
             audio31                        3.1 kHz audio.
             audio7                         7 kHz audio.
             video                          Video.
             packetSwitched                 Packetswitch.
             fax                            Fax."
        ::= { hpnicfCallHistoryEntry 10 }

hpnicfCallHistoryTransmitPackets OBJECT-TYPE
        SYNTAX      AbsoluteCounter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of packets which were transmitted while this
             call was active."
        ::= { hpnicfCallHistoryEntry 11 }

hpnicfCallHistoryTransmitBytes OBJECT-TYPE
        SYNTAX      AbsoluteCounter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of bytes which were transmitted for this call."
        ::= { hpnicfCallHistoryEntry 12 }

hpnicfCallHistoryReceivePackets OBJECT-TYPE
        SYNTAX      AbsoluteCounter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of packets which were received for this call."
        ::= { hpnicfCallHistoryEntry 13 }

hpnicfCallHistoryReceiveBytes OBJECT-TYPE
        SYNTAX      AbsoluteCounter32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of bytes which were received for this call."
        ::= { hpnicfCallHistoryEntry 14 }

-- ===========================================================================
--                        hpnicfVoiceCallHistoryTable
-- ===========================================================================

hpnicfVoiceCallHistoryTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF HpnicfVoiceCallHistoryEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table is the voice extension to the call history table
            of DIAL-CONTROL-MIB.  It contains voice encapsulation call
            leg information that is derived from the statistics of lower
            layer telephony interface."
        ::= { hpnicfVoiceCallHistoryObjects 2 }

hpnicfVoiceCallHistoryEntry OBJECT-TYPE
        SYNTAX      HpnicfVoiceCallHistoryEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The information regarding a extended voice call history information."
        INDEX { hpnicfCallHistoryIndex }
        ::= { hpnicfVoiceCallHistoryTable 1 }

HpnicfVoiceCallHistoryEntry ::= SEQUENCE {
        hpnicfVoCallHistoryConnectionId    HpnicfGUid,
        hpnicfVoCallHistoryTxDuration      Gauge32,
        hpnicfVoCallHistoryVoiceTxDuration Gauge32,
        hpnicfVoCallHistoryFaxTxDuration   Gauge32,
        hpnicfVoCallHistoryCoderType       HpnicfCodecType,
        hpnicfVoCallHistoryImgPageCount    Gauge32
    }

hpnicfVoCallHistoryConnectionId OBJECT-TYPE
        SYNTAX      HpnicfGUid
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The global call identifier of circuit switched network for
            the gateway call."
        ::= { hpnicfVoiceCallHistoryEntry 1 }

hpnicfVoCallHistoryTxDuration OBJECT-TYPE
        SYNTAX      Gauge32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Duration of transmit path open from this peer to the
            voice gateway for the call.  The units is milliseconds."
        ::= { hpnicfVoiceCallHistoryEntry 2 }

hpnicfVoCallHistoryVoiceTxDuration OBJECT-TYPE
        SYNTAX      Gauge32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Duration of voice transmitted from this peer to voice
            gateway for this call.  The voice utilization rate can be
            obtained by dividing this by hpnicfVoCallHistoryTxDuration object.
            The units is milliseconds."
        ::= { hpnicfVoiceCallHistoryEntry 3 }

hpnicfVoCallHistoryFaxTxDuration OBJECT-TYPE
        SYNTAX      Gauge32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Duration of fax transmitted from this peer to voice gateway
            for this call.  The fax utilization rate can be obtained by
            dividing this by hpnicfVoCallHistoryTxDuration object.  The units
            is milliseconds."
        ::= { hpnicfVoiceCallHistoryEntry 4 }

hpnicfVoCallHistoryCoderType OBJECT-TYPE
        SYNTAX      HpnicfCodecType
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The negotiated coder type.  It specifies the encode type to
            the PSTN leg of a call."
        ::= { hpnicfVoiceCallHistoryEntry 5 }

hpnicfVoCallHistoryImgPageCount OBJECT-TYPE
        SYNTAX      Gauge32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of fax related image pages are received or
            transmitted via the peer for the call.  The units is page."
        ::= { hpnicfVoiceCallHistoryEntry 6 }

-- ===========================================================================
--                        hpnicfVoiceVoIPCallHistoryTable
-- ===========================================================================
hpnicfVoiceVoIPCallHistoryTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF HpnicfVoiceVoIPCallHistoryEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table is the VoIP extension to the call active table of
            DIAL-CONTROL-MIB.  It contains VoIP call leg information about
            specific VoIP call destination."
        ::= { hpnicfVoiceCallHistoryObjects 3 }

hpnicfVoiceVoIPCallHistoryEntry OBJECT-TYPE
        SYNTAX      HpnicfVoiceVoIPCallHistoryEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The information regarding a extended VoIP call history
            information."
        INDEX {hpnicfCallHistoryIndex }
        ::= { hpnicfVoiceVoIPCallHistoryTable 1 }

HpnicfVoiceVoIPCallHistoryEntry ::= SEQUENCE {
        hpnicfVoVoIPCallHistoryConnectionId    HpnicfGUid,
        hpnicfVoVoIPCallHistoryRemSigIPType    InetAddressType,
        hpnicfVoVoIPCallHistoryRemSigIPAddr    InetAddress,
        hpnicfVoVoIPCallHistoryRemSigPort      Integer32,
        hpnicfVoVoIPCallHistoryRemMedIPType    InetAddressType,
        hpnicfVoVoIPCallHistoryRemMedIPAddr    InetAddress,
        hpnicfVoVoIPCallHistoryRemMedPort      Integer32,
        hpnicfVoVoIPCallHistorySessProtocol    INTEGER,
        hpnicfVoVoIPCallHistoryCoderType       HpnicfCodecType
    }

hpnicfVoVoIPCallHistoryConnectionId OBJECT-TYPE
        SYNTAX      HpnicfGUid
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The global call identifier of packet-switched network for the
            gateway call."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 1 }

hpnicfVoVoIPCallHistoryRemSigIPType OBJECT-TYPE
        SYNTAX      InetAddressType
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The type of remote system signalling IP address for the VoIP call."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 2 }

hpnicfVoVoIPCallHistoryRemSigIPAddr OBJECT-TYPE
        SYNTAX      InetAddress
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Remote system signalling IP address for the VoIP call."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 3 }

hpnicfVoVoIPCallHistoryRemSigPort OBJECT-TYPE
        SYNTAX      Integer32(0..65535)
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Remote system UDP listener signalling port to which to
            transmit voice packets."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 4 }

hpnicfVoVoIPCallHistoryRemMedIPType OBJECT-TYPE
        SYNTAX      InetAddressType
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The type of remote system media IP address for the VoIP call."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 5 }

hpnicfVoVoIPCallHistoryRemMedIPAddr OBJECT-TYPE
        SYNTAX      InetAddress
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Remote system media IP address for the VoIP call."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 6 }

hpnicfVoVoIPCallHistoryRemMedPort OBJECT-TYPE
        SYNTAX      Integer32(0..65535)
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Remote system UDP listener media port to which to transmit voice
            packets."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 7 }

hpnicfVoVoIPCallHistorySessProtocol OBJECT-TYPE
        SYNTAX INTEGER {
            unknown(1),
            h323(2),
            sip(3)
            }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The object specifies the session protocol to be used for internet
            call between local and remote router via IP backbone.
            unknown        The protocol is unknown.
            h323           The protocol is H323.
            sip            The protocol is session initiation."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 8 }

hpnicfVoVoIPCallHistoryCoderType OBJECT-TYPE
        SYNTAX      HpnicfCodecType
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The negotiated coder type.  It specifies the encode type to the
            VoIP leg of a call."
        ::= { hpnicfVoiceVoIPCallHistoryEntry 9 }

END


