Pārlūkot izejas kodu

Indevelopment Asterisk MIBs

Barry O'Donovan 13 gadi atpakaļ
vecāks
revīzija
81dac82f29

+ 173 - 0
OSS/SNMP/MIBS/Asterisk.php

@@ -0,0 +1,173 @@
+<?php
+
+/*
+    Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+    All rights reserved.
+
+    Contact: Barry O'Donovan - barry (at) opensolutions (dot) ie
+             http://www.opensolutions.ie/
+
+    This file is part of the OSS_SNMP package.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above copyright
+          notice, this list of conditions and the following disclaimer in the
+          documentation and/or other materials provided with the distribution.
+        * Neither the name of Open Source Solutions Limited nor the
+          names of its contributors may be used to endorse or promote products
+          derived from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+namespace OSS\SNMP\MIBS;
+
+/**
+ * A class for performing SNMP V2 queries on Asterisk
+ *
+ * @see https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions
+ * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+ * @author Barry O'Donovan <barry@opensolutions.ie>
+ */
+class Asterisk extends \OSS\SNMP\MIB
+{
+
+    const OID_ASTERISK_VERSION_STRING = '.1.3.6.1.4.1.22736.1.1.1.0';
+    const OID_ASTERISK_VERSION_TAG    = '.1.3.6.1.4.1.22736.1.1.2.0';
+    
+    const OID_ASTERISK_UP_TIME         = '.1.3.6.1.4.1.22736.1.2.1.0';
+    const OID_ASTERISK_RELOAD_TIME     = '.1.3.6.1.4.1.22736.1.2.2.0';
+    const OID_ASTERISK_PID             = '.1.3.6.1.4.1.22736.1.2.3.0';
+    const OID_ASTERISK_CONTROL_SOCKET  = '.1.3.6.1.4.1.22736.1.2.4.0';
+    const OID_ASTERISK_CALLS_ACTIVE    = '.1.3.6.1.4.1.22736.1.2.5.0';
+    const OID_ASTERISK_CALLS_PROCESSED = '.1.3.6.1.4.1.22736.1.2.6.0';
+
+    const OID_ASTERISK_MODULES         = '.1.3.6.1.4.1.22736.1.3.1.0';
+    
+    /**
+     * Returns the version of Asterisk
+     *
+     * > Text version string of the version of Asterisk that
+	 * > the SNMP Agent was compiled to run against.
+     *
+     * @return string The version of Asterisk
+     */
+    public function version()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_VERSION_STRING );
+    }
+    
+    /**
+     * Returns the Subversion (SVN) revision of Asterisk
+     *
+     * > 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.
+     *
+     * @return int The SVN revision of Asterisk
+     */
+    public function tag()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_VERSION_TAG );
+    }
+    
+    /**
+     * Returns the time ticks (100th sec) since Asterisk was started
+     *
+     * > Time ticks since Asterisk was started.
+     *
+     * @return int Time ticks since Asterisk was started
+     */
+    public function uptime()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_UP_TIME );
+    }
+    
+    /**
+     * Returns the time ticks (100th sec) since the Asterisk config was reload
+     *
+     * > Time ticks since Asterisk was last reloaded.
+     *
+     * @return int Time ticks since the Asterisk config was reload
+     */
+    public function reloadTime()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_RELOAD_TIME );
+    }
+    
+    /**
+     * Returns the process ID of the Asterisk instance
+     *
+     * > The process id of the running Asterisk process.
+     *
+     * @return int The process ID of the Asterisk instance
+     */
+    public function pid()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_PID );
+    }
+    
+    /**
+     * Returns the path for the control socket for giving Asterisk commands
+     *
+     * > The control socket for giving Asterisk commands.
+     *
+     * @return string The control socket for giving Asterisk commands
+     */
+    public function controlSocket()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_CONTROL_SOCKET );
+    }
+    
+    /**
+     * Returns the number of calls currently active on the Asterisk PBX.
+     *
+     * > The number of calls currently active on the Asterisk PBX.
+     *
+     * @return int The number of calls currently active on the Asterisk PBX.
+     */
+    public function callsActive()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_CALLS_ACTIVE );
+    }
+    
+    /**
+     * Returns the total number of calls processed through the Asterisk PBX since last restart.
+     *
+     * > The total number of calls processed through the Asterisk PBX since last restart.
+     *
+     * @return int The total number of calls processed through the Asterisk PBX since last restart.
+     */
+    public function callsProcessed()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_CALLS_PROCESSED );
+    }
+    
+    /**
+     * Returns the number of modules currently loaded into Asterisk.
+     *
+     * > Number of modules currently loaded into Asterisk.
+     *
+     * @return int The number of modules currently loaded into Asterisk
+     */
+    public function modules()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_MODULES );
+    }
+    
+    
+    
+}

