A class for performing SNMP V2 queries on Asterisk

see |
copyright | Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
author | Barry O'Donovan

### Methods

## Returns the number of calls currently active on the Asterisk PBX.

    callsActive() : int

> The number of calls currently active on the Asterisk PBX.

### Returns

`int`The number of calls currently active on the Asterisk PBX.

## Returns the total number of calls processed through the Asterisk PBX since last restart.

    callsProcessed() : int

> The total number of calls processed through the Asterisk PBX since last restart.

### Returns

`int`The total number of calls processed through the Asterisk PBX since last restart.

## Returns the path for the control socket for giving Asterisk commands

    controlSocket() : string

> The control socket for giving Asterisk commands.

### Returns

`string`The control socket for giving Asterisk commands

## Get the SNMP instance

    getSNMP() : \OSS_SNMP\SNMP

### Returns

`\OSS_SNMP\SNMP`Instance of the SNMP object

## Returns the number of modules currently loaded into Asterisk.

    modules() : int

> Number of modules currently loaded into Asterisk.

### Returns

`int`The number of modules currently loaded into Asterisk

## Returns the process ID of the Asterisk instance

    pid() : int

> The process id of the running Asterisk process.

### Returns

`int`The process ID of the Asterisk instance

## Returns the time ticks (100th sec) since the Asterisk config was reload

    reloadTime() : int

> Time ticks since Asterisk was last reloaded.

### Returns

`int`Time ticks since the Asterisk config was reload

## Set the SNMP instance

    setSNMP(\OSS_SNMP\SNMP $snmp) : \OSS_SNMP\MIB

### Parameters

#### $snmp

`\OSS_SNMP\SNMP`

the SNMP instance

### Returns

`\OSS_SNMP\MIB`An instance of this class for fluent interfaces

## Returns the Subversion (SVN) revision of Asterisk

    tag() : int

> SubVersion revision of the version of Asterisk that > the SNMP Agent was compiled to run against -- this is > typically 0 for release-versions of Asterisk.

### Returns

`int`The SVN revision of Asterisk

## Returns the time ticks (100th sec) since Asterisk was started

    uptime() : int

> Time ticks since Asterisk was started.

### Returns

`int`Time ticks since Asterisk was started

## Returns the version of Asterisk

    version() : string

> Text version string of the version of Asterisk that > the SNMP Agent was compiled to run against.

### Returns

`string`The version of Asterisk

### Properties

## Instance for the SNMP object

    $_snmp

### Default

`null`

### Constants

## OID_ASTERISK_CALLS_ACTIVE

    OID_ASTERISK_CALLS_ACTIVE = '.1.3.6.1.4.1.22736.1.2.5.0'

## OID_ASTERISK_CALLS_PROCESSED

    OID_ASTERISK_CALLS_PROCESSED = '.1.3.6.1.4.1.22736.1.2.6.0'

## OID_ASTERISK_CONTROL_SOCKET

    OID_ASTERISK_CONTROL_SOCKET = '.1.3.6.1.4.1.22736.1.2.4.0'

## OID_ASTERISK_MODULES

    OID_ASTERISK_MODULES = '.1.3.6.1.4.1.22736.1.3.1.0'

## OID_ASTERISK_PID

    OID_ASTERISK_PID = '.1.3.6.1.4.1.22736.1.2.3.0'

## OID_ASTERISK_RELOAD_TIME

    OID_ASTERISK_RELOAD_TIME = '.1.3.6.1.4.1.22736.1.2.2.0'

## OID_ASTERISK_UP_TIME

    OID_ASTERISK_UP_TIME = '.1.3.6.1.4.1.22736.1.2.1.0'

## OID_ASTERISK_VERSION_STRING

    OID_ASTERISK_VERSION_STRING = '.1.3.6.1.4.1.22736.1.1.1.0'

## OID_ASTERISK_VERSION_TAG

    OID_ASTERISK_VERSION_TAG = '.1.3.6.1.4.1.22736.1.1.2.0'