
-- FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
-- Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
--
-- Version: MPL 1.1
--
-- The contents of this file are subject to the Mozilla Public License Version
-- 1.1 (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at
-- http://www.mozilla.org/MPL/
--
-- Software distributed under the License is distributed on an "AS IS" basis,
-- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-- for the specific language governing rights and limitations under the
-- License.
--
-- The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
--
-- The Initial Developer of the Original Code is
-- Anthony Minessale II <anthm@freeswitch.org>
-- Portions created by the Initial Developer are Copyright (C)
-- the Initial Developer. All Rights Reserved.
-- Portions created by Seventh Signal Ltd. & Co. KG and its employees are Copyright (C)
-- Seventh Signal Ltd. & Co. KG, All Rights Reserverd.
--
-- Contributor(s):
-- Daniel Swarbrick <daniel.swarbrick@gmail.com>
-- Stefan Knoblich <s.knoblich@axsentis.de>
-- 
-- MIB Definition for mod_snmp

FREESWITCH-MIB DEFINITIONS ::= BEGIN

IMPORTS
    OBJECT-TYPE, MODULE-IDENTITY,
    Integer32, Gauge32, Counter32, Counter64, TimeTicks,
    enterprises
        FROM SNMPv2-SMI

    DisplayString, DateAndTime
        FROM SNMPv2-TC

    InetAddressType, InetAddress
        FROM INET-ADDRESS-MIB
;


freeswitch MODULE-IDENTITY
    LAST-UPDATED    "201101170000Z"
    ORGANIZATION    "www.freeswitch.org"
    CONTACT-INFO
        "Primary contact: Anthony Minessale II
         Email: anthm@freeswitch.org"
    DESCRIPTION
        "This file defines the private FreeSWITCH SNMP MIB extensions."
    REVISION        "201101170000Z"
    DESCRIPTION
        "First draft by daniel.swarbrick@gmail.com"
    ::= { enterprises 27880 }


core        OBJECT IDENTIFIER ::= { freeswitch 1 }
mod-sofia   OBJECT IDENTIFIER ::= { freeswitch 1001 }
mod-skinny  OBJECT IDENTIFIER ::= { freeswitch 1002 }


identity    OBJECT IDENTIFIER ::= { core 1 }

versionString OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "FreeSWITCH version as a string"
    ::= { identity 1 } 

uuid OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "FreeSWITCH core UUID"
    ::= { identity 2 } 


systemStats OBJECT IDENTIFIER ::= { core 2 }

uptime OBJECT-TYPE
    SYNTAX      TimeTicks
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "FreeSWITCH process uptime in hundredths of seconds"
    ::= { systemStats 1 }

sessionsSinceStartup OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Number of sessions since FreeSWITCH process was started"
    ::= { systemStats 2 }

currentSessions OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Currently active sessions"
    ::= { systemStats 3 }

maxSessions OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Maximum permissible active sessions"
    ::= { systemStats 4 }

currentCalls OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Currently active calls"
    ::= { systemStats 5 }

sessionsPerSecond OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Current sessions per second"
    ::= { systemStats 6 }

maxSessionsPerSecond OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Maximum permissible sessions per second"
    ::= { systemStats 7 }

peakSessionsPerSecond OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Peak sessions per second"
    ::= { systemStats 8 }

peakSessionsPerSecondFiveMin OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Peak sessions per second last 5 minutes"
    ::= { systemStats 9 }

peakSessions OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Peak sessions"
    ::= { systemStats 10 }

peakSessionsFiveMin OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Peak sessions last 5 minutes"
    ::= { systemStats 11 }

ChannelEntry ::= SEQUENCE {
    chanIndex           Integer32,
    chanUUID            DisplayString,
    chanDirection       DisplayString,
    chanCreated         DateAndTime,
    chanName            DisplayString,
    chanState           DisplayString,
    chanCIDName         DisplayString,
    chanCIDNum          DisplayString,
    chanInetAddressType InetAddressType,
    chanInetAddress     InetAddress,
    chanDest            DisplayString,
    chanApplication     DisplayString,
    chanAppData         DisplayString,
    chanDialplan        DisplayString,
    chanContext         DisplayString,
    chanReadCodec       DisplayString,
    chanReadRate        Gauge32,
    chanReadBitRate     Gauge32,
    chanWriteCodec      DisplayString,
    chanWriteRate       Gauge32,
    chanWriteBitRate    Gauge32
}

channelList OBJECT-TYPE
    SYNTAX      SEQUENCE OF ChannelEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table containing a list of active channels"
    ::= { core 9 }

channelEntry OBJECT-TYPE
    SYNTAX      ChannelEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A channel entry"
    INDEX { chanIndex }
    ::= { channelList 1 }

chanIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel SNMP index."
    ::= { channelEntry 1 }

chanUUID OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel UUID."
    ::= { channelEntry 2 }

chanDirection OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel direction."
    ::= { channelEntry 3 }

chanCreated OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel creation timestamp."
    ::= { channelEntry 4 }

chanName OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel name."
    ::= { channelEntry 5 }

chanState OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel state."
    ::= { channelEntry 6 }

chanCIDName OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel caller ID name."
    ::= { channelEntry 7 }

chanCIDNum OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel caller ID number."
    ::= { channelEntry 8 }

chanInetAddressType OBJECT-TYPE
    SYNTAX      InetAddressType
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel originator's IP address type (IPv4 or IPv6)."
    ::= { channelEntry 9 }

chanInetAddress OBJECT-TYPE
    SYNTAX      InetAddress
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel originator's IP address."
    ::= { channelEntry 10 }

chanDest OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel destination."
    ::= { channelEntry 11 }

chanApplication OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel application."
    ::= { channelEntry 12 }

chanAppData OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel application data."
    ::= { channelEntry 13 }

chanDialplan OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel dialplan."
    ::= { channelEntry 14 }

chanContext OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel dialplan context."
    ::= { channelEntry 15 }

chanReadCodec OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel read codec."
    ::= { channelEntry 16 }

chanReadRate OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel read samples per second."
    ::= { channelEntry 17 }

chanReadBitRate OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel read bits per second."
    ::= { channelEntry 18 }

chanWriteCodec OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel write codec."
    ::= { channelEntry 19 }

chanWriteRate OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel write samples per second."
    ::= { channelEntry 20 }

chanWriteBitRate OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Channel write bits per second."
    ::= { channelEntry 21 }

END