+ 223 - 0
OSS/SNMP/MIBS/Asterisk/Channels.php

@@ -0,0 +1,223 @@
+<?php
+
+/*
+    Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+    All rights reserved.
+
+    Contact: Barry O'Donovan - barry (at) opensolutions (dot) ie
+             http://www.opensolutions.ie/
+
+    This file is part of the OSS_SNMP package.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above copyright
+          notice, this list of conditions and the following disclaimer in the
+          documentation and/or other materials provided with the distribution.
+        * Neither the name of Open Source Solutions Limited nor the
+          names of its contributors may be used to endorse or promote products
+          derived from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+namespace OSS\SNMP\MIBS\Asterisk;
+
+/**
+ * A class for performing SNMP V2 queries on Asterisk
+ *
+ * @see https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions
+ * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+ * @author Barry O'Donovan <barry@opensolutions.ie>
+ */
+class Channels extends \OSS\SNMP\MIB
+{
+
+    const OID_ASTERISK_CHANNELS_ACTIVE      = '.1.3.6.1.4.1.22736.1.5.1.0';
+    
+    const OID_ASTERISK_CHANNELS_SUPPORTED   = '.1.3.6.1.4.1.22736.1.5.3.0';
+
+    const OID_ASTERISK_CHANNEL_TYPE_NAME        = '.1.3.6.1.4.1.22736.1.5.4.1.2';
+    const OID_ASTERISK_CHANNEL_TYPE_DESCRIPTION = '.1.3.6.1.4.1.22736.1.5.4.1.3';
+    const OID_ASTERISK_CHANNEL_TYPE_STATE       = '.1.3.6.1.4.1.22736.1.5.4.1.4';
+    const OID_ASTERISK_CHANNEL_TYPE_INDICATION  = '.1.3.6.1.4.1.22736.1.5.4.1.5';
+    const OID_ASTERISK_CHANNEL_TYPE_TRANSFER    = '.1.3.6.1.4.1.22736.1.5.4.1.6';
+    const OID_ASTERISK_CHANNEL_TYPE_CHANNELS    = '.1.3.6.1.4.1.22736.1.5.4.1.7';
+    
+    const OID_ASTERISK_CHANNELS_BRIDGED     = '.1.3.6.1.4.1.22736.1.5.5.1.0';
+    
+    /**
+     * Returns the current number of active channels.
+     *
+     * > Current number of active channels.
+     *
+     * @return int The current number of active channels.
+     */
+    public function active()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_CHANNELS_ACTIVE );
+    }
+    
+    
+    /**
+     * Returns the number of channel types (technologies) supported.
+     *
+     * > Number of channel types (technologies) supported.
+     *
+     * @return int The number of channel types (technologies) supported.
+     */
+    public function supported()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_CHANNELS_SUPPORTED );
+    }
+    
+    
+    /**
+     * Array of supported channel type names
+     *
+     * > Unique name of the technology we are describing.
+     *
+     * @return array Supported channel type names
+     */
+    public function names()
+    {
+        return $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_NAME );
+    }
+    
+    /**
+     * Array of supported channel type descriptions
+     *
+     * > Description of the channel type (technology).
+     *
+     * @return array Supported channel type descriptions
+     */
+    public function descriptions()
+    {
+        return $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_DESCRIPTION );
+    }
+    
+    /**
+     * Array of supported channel type device state capability
+     *
+     * > Whether the current technology can hold device states.
+     *
+     * @return array Whether the current technology can hold device states.
+     */
+    public function deviceStates()
+    {
+        return $this->getSNMP()->ppTruthValue( $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_STATE ) );
+    }
+    
+    /**
+     * Array of supported channel type progress indication capability
+     *
+     * > Whether the current technology supports progress indication.
+     *
+     * @return array Whether the current technology supports progress indication.
+     */
+    public function progressIndications()
+    {
+        return $this->getSNMP()->ppTruthValue( $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_INDICATION ) );
+    }
+    
+    /**
+     * Array of supported channel type transfer capability
+     *
+     * > Whether the current technology supports transfers, where
+     * > Asterisk can get out from inbetween two bridged channels.
+     *
+     * @return array Whether the current technology transfers
+     */
+    public function transfers()
+    {
+        return $this->getSNMP()->ppTruthValue( $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_TRANSFER ) );
+    }
+    
+    /**
+     * Array of active calls on supported channels
+     *
+     * > Number of active channels using the current technology.
+     *
+     * @return array Active calls on supported channels
+     */
+    public function activeCalls()
+    {
+        return $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_TYPE_CHANNELS );
+    }
+    
+    /**
+     * Number of channels currently in a bridged state.
+     *
+     * > Number of channels currently in a bridged state.
+     *
+     * @return int Array of active calls on supported channels
+     */
+    public function bridged()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_CHANNELS_BRIDGED );
+    }
+    
+    /**
+     * Utility function to gather channel details together in an associative array.
+     *
+     * Returns an array of support channel types. For example:
+     *
+     *     Array
+     *     (
+     *         ....
+     *         [SIP] => Array
+     *             (
+     *                 [name] => SIP
+     *                 [index] => 5
+     *                 [description] => Session Initiation Protocol (SIP)
+     *                 [hasDeviceState] => 1
+     *                 [hasProgressIndications] => 1
+     *                 [canTransfer] => 1
+     *                 [activeCalls] => 0
+     *             )
+     *         ....
+     *     )
+     *
+     * If you chose to index by SNMP table entries, the above element would be indexed with `5` rather than `SIP`.
+     *
+     * @param bool $useIndex If true, the array is indexed using the SNMP table index rather than the unique channel type name
+     * @return array Channel details as an associative array
+     */
+    public function details( $useIndex = false )
+    {
+        $details = [];
+        
+        foreach( $this->names() as $index => $name )
+        {
+            if( $useIndex )
+                $idx = $index;
+            else
+                $idx = $name;
+            
+            $details[ $idx ]['name']                   = $name;
+            $details[ $idx ]['index']                  = $index;
+            $details[ $idx ]['description']            = $this->descriptions()[$index];
+            $details[ $idx ]['hasDeviceState']         = $this->deviceStates()[$index];
+            $details[ $idx ]['hasProgressIndications'] = $this->progressIndications()[$index];
+            $details[ $idx ]['canTransfer']            = $this->transfers()[$index];
+            $details[ $idx ]['activeCalls']            = $this->activeCalls()[$index];
+        }
+        
+        return $details;
+    }
+    
+    
+    
+}

+ 109 - 0
OSS/SNMP/MIBS/Asterisk/Indications.php

@@ -0,0 +1,109 @@
+<?php
+
+/*
+    Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+    All rights reserved.
+
+    Contact: Barry O'Donovan - barry (at) opensolutions (dot) ie
+             http://www.opensolutions.ie/
+
+    This file is part of the OSS_SNMP package.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above copyright
+          notice, this list of conditions and the following disclaimer in the
+          documentation and/or other materials provided with the distribution.
+        * Neither the name of Open Source Solutions Limited nor the
+          names of its contributors may be used to endorse or promote products
+          derived from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+namespace OSS\SNMP\MIBS\Asterisk;
+
+/**
+ * A class for performing SNMP V2 queries on Asterisk
+ *
+ * @see https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions
+ * @copyright Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+ * @author Barry O'Donovan <barry@opensolutions.ie>
+ */
+class Indications extends \OSS\SNMP\MIB
+{
+
+    const OID_ASTERISK_INDICATIONS_COUNT   = '.1.3.6.1.4.1.22736.1.4.1.0';
+    
+    const OID_ASTERISK_DEFAULT_INDICATION  = '.1.3.6.1.4.1.22736.1.4.2.0';
+    
+    const OID_ASTERISK_INDICATIONS_COUNTRY     = '.1.3.6.1.4.1.22736.1.4.3.1.2';
+    const OID_ASTERISK_INDICATIONS_DESCRIPTION = '.1.3.6.1.4.1.22736.1.4.3.1.4';
+    
+    /**
+     * Returns the number of indications defined in Asterisk
+     *
+     * > Number of indications currently defined in Asterisk.
+     *
+     * @return int The number of indications defined in Asterisk
+     */
+    public function number()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_INDICATIONS_COUNT );
+    }
+    
+    
+    /**
+     * Returns the default indication zone to use.
+     *
+     * > Default indication zone to use.
+     *
+     * @return string The default indication zone to use
+     */
+    public function defaultZone()
+    {
+        return $this->getSNMP()->get( self::OID_ASTERISK_DEFAULT_INDICATION );
+    }
+    
+    /**
+     * Returns an array of ISO country codes for the defined indications zones (indexed by SNMP table entry)
+     *
+     * > Country for which the indication zone is valid,
+     * > typically this is the ISO 2-letter code of the country.
+     *
+     * @return array An array of ISO country codes for the defined indications zones (indexed by SNMP table entry)
+     */
+    public function countryCodes()
+    {
+        return $this->getSNMP()->walk1d( self::OID_ASTERISK_INDICATIONS_COUNTRY );
+    }
+    
+    /**
+     * Returns an array of indications zone descriptions (indexed by SNMP table entry)
+     *
+     * > Description of the indication zone, usually the full
+     * > name of the country it is valid for.
+     *
+     * @return array An array of indications zone descriptions
+     */
+    public function descriptions()
+    {
+        return $this->getSNMP()->walk1d( self::OID_ASTERISK_INDICATIONS_DESCRIPTION );
+    }
+    
+    
+    
+    
+}

+ 134 - 0
examples/asterisk.php

@@ -0,0 +1,134 @@
+#! /usr/bin/php
+<?php
+
+/*
+    Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+    All rights reserved.
+    
+    Contact: Barry O'Donovan - barry (at) opensolutions (dot) ie
+    http://www.opensolutions.ie/
+    
+    This file is part of the OSS_SNMP package.
+    
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+    
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+    * Neither the name of Open Source Solutions Limited nor the
+    names of its contributors may be used to endorse or promote products
+    derived from this software without specific prior written permission.
+    
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// This is an example script for OSS_SNMP Asterisk MIBs
+//
+// It needs to be called with a hostname / IP address and a community string
+
+if( count( $argv ) != 3 )
+{
+    echo <<< HELPTEXT
+
+OSS_SNMP - A PHP SNMP library for people who hate SNMP MIBs and OIDs!
+Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland
+All rights reserved.
+
+See: https://github.com/opensolutions/OSS_SNMP/
+
+This is an example script to show how to use OSS_SNMP. It requires two arguments:
+
+ - the IP address of hostname of a SNMP capable host (with Asterisk SNMP enabled)
+ - the SNMP v2 community string for that host
+ 
+For example:
+
+    {$argv[0]} 192.168.10.20 public
+
+
+HELPTEXT;
+
+    exit( 1 );
+}
+
+require_once( dirname( __FILE__ ) . '/../OSS/SNMP.php' );
+
+$host = new \OSS\SNMP( $argv[1], $argv[2] );
+
+echo "\n\n";
+
+echo "Asterisk version running on {$argv[1]}: " . $host->useAsterisk()->version() . "\n";
+echo "Asterisk SVN tag running on {$argv[1]}: " . $host->useAsterisk()->tag() . "\n";
+echo "Asterisk on {$argv[1]} up for: " . ( $host->useAsterisk()->uptime() / 100 / 60 / 60 ) . " hours\n";
+echo "Asterisk on {$argv[1]} reloaded: " . ( $host->useAsterisk()->reloadTime() / 100 / 60 / 60 ) . " hours ago\n";
+echo "Asterisk PID: " . $host->useAsterisk()->pid() . "\n";
+echo "Asterisk control socket: " . $host->useAsterisk()->controlSocket() . "\n";
+echo "Calls active: " . $host->useAsterisk()->callsActive() . "\n";
+echo "Calls processed: " . $host->useAsterisk()->callsProcessed() . "\n";
+echo "Modules compiled in: " . $host->useAsterisk()->modules() . "\n";
+
+echo "\n\n";
+
+echo "Indications defined: " . $host->useAsterisk_Indications()->number() . "\n";
+echo "Default indications zone: " . $host->useAsterisk_Indications()->defaultZone() . "\n";
+
+echo "Indication country codes:\n\n";
+print_r(  $host->useAsterisk_Indications()->countryCodes() );
+echo "\n\n";
+
+echo "Indication descriptions:\n\n";
+print_r(  $host->useAsterisk_Indications()->descriptions() );
+echo "\n\n";
+
+echo "Channels active: " . $host->useAsterisk_Channels()->active() . "\n";
+echo "Channels supported: " . $host->useAsterisk_Channels()->supported() . "\n";
+
+/*
+echo "Channel type names:\n\n";
+print_r(  $host->useAsterisk_Channels()->names() );
+echo "\n\n";
+
+echo "Channel type descriptions:\n\n";
+print_r(  $host->useAsterisk_Channels()->descriptions() );
+echo "\n\n";
+
+echo "Channel type device state capability:\n\n";
+print_r(  $host->useAsterisk_Channels()->deviceStates() );
+echo "\n\n";
+
+echo "Channel type progress indication capability:\n\n";
+print_r(  $host->useAsterisk_Channels()->progressIndications() );
+echo "\n\n";
+
+echo "Channel type transfer capability:\n\n";
+print_r(  $host->useAsterisk_Channels()->transfers() );
+echo "\n\n";
+
+echo "Active calls on supported channel types:\n\n";
+print_r(  $host->useAsterisk_Channels()->activeCalls() );
+echo "\n\n";
+*/
+
+echo "Supported channel details:\n\n";
+print_r(  $host->useAsterisk_Channels()->details() );
+echo "\n\n";
+
+echo "Channels bridged: " . $host->useAsterisk_Channels()->bridged() . "\n";
+
+
+echo "\n\n";
+
+exit( 0 );
+