Centreon Asterisk : Différence entre versions
(Page créée avec « Retour == Serveur VoIP Asterisk == === Conditions préalables === ==== Centreon Plugin ==== Installez ce plugin sur chaque poller nécessaire : yum install… ») |
|||
(5 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 14 : | Ligne 14 : | ||
* Installez le démon snmpd . | * Installez le démon snmpd . | ||
yum -y install net-snmp net-snmp-utils | yum -y install net-snmp net-snmp-utils | ||
+ | |||
+ | * Demarrer le service | ||
+ | systemctl enable snmpd | ||
+ | service snmpd start | ||
* Modifiez le fichier nano /etc/asterisk/vitalpbx/modules__20-noload.conf en commentant la ligne contenant res_snmp.so: | * Modifiez le fichier nano /etc/asterisk/vitalpbx/modules__20-noload.conf en commentant la ligne contenant res_snmp.so: | ||
Ligne 49 : | Ligne 53 : | ||
− | * Téléchargez les 2 fichiers suivants et placez-les dans /usr/share/snmp/mibs | + | * Téléchargez les 2 fichiers suivants et placez-les dans /usr/share/snmp/mibs: |
− | + | https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions | |
− | + | ||
+ | nano /usr/share/snmp/mibs/Asterisk+MIB+Definitions.txt | ||
+ | |||
+ | <nowiki>ASTERISK-MIB DEFINITIONS ::= BEGIN | ||
+ | |||
+ | IMPORTS | ||
+ | OBJECT-TYPE, MODULE-IDENTITY, Integer32, Counter32, TimeTicks, | ||
+ | Unsigned32, Gauge32 | ||
+ | FROM SNMPv2-SMI | ||
+ | |||
+ | TEXTUAL-CONVENTION, DisplayString, TruthValue | ||
+ | FROM SNMPv2-TC | ||
+ | |||
+ | digium | ||
+ | FROM DIGIUM-MIB; | ||
+ | |||
+ | asterisk MODULE-IDENTITY | ||
+ | LAST-UPDATED "200806202025Z" | ||
+ | ORGANIZATION "Digium, Inc." | ||
+ | CONTACT-INFO | ||
+ | "Mark A. Spencer | ||
+ | Postal: Digium, Inc. | ||
+ | 445 Jan Davis Drive | ||
+ | Huntsville, AL 35806 | ||
+ | USA | ||
+ | Tel: +1 256 428 6000 | ||
+ | Email: markster@digium.com | ||
+ | |||
+ | Thorsten Lockert | ||
+ | Postal: Voop AS | ||
+ | Boehmergaten 42 | ||
+ | NO-5057 Bergen | ||
+ | Norway | ||
+ | Tel: +47 5598 7200 | ||
+ | Email: tholo@voop.no" | ||
+ | DESCRIPTION | ||
+ | "Asterisk is an Open Source PBX. This MIB defined | ||
+ | objects for managing Asterisk instances." | ||
+ | REVISION "200806202025Z" | ||
+ | DESCRIPTION | ||
+ | "smilint police -- | ||
+ | Add missing imports; fix initial capitalization | ||
+ | of enumeration elements; add missing range | ||
+ | restrictions for Integer32 indices, correct | ||
+ | spelling of astChanCidANI in its definition. | ||
+ | Addresses bug 12905. - jeffg@opennms.org" | ||
+ | REVISION "200708211450Z" | ||
+ | DESCRIPTION | ||
+ | "Add total and current call counter statistics." | ||
+ | REVISION "200603061840Z" | ||
+ | DESCRIPTION | ||
+ | "Change audio codec identification from 3kAudio to | ||
+ | Audio3k to conform better with specification. | ||
+ | |||
+ | Expand on contact information." | ||
+ | REVISION "200602041900Z" | ||
+ | DESCRIPTION | ||
+ | "Initial published revision." | ||
+ | ::= { digium 1 } | ||
+ | |||
+ | asteriskVersion OBJECT IDENTIFIER ::= { asterisk 1 } | ||
+ | asteriskConfiguration OBJECT IDENTIFIER ::= { asterisk 2 } | ||
+ | asteriskModules OBJECT IDENTIFIER ::= { asterisk 3 } | ||
+ | asteriskIndications OBJECT IDENTIFIER ::= { asterisk 4 } | ||
+ | asteriskChannels OBJECT IDENTIFIER ::= { asterisk 5 } | ||
+ | |||
+ | -- asteriskVersion | ||
+ | |||
+ | astVersionString OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Text version string of the version of Asterisk that | ||
+ | the SNMP Agent was compiled to run against." | ||
+ | ::= { asteriskVersion 1 } | ||
+ | |||
+ | astVersionTag OBJECT-TYPE | ||
+ | SYNTAX Unsigned32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "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." | ||
+ | ::= { asteriskVersion 2 } | ||
+ | |||
+ | -- asteriskConfiguration | ||
+ | |||
+ | astConfigUpTime OBJECT-TYPE | ||
+ | SYNTAX TimeTicks | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Time ticks since Asterisk was started." | ||
+ | ::= { asteriskConfiguration 1 } | ||
+ | |||
+ | astConfigReloadTime OBJECT-TYPE | ||
+ | SYNTAX TimeTicks | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Time ticks since Asterisk was last reloaded." | ||
+ | ::= { asteriskConfiguration 2 } | ||
+ | |||
+ | astConfigPid OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "The process id of the running Asterisk process." | ||
+ | ::= { asteriskConfiguration 3 } | ||
+ | |||
+ | astConfigSocket OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "The control socket for giving Asterisk commands." | ||
+ | ::= { asteriskConfiguration 4 } | ||
+ | |||
+ | astConfigCallsActive OBJECT-TYPE | ||
+ | SYNTAX Gauge32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "The number of calls currently active on the Asterisk PBX." | ||
+ | ::= { asteriskConfiguration 5 } | ||
+ | |||
+ | astConfigCallsProcessed OBJECT-TYPE | ||
+ | SYNTAX Counter32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "The total number of calls processed through the Asterisk PBX since last | ||
+ | restart." | ||
+ | ::= { asteriskConfiguration 6 } | ||
+ | |||
+ | -- asteriskModules | ||
+ | |||
+ | astNumModules OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number of modules currently loaded into Asterisk." | ||
+ | ::= { asteriskModules 1 } | ||
+ | |||
+ | -- asteriskIndications | ||
+ | |||
+ | astNumIndications OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number of indications currently defined in Asterisk." | ||
+ | ::= { asteriskIndications 1 } | ||
+ | |||
+ | astCurrentIndication OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Default indication zone to use." | ||
+ | ::= { asteriskIndications 2 } | ||
+ | |||
+ | astIndicationsTable OBJECT-TYPE | ||
+ | SYNTAX SEQUENCE OF AstIndicationsEntry | ||
+ | MAX-ACCESS not-accessible | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Table with all the indication zones currently know to | ||
+ | the running Asterisk instance." | ||
+ | ::= { asteriskIndications 3 } | ||
+ | |||
+ | astIndicationsEntry OBJECT-TYPE | ||
+ | SYNTAX AstIndicationsEntry | ||
+ | MAX-ACCESS not-accessible | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Information about a single indication zone." | ||
+ | INDEX { astIndIndex } | ||
+ | ::= { astIndicationsTable 1 } | ||
+ | |||
+ | AstIndicationsEntry ::= SEQUENCE { | ||
+ | astIndIndex Integer32, | ||
+ | astIndCountry DisplayString, | ||
+ | astIndAlias DisplayString, | ||
+ | astIndDescription DisplayString | ||
+ | } | ||
+ | |||
+ | astIndIndex OBJECT-TYPE | ||
+ | SYNTAX Integer32 (1 .. 2147483647) | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Numerical index into the table of indication zones." | ||
+ | ::= { astIndicationsEntry 1 } | ||
+ | |||
+ | astIndCountry OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Country for which the indication zone is valid, | ||
+ | typically this is the ISO 2-letter code of the country." | ||
+ | ::= { astIndicationsEntry 2 } | ||
+ | |||
+ | astIndAlias OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "" | ||
+ | ::= { astIndicationsEntry 3 } | ||
+ | |||
+ | astIndDescription OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Description of the indication zone, usually the full | ||
+ | name of the country it is valid for." | ||
+ | ::= { astIndicationsEntry 4 } | ||
+ | |||
+ | -- asteriskChannels | ||
+ | |||
+ | astNumChannels OBJECT-TYPE | ||
+ | SYNTAX Gauge32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current number of active channels." | ||
+ | ::= { asteriskChannels 1 } | ||
+ | |||
+ | astChanTable OBJECT-TYPE | ||
+ | SYNTAX SEQUENCE OF AstChanEntry | ||
+ | MAX-ACCESS not-accessible | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Table with details of the currently active channels | ||
+ | in the Asterisk instance." | ||
+ | ::= { asteriskChannels 2 } | ||
+ | |||
+ | astChanEntry OBJECT-TYPE | ||
+ | SYNTAX AstChanEntry | ||
+ | MAX-ACCESS not-accessible | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Details of a single channel." | ||
+ | INDEX { astChanIndex } | ||
+ | ::= { astChanTable 1 } | ||
+ | |||
+ | AstChanEntry ::= SEQUENCE { | ||
+ | astChanIndex Integer32, | ||
+ | astChanName DisplayString, | ||
+ | astChanLanguage DisplayString, | ||
+ | astChanType DisplayString, | ||
+ | astChanMusicClass DisplayString, | ||
+ | astChanBridge DisplayString, | ||
+ | astChanMasq DisplayString, | ||
+ | astChanMasqr DisplayString, | ||
+ | astChanWhenHangup TimeTicks, | ||
+ | astChanApp DisplayString, | ||
+ | astChanData DisplayString, | ||
+ | astChanContext DisplayString, | ||
+ | astChanMacroContext DisplayString, | ||
+ | astChanMacroExten DisplayString, | ||
+ | astChanMacroPri Integer32, | ||
+ | astChanExten DisplayString, | ||
+ | astChanPri Integer32, | ||
+ | astChanAccountCode DisplayString, | ||
+ | astChanForwardTo DisplayString, | ||
+ | astChanUniqueId DisplayString, | ||
+ | astChanCallGroup Unsigned32, | ||
+ | astChanPickupGroup Unsigned32, | ||
+ | astChanState INTEGER, | ||
+ | astChanMuted TruthValue, | ||
+ | astChanRings Integer32, | ||
+ | astChanCidDNID DisplayString, | ||
+ | astChanCidNum DisplayString, | ||
+ | astChanCidName DisplayString, | ||
+ | astChanCidANI DisplayString, | ||
+ | astChanCidRDNIS DisplayString, | ||
+ | astChanCidPresentation DisplayString, | ||
+ | astChanCidANI2 Integer32, | ||
+ | astChanCidTON Integer32, | ||
+ | astChanCidTNS Integer32, | ||
+ | astChanAMAFlags INTEGER, | ||
+ | astChanADSI INTEGER, | ||
+ | astChanToneZone DisplayString, | ||
+ | astChanHangupCause INTEGER, | ||
+ | astChanVariables DisplayString, | ||
+ | astChanFlags BITS, | ||
+ | astChanTransferCap INTEGER | ||
+ | } | ||
+ | |||
+ | astChanIndex OBJECT-TYPE | ||
+ | SYNTAX Integer32 (1 .. 2147483647) | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Index into the channel table." | ||
+ | ::= { astChanEntry 1 } | ||
+ | |||
+ | astChanName OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Name of the current channel." | ||
+ | ::= { astChanEntry 2 } | ||
+ | |||
+ | astChanLanguage OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Which language the current channel is configured to | ||
+ | use -- used mainly for prompts." | ||
+ | ::= { astChanEntry 3 } | ||
+ | |||
+ | astChanType OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Underlying technology for the current channel." | ||
+ | ::= { astChanEntry 4 } | ||
+ | |||
+ | astChanMusicClass OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Music class to be used for Music on Hold for this | ||
+ | channel." | ||
+ | ::= { astChanEntry 5 } | ||
+ | |||
+ | astChanBridge OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Which channel this channel is currently bridged (in a | ||
+ | conversation) with." | ||
+ | ::= { astChanEntry 6 } | ||
+ | |||
+ | astChanMasq OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Channel masquerading for us." | ||
+ | ::= { astChanEntry 7 } | ||
+ | |||
+ | astChanMasqr OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Channel we are masquerading for." | ||
+ | ::= { astChanEntry 8 } | ||
+ | |||
+ | astChanWhenHangup OBJECT-TYPE | ||
+ | SYNTAX TimeTicks | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "How long until this channel will be hung up." | ||
+ | ::= { astChanEntry 9 } | ||
+ | |||
+ | astChanApp OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current application for the channel." | ||
+ | ::= { astChanEntry 10 } | ||
+ | |||
+ | astChanData OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Arguments passed to the current application." | ||
+ | ::= { astChanEntry 11 } | ||
+ | |||
+ | astChanContext OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current extension context." | ||
+ | ::= { astChanEntry 12 } | ||
+ | |||
+ | astChanMacroContext OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current macro context." | ||
+ | ::= { astChanEntry 13 } | ||
+ | |||
+ | astChanMacroExten OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current macro extension." | ||
+ | ::= { astChanEntry 14 } | ||
+ | |||
+ | astChanMacroPri OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current macro priority." | ||
+ | ::= { astChanEntry 15 } | ||
+ | |||
+ | astChanExten OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current extension." | ||
+ | ::= { astChanEntry 16 } | ||
+ | |||
+ | astChanPri OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Current priority." | ||
+ | ::= { astChanEntry 17 } | ||
+ | |||
+ | astChanAccountCode OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Account Code for billing." | ||
+ | ::= { astChanEntry 18 } | ||
+ | |||
+ | astChanForwardTo OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Where to forward to if asked to dial on this | ||
+ | interface." | ||
+ | ::= { astChanEntry 19 } | ||
+ | |||
+ | astChanUniqueId OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Unique Channel Identifier." | ||
+ | ::= { astChanEntry 20 } | ||
+ | |||
+ | astChanCallGroup OBJECT-TYPE | ||
+ | SYNTAX Unsigned32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Call Group." | ||
+ | ::= { astChanEntry 21 } | ||
+ | |||
+ | astChanPickupGroup OBJECT-TYPE | ||
+ | SYNTAX Unsigned32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Pickup Group." | ||
+ | ::= { astChanEntry 22 } | ||
+ | |||
+ | astChanState OBJECT-TYPE | ||
+ | SYNTAX INTEGER { | ||
+ | stateDown(0), | ||
+ | stateReserved(1), | ||
+ | stateOffHook(2), | ||
+ | stateDialing(3), | ||
+ | stateRing(4), | ||
+ | stateRinging(5), | ||
+ | stateUp(6), | ||
+ | stateBusy(7), | ||
+ | stateDialingOffHook(8), | ||
+ | statePreRing(9) | ||
+ | } | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Channel state." | ||
+ | ::= { astChanEntry 23 } | ||
+ | |||
+ | astChanMuted OBJECT-TYPE | ||
+ | SYNTAX TruthValue | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Transmission of voice data has been muted." | ||
+ | ::= { astChanEntry 24 } | ||
+ | |||
+ | astChanRings OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number of rings so far." | ||
+ | ::= { astChanEntry 25 } | ||
+ | |||
+ | astChanCidDNID OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Dialled Number ID." | ||
+ | ::= { astChanEntry 26 } | ||
+ | |||
+ | astChanCidNum OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Caller Number." | ||
+ | ::= { astChanEntry 27 } | ||
+ | |||
+ | astChanCidName OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Caller Name." | ||
+ | ::= { astChanEntry 28 } | ||
+ | |||
+ | astChanCidANI OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "ANI" | ||
+ | ::= { astChanEntry 29 } | ||
+ | |||
+ | astChanCidRDNIS OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Redirected Dialled Number Service." | ||
+ | ::= { astChanEntry 30 } | ||
+ | |||
+ | astChanCidPresentation OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number Presentation/Screening." | ||
+ | ::= { astChanEntry 31 } | ||
+ | |||
+ | astChanCidANI2 OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "ANI 2 (info digit)." | ||
+ | ::= { astChanEntry 32 } | ||
+ | |||
+ | astChanCidTON OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Type of Number." | ||
+ | ::= { astChanEntry 33 } | ||
+ | |||
+ | astChanCidTNS OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Transit Network Select." | ||
+ | ::= { astChanEntry 34 } | ||
+ | |||
+ | astChanAMAFlags OBJECT-TYPE | ||
+ | SYNTAX INTEGER { | ||
+ | default(0), | ||
+ | omit(1), | ||
+ | billing(2), | ||
+ | documentation(3) | ||
+ | } | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "AMA Flags." | ||
+ | ::= { astChanEntry 35 } | ||
+ | |||
+ | astChanADSI OBJECT-TYPE | ||
+ | SYNTAX INTEGER { | ||
+ | unknown(0), | ||
+ | available(1), | ||
+ | unavailable(2), | ||
+ | offHookOnly(3) | ||
+ | } | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Whether or not ADSI is detected on CPE." | ||
+ | ::= { astChanEntry 36 } | ||
+ | |||
+ | astChanToneZone OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Indication zone to use for channel." | ||
+ | ::= { astChanEntry 37 } | ||
+ | |||
+ | astChanHangupCause OBJECT-TYPE | ||
+ | SYNTAX INTEGER { | ||
+ | notDefined(0), | ||
+ | unregistered(3), | ||
+ | normal(16), | ||
+ | busy(17), | ||
+ | noAnswer(19), | ||
+ | congestion(34), | ||
+ | failure(38), | ||
+ | noSuchDriver(66) | ||
+ | } | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Why is the channel hung up." | ||
+ | ::= { astChanEntry 38 } | ||
+ | |||
+ | astChanVariables OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Channel Variables defined for this channel." | ||
+ | ::= { astChanEntry 39 } | ||
+ | |||
+ | astChanFlags OBJECT-TYPE | ||
+ | SYNTAX BITS { | ||
+ | wantsJitter(0), | ||
+ | deferDTMF(1), | ||
+ | writeInterrupt(2), | ||
+ | blocking(3), | ||
+ | zombie(4), | ||
+ | exception(5), | ||
+ | musicOnHold(6), | ||
+ | spying(7), | ||
+ | nativeBridge(8), | ||
+ | autoIncrementingLoop(9) | ||
+ | } | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Flags set on this channel." | ||
+ | ::= { astChanEntry 40 } | ||
+ | |||
+ | astChanTransferCap OBJECT-TYPE | ||
+ | SYNTAX INTEGER { | ||
+ | speech(0), | ||
+ | digital(8), | ||
+ | restrictedDigital(9), | ||
+ | audio3k(16), | ||
+ | digitalWithTones(17), | ||
+ | video(24) | ||
+ | } | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Transfer Capabilities for this channel." | ||
+ | ::= { astChanEntry 41 } | ||
+ | |||
+ | astNumChanTypes OBJECT-TYPE | ||
+ | SYNTAX Integer32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number of channel types (technologies) supported." | ||
+ | ::= { asteriskChannels 3 } | ||
+ | |||
+ | astChanTypeTable OBJECT-TYPE | ||
+ | SYNTAX SEQUENCE OF AstChanTypeEntry | ||
+ | MAX-ACCESS not-accessible | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Table with details of the supported channel types." | ||
+ | ::= { asteriskChannels 4 } | ||
+ | |||
+ | astChanTypeEntry OBJECT-TYPE | ||
+ | SYNTAX AstChanTypeEntry | ||
+ | MAX-ACCESS not-accessible | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Information about a technology we support, including | ||
+ | how many channels are currently using this technology." | ||
+ | INDEX { astChanTypeIndex } | ||
+ | ::= { astChanTypeTable 1 } | ||
+ | |||
+ | AstChanTypeEntry ::= SEQUENCE { | ||
+ | astChanTypeIndex Integer32, | ||
+ | astChanTypeName DisplayString, | ||
+ | astChanTypeDesc DisplayString, | ||
+ | astChanTypeDeviceState Integer32, | ||
+ | astChanTypeIndications Integer32, | ||
+ | astChanTypeTransfer Integer32, | ||
+ | astChanTypeChannels Gauge32 | ||
+ | } | ||
+ | |||
+ | astChanTypeIndex OBJECT-TYPE | ||
+ | SYNTAX Integer32 (1 .. 2147483647) | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Index into the table of channel types." | ||
+ | ::= { astChanTypeEntry 1 } | ||
+ | |||
+ | astChanTypeName OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Unique name of the technology we are describing." | ||
+ | ::= { astChanTypeEntry 2 } | ||
+ | |||
+ | astChanTypeDesc OBJECT-TYPE | ||
+ | SYNTAX DisplayString | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Description of the channel type (technology)." | ||
+ | ::= { astChanTypeEntry 3 } | ||
+ | |||
+ | astChanTypeDeviceState OBJECT-TYPE | ||
+ | SYNTAX TruthValue | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Whether the current technology can hold device states." | ||
+ | ::= { astChanTypeEntry 4 } | ||
+ | |||
+ | astChanTypeIndications OBJECT-TYPE | ||
+ | SYNTAX TruthValue | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Whether the current technology supports progress indication." | ||
+ | ::= { astChanTypeEntry 5 } | ||
+ | |||
+ | astChanTypeTransfer OBJECT-TYPE | ||
+ | SYNTAX TruthValue | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Whether the current technology supports transfers, where | ||
+ | Asterisk can get out from inbetween two bridged channels." | ||
+ | ::= { astChanTypeEntry 6 } | ||
+ | |||
+ | astChanTypeChannels OBJECT-TYPE | ||
+ | SYNTAX Gauge32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number of active channels using the current technology." | ||
+ | ::= { astChanTypeEntry 7 } | ||
+ | |||
+ | astChanScalars OBJECT IDENTIFIER ::= { asteriskChannels 5 } | ||
+ | |||
+ | astNumChanBridge OBJECT-TYPE | ||
+ | SYNTAX Gauge32 | ||
+ | MAX-ACCESS read-only | ||
+ | STATUS current | ||
+ | DESCRIPTION | ||
+ | "Number of channels currently in a bridged state." | ||
+ | ::= { astChanScalars 1 } | ||
+ | |||
+ | END</nowiki> | ||
+ | |||
+ | https://wiki.asterisk.org/wiki/display/AST/Digium+MIB+Definitions | ||
+ | |||
+ | nano /usr/share/snmp/mibs/Digium+MIB+Definitions.txt | ||
+ | <nowiki>DIGIUM-MIB DEFINITIONS ::= BEGIN | ||
+ | |||
+ | IMPORTS | ||
+ | enterprises, MODULE-IDENTITY | ||
+ | FROM SNMPv2-SMI; | ||
+ | |||
+ | digium MODULE-IDENTITY | ||
+ | LAST-UPDATED "200806202000Z" | ||
+ | ORGANIZATION "Digium, Inc." | ||
+ | CONTACT-INFO | ||
+ | "Mark Spencer | ||
+ | Email: markster@digium.com" | ||
+ | DESCRIPTION | ||
+ | "The Digium private-enterprise MIB" | ||
+ | REVISION "200806202000Z" | ||
+ | DESCRIPTION | ||
+ | "Corrected imports and missing revision for last update. | ||
+ | Addresses bug 12905. - jeffg@opennms.org" | ||
+ | REVISION "200602041900Z" | ||
+ | DESCRIPTION | ||
+ | "Initial revision." | ||
+ | ::= { enterprises 22736 } | ||
+ | |||
+ | END</nowiki> | ||
Redémarrez snmpd et le serveur asterisk : | Redémarrez snmpd et le serveur asterisk : | ||
− | + | service snmpd restart | |
− | + | service asterisk restart | |
− | + | ||
Voici un exemple de commande pour vérifier la fonctionnalité snmp : | Voici un exemple de commande pour vérifier la fonctionnalité snmp : | ||
Ligne 118 : | Ligne 930 : | ||
Attention : les fichiers /home/centreon/bin/asterisk_centreon.confet /home/centreon/bin/asterisk_centreon.confdoivent être exécutables et lisibles par l' utilisateur centreon | Attention : les fichiers /home/centreon/bin/asterisk_centreon.confet /home/centreon/bin/asterisk_centreon.confdoivent être exécutables et lisibles par l' utilisateur centreon | ||
+ | ===== Mode SSH ===== | ||
+ | * Serveur Tiscom Voice | ||
+ | Créer utilisateur centreon | ||
+ | useradd centreon -g root -s /bin/sh | ||
+ | |||
+ | Lui définir un mot de passe | ||
+ | passwd centreon | ||
+ | |||
+ | |||
+ | * Serveur Centreon | ||
+ | se connecter en user centreon | ||
+ | su - centreon | ||
+ | |||
+ | Envoyer sa clé ssh au serveur tiscom voice | ||
+ | <nowiki>ssh-copy-id -i ~/.ssh/id_rsa.pub 10.10.10.232 | ||
+ | |||
+ | /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/spool/centreon/.ssh/id_rsa.pub" | ||
+ | The authenticity of host '10.10.10.232 (10.10.10.232)' can't be established. | ||
+ | ECDSA key fingerprint is SHA256:9YM1mTisdUt49W0r1yVeAa3srrMHU/gnoMfw4B2X4Pc. | ||
+ | ECDSA key fingerprint is MD5:41:5e:7a:5d:d2:91:5c:55:ee:58:f8:dd:01:a2:5e:09. | ||
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed | ||
+ | /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys | ||
+ | centreon@10.10.10.232's password: | ||
+ | Entrer le mot de passe précédemment créer | ||
+ | |||
+ | Number of key(s) added: 1 | ||
+ | |||
+ | Now try logging into the machine, with: "ssh '10.10.10.232'" | ||
+ | and check to make sure that only the key(s) you wanted were added.</nowiki> | ||
+ | |||
+ | * Sur serveur tiscom voice | ||
+ | Désactiver le mot de passe de l'user centreon | ||
+ | passwd -l centreon | ||
+ | |||
+ | * Sur serveur Centreon | ||
+ | Tester la connexion ssh | ||
+ | ssh@10.10.10.232 | ||
+ | Si aucun mot de passe n'est demandé, et que vous tombé sur la console ssh Tiscom voice, c'est gagné. | ||
+ | [[Fichier:Prompt tiscomvoice.png]] | ||
[[Catégorie:VOIP]] | [[Catégorie:VOIP]] |
Version actuelle datée du 19 septembre 2021 à 13:10
Sommaire
Serveur VoIP Asterisk
Conditions préalables
Centreon Plugin
Installez ce plugin sur chaque poller nécessaire :
yum install centreon-plugin-Applications-Voip-Asterisk
Configuration du serveur Asterisk
Après vous être connecté avec le compte root à votre serveur Asterisk, vous devez effectuer les configurations suivantes.
Mode SNMP
- Installez le démon snmpd .
yum -y install net-snmp net-snmp-utils
- Demarrer le service
systemctl enable snmpd service snmpd start
- Modifiez le fichier nano /etc/asterisk/vitalpbx/modules__20-noload.conf en commentant la ligne contenant res_snmp.so:
nano /etc/asterisk/vitalpbx/modules__20-noload.conf
Exemple:
[modules] autoload=yes ... ;noload => res_snmp.so ...
- Créez le fichier /etc/asterisk/res_snmp.conf pour ajouter les paramètres suivants :
nano /etc/asterisk/res_snmp.conf
[general] subagent = yes enabled = yes
- Ajouter des paramètres à la fin de /etc/snmp/snmpd.conf :
echo -e " ############################################################################### # Custom SLM ############################################################################## # Acces to Asterisk snmp # Asterisk user createUser asteriskUser SHA "password" AES rwuser asteriskUser priv # Enable AgentX support master agentx agentXSocket /var/agentx/master # Set permissions on AgentX socket and containing # directory such that process in group 'asterisk' # will be able to connect\nagentXPerms 0660 0550 nobody asterisk" >> /etc/snmp/snmpd.conf
- Téléchargez les 2 fichiers suivants et placez-les dans /usr/share/snmp/mibs:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions
nano /usr/share/snmp/mibs/Asterisk+MIB+Definitions.txt
ASTERISK-MIB DEFINITIONS ::= BEGIN IMPORTS OBJECT-TYPE, MODULE-IDENTITY, Integer32, Counter32, TimeTicks, Unsigned32, Gauge32 FROM SNMPv2-SMI TEXTUAL-CONVENTION, DisplayString, TruthValue FROM SNMPv2-TC digium FROM DIGIUM-MIB; asterisk MODULE-IDENTITY LAST-UPDATED "200806202025Z" ORGANIZATION "Digium, Inc." CONTACT-INFO "Mark A. Spencer Postal: Digium, Inc. 445 Jan Davis Drive Huntsville, AL 35806 USA Tel: +1 256 428 6000 Email: markster@digium.com Thorsten Lockert Postal: Voop AS Boehmergaten 42 NO-5057 Bergen Norway Tel: +47 5598 7200 Email: tholo@voop.no" DESCRIPTION "Asterisk is an Open Source PBX. This MIB defined objects for managing Asterisk instances." REVISION "200806202025Z" DESCRIPTION "smilint police -- Add missing imports; fix initial capitalization of enumeration elements; add missing range restrictions for Integer32 indices, correct spelling of astChanCidANI in its definition. Addresses bug 12905. - jeffg@opennms.org" REVISION "200708211450Z" DESCRIPTION "Add total and current call counter statistics." REVISION "200603061840Z" DESCRIPTION "Change audio codec identification from 3kAudio to Audio3k to conform better with specification. Expand on contact information." REVISION "200602041900Z" DESCRIPTION "Initial published revision." ::= { digium 1 } asteriskVersion OBJECT IDENTIFIER ::= { asterisk 1 } asteriskConfiguration OBJECT IDENTIFIER ::= { asterisk 2 } asteriskModules OBJECT IDENTIFIER ::= { asterisk 3 } asteriskIndications OBJECT IDENTIFIER ::= { asterisk 4 } asteriskChannels OBJECT IDENTIFIER ::= { asterisk 5 } -- asteriskVersion astVersionString OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Text version string of the version of Asterisk that the SNMP Agent was compiled to run against." ::= { asteriskVersion 1 } astVersionTag OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only STATUS current DESCRIPTION "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." ::= { asteriskVersion 2 } -- asteriskConfiguration astConfigUpTime OBJECT-TYPE SYNTAX TimeTicks MAX-ACCESS read-only STATUS current DESCRIPTION "Time ticks since Asterisk was started." ::= { asteriskConfiguration 1 } astConfigReloadTime OBJECT-TYPE SYNTAX TimeTicks MAX-ACCESS read-only STATUS current DESCRIPTION "Time ticks since Asterisk was last reloaded." ::= { asteriskConfiguration 2 } astConfigPid OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "The process id of the running Asterisk process." ::= { asteriskConfiguration 3 } astConfigSocket OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "The control socket for giving Asterisk commands." ::= { asteriskConfiguration 4 } astConfigCallsActive OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "The number of calls currently active on the Asterisk PBX." ::= { asteriskConfiguration 5 } astConfigCallsProcessed OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of calls processed through the Asterisk PBX since last restart." ::= { asteriskConfiguration 6 } -- asteriskModules astNumModules OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Number of modules currently loaded into Asterisk." ::= { asteriskModules 1 } -- asteriskIndications astNumIndications OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Number of indications currently defined in Asterisk." ::= { asteriskIndications 1 } astCurrentIndication OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Default indication zone to use." ::= { asteriskIndications 2 } astIndicationsTable OBJECT-TYPE SYNTAX SEQUENCE OF AstIndicationsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Table with all the indication zones currently know to the running Asterisk instance." ::= { asteriskIndications 3 } astIndicationsEntry OBJECT-TYPE SYNTAX AstIndicationsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Information about a single indication zone." INDEX { astIndIndex } ::= { astIndicationsTable 1 } AstIndicationsEntry ::= SEQUENCE { astIndIndex Integer32, astIndCountry DisplayString, astIndAlias DisplayString, astIndDescription DisplayString } astIndIndex OBJECT-TYPE SYNTAX Integer32 (1 .. 2147483647) MAX-ACCESS read-only STATUS current DESCRIPTION "Numerical index into the table of indication zones." ::= { astIndicationsEntry 1 } astIndCountry OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Country for which the indication zone is valid, typically this is the ISO 2-letter code of the country." ::= { astIndicationsEntry 2 } astIndAlias OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "" ::= { astIndicationsEntry 3 } astIndDescription OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Description of the indication zone, usually the full name of the country it is valid for." ::= { astIndicationsEntry 4 } -- asteriskChannels astNumChannels OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "Current number of active channels." ::= { asteriskChannels 1 } astChanTable OBJECT-TYPE SYNTAX SEQUENCE OF AstChanEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Table with details of the currently active channels in the Asterisk instance." ::= { asteriskChannels 2 } astChanEntry OBJECT-TYPE SYNTAX AstChanEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Details of a single channel." INDEX { astChanIndex } ::= { astChanTable 1 } AstChanEntry ::= SEQUENCE { astChanIndex Integer32, astChanName DisplayString, astChanLanguage DisplayString, astChanType DisplayString, astChanMusicClass DisplayString, astChanBridge DisplayString, astChanMasq DisplayString, astChanMasqr DisplayString, astChanWhenHangup TimeTicks, astChanApp DisplayString, astChanData DisplayString, astChanContext DisplayString, astChanMacroContext DisplayString, astChanMacroExten DisplayString, astChanMacroPri Integer32, astChanExten DisplayString, astChanPri Integer32, astChanAccountCode DisplayString, astChanForwardTo DisplayString, astChanUniqueId DisplayString, astChanCallGroup Unsigned32, astChanPickupGroup Unsigned32, astChanState INTEGER, astChanMuted TruthValue, astChanRings Integer32, astChanCidDNID DisplayString, astChanCidNum DisplayString, astChanCidName DisplayString, astChanCidANI DisplayString, astChanCidRDNIS DisplayString, astChanCidPresentation DisplayString, astChanCidANI2 Integer32, astChanCidTON Integer32, astChanCidTNS Integer32, astChanAMAFlags INTEGER, astChanADSI INTEGER, astChanToneZone DisplayString, astChanHangupCause INTEGER, astChanVariables DisplayString, astChanFlags BITS, astChanTransferCap INTEGER } astChanIndex OBJECT-TYPE SYNTAX Integer32 (1 .. 2147483647) MAX-ACCESS read-only STATUS current DESCRIPTION "Index into the channel table." ::= { astChanEntry 1 } astChanName OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Name of the current channel." ::= { astChanEntry 2 } astChanLanguage OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Which language the current channel is configured to use -- used mainly for prompts." ::= { astChanEntry 3 } astChanType OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Underlying technology for the current channel." ::= { astChanEntry 4 } astChanMusicClass OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Music class to be used for Music on Hold for this channel." ::= { astChanEntry 5 } astChanBridge OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Which channel this channel is currently bridged (in a conversation) with." ::= { astChanEntry 6 } astChanMasq OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Channel masquerading for us." ::= { astChanEntry 7 } astChanMasqr OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Channel we are masquerading for." ::= { astChanEntry 8 } astChanWhenHangup OBJECT-TYPE SYNTAX TimeTicks MAX-ACCESS read-only STATUS current DESCRIPTION "How long until this channel will be hung up." ::= { astChanEntry 9 } astChanApp OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Current application for the channel." ::= { astChanEntry 10 } astChanData OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Arguments passed to the current application." ::= { astChanEntry 11 } astChanContext OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Current extension context." ::= { astChanEntry 12 } astChanMacroContext OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Current macro context." ::= { astChanEntry 13 } astChanMacroExten OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Current macro extension." ::= { astChanEntry 14 } astChanMacroPri OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Current macro priority." ::= { astChanEntry 15 } astChanExten OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Current extension." ::= { astChanEntry 16 } astChanPri OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Current priority." ::= { astChanEntry 17 } astChanAccountCode OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Account Code for billing." ::= { astChanEntry 18 } astChanForwardTo OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Where to forward to if asked to dial on this interface." ::= { astChanEntry 19 } astChanUniqueId OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Unique Channel Identifier." ::= { astChanEntry 20 } astChanCallGroup OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only STATUS current DESCRIPTION "Call Group." ::= { astChanEntry 21 } astChanPickupGroup OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only STATUS current DESCRIPTION "Pickup Group." ::= { astChanEntry 22 } astChanState OBJECT-TYPE SYNTAX INTEGER { stateDown(0), stateReserved(1), stateOffHook(2), stateDialing(3), stateRing(4), stateRinging(5), stateUp(6), stateBusy(7), stateDialingOffHook(8), statePreRing(9) } MAX-ACCESS read-only STATUS current DESCRIPTION "Channel state." ::= { astChanEntry 23 } astChanMuted OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only STATUS current DESCRIPTION "Transmission of voice data has been muted." ::= { astChanEntry 24 } astChanRings OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Number of rings so far." ::= { astChanEntry 25 } astChanCidDNID OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Dialled Number ID." ::= { astChanEntry 26 } astChanCidNum OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Caller Number." ::= { astChanEntry 27 } astChanCidName OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Caller Name." ::= { astChanEntry 28 } astChanCidANI OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "ANI" ::= { astChanEntry 29 } astChanCidRDNIS OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Redirected Dialled Number Service." ::= { astChanEntry 30 } astChanCidPresentation OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Number Presentation/Screening." ::= { astChanEntry 31 } astChanCidANI2 OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "ANI 2 (info digit)." ::= { astChanEntry 32 } astChanCidTON OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Type of Number." ::= { astChanEntry 33 } astChanCidTNS OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Transit Network Select." ::= { astChanEntry 34 } astChanAMAFlags OBJECT-TYPE SYNTAX INTEGER { default(0), omit(1), billing(2), documentation(3) } MAX-ACCESS read-only STATUS current DESCRIPTION "AMA Flags." ::= { astChanEntry 35 } astChanADSI OBJECT-TYPE SYNTAX INTEGER { unknown(0), available(1), unavailable(2), offHookOnly(3) } MAX-ACCESS read-only STATUS current DESCRIPTION "Whether or not ADSI is detected on CPE." ::= { astChanEntry 36 } astChanToneZone OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Indication zone to use for channel." ::= { astChanEntry 37 } astChanHangupCause OBJECT-TYPE SYNTAX INTEGER { notDefined(0), unregistered(3), normal(16), busy(17), noAnswer(19), congestion(34), failure(38), noSuchDriver(66) } MAX-ACCESS read-only STATUS current DESCRIPTION "Why is the channel hung up." ::= { astChanEntry 38 } astChanVariables OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Channel Variables defined for this channel." ::= { astChanEntry 39 } astChanFlags OBJECT-TYPE SYNTAX BITS { wantsJitter(0), deferDTMF(1), writeInterrupt(2), blocking(3), zombie(4), exception(5), musicOnHold(6), spying(7), nativeBridge(8), autoIncrementingLoop(9) } MAX-ACCESS read-only STATUS current DESCRIPTION "Flags set on this channel." ::= { astChanEntry 40 } astChanTransferCap OBJECT-TYPE SYNTAX INTEGER { speech(0), digital(8), restrictedDigital(9), audio3k(16), digitalWithTones(17), video(24) } MAX-ACCESS read-only STATUS current DESCRIPTION "Transfer Capabilities for this channel." ::= { astChanEntry 41 } astNumChanTypes OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Number of channel types (technologies) supported." ::= { asteriskChannels 3 } astChanTypeTable OBJECT-TYPE SYNTAX SEQUENCE OF AstChanTypeEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Table with details of the supported channel types." ::= { asteriskChannels 4 } astChanTypeEntry OBJECT-TYPE SYNTAX AstChanTypeEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Information about a technology we support, including how many channels are currently using this technology." INDEX { astChanTypeIndex } ::= { astChanTypeTable 1 } AstChanTypeEntry ::= SEQUENCE { astChanTypeIndex Integer32, astChanTypeName DisplayString, astChanTypeDesc DisplayString, astChanTypeDeviceState Integer32, astChanTypeIndications Integer32, astChanTypeTransfer Integer32, astChanTypeChannels Gauge32 } astChanTypeIndex OBJECT-TYPE SYNTAX Integer32 (1 .. 2147483647) MAX-ACCESS read-only STATUS current DESCRIPTION "Index into the table of channel types." ::= { astChanTypeEntry 1 } astChanTypeName OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Unique name of the technology we are describing." ::= { astChanTypeEntry 2 } astChanTypeDesc OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Description of the channel type (technology)." ::= { astChanTypeEntry 3 } astChanTypeDeviceState OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only STATUS current DESCRIPTION "Whether the current technology can hold device states." ::= { astChanTypeEntry 4 } astChanTypeIndications OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only STATUS current DESCRIPTION "Whether the current technology supports progress indication." ::= { astChanTypeEntry 5 } astChanTypeTransfer OBJECT-TYPE SYNTAX TruthValue MAX-ACCESS read-only STATUS current DESCRIPTION "Whether the current technology supports transfers, where Asterisk can get out from inbetween two bridged channels." ::= { astChanTypeEntry 6 } astChanTypeChannels OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "Number of active channels using the current technology." ::= { astChanTypeEntry 7 } astChanScalars OBJECT IDENTIFIER ::= { asteriskChannels 5 } astNumChanBridge OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "Number of channels currently in a bridged state." ::= { astChanScalars 1 } END
https://wiki.asterisk.org/wiki/display/AST/Digium+MIB+Definitions
nano /usr/share/snmp/mibs/Digium+MIB+Definitions.txt DIGIUM-MIB DEFINITIONS ::= BEGIN IMPORTS enterprises, MODULE-IDENTITY FROM SNMPv2-SMI; digium MODULE-IDENTITY LAST-UPDATED "200806202000Z" ORGANIZATION "Digium, Inc." CONTACT-INFO "Mark Spencer Email: markster@digium.com" DESCRIPTION "The Digium private-enterprise MIB" REVISION "200806202000Z" DESCRIPTION "Corrected imports and missing revision for last update. Addresses bug 12905. - jeffg@opennms.org" REVISION "200602041900Z" DESCRIPTION "Initial revision." ::= { enterprises 22736 } END
Redémarrez snmpd et le serveur asterisk :
service snmpd restart service asterisk restart
Voici un exemple de commande pour vérifier la fonctionnalité snmp :
snmpwalk -v 3 -u asteriskUser -l authPriv -a SHA -A "password" -x AES -X "password" <xivo serveur IP> .1.3.6.1.4.1.22736
Copie Mode à distance Commun Pour tout accès à distance, vous devez créer un utilisateur Asterisk :
vi /etc/aserisk/manager.conf
Copie exemple d'utilisateur :
[xivo_centreon_user] secret = centreon deny=0.0.0.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 read = system,call,log,verbose,command,agent,user,dtmf write = system,call,log,verbose,command,agent,user,dtmf
Copie AMI Dans l'utilisateur nouvellement créé, ajoutez une ligne d' autorisation pour permettre au serveur centreon de se connecter à l'AMI :
vi /etc/aserisk/manager.conf
Copie Exemple:
permit=10.30.2.32/255.255.255.0
Copie SSH Créez un utilisateur système, centreon par exemple :
useradd centreon passwd centreon
Echangez les clés ssh du serveur centreon vers le serveur asterisk (utilisateur centreon dans notre exemple) :
ssh-copy-id centreon@
Poussez le script /usr/lib/nagios/plugins/apps/voip/asterisk/remote/remote-script/asterisk_sendcommand.pm vers /home/centreon/bin:
scp /usr/lib/nagios/plugins/apps/voip/asterisk/remote/remote-script/asterisk_sendcommand.pm /home/centreon/bin/.
Push depuis le serveur centreon /usr/lib/nagios/plugins/apps/voip/asterisk/remote/remote-script/asterisk_sendcommand.confou créez-le /home/centreon/bin/asterisk_centreon.confdirectement sur le serveur asterisk
Copiez le nom d'utilisateur et le secret de l'utilisateur centreon contenus dans /etc/asterisk/manager.confdans /home/centreon/bin/asterisk_centreon.conf:
vi /home/centreon/bin/asterisk_centreon.conf
ajoutez la ligne :
xivo_centreon_user centreon
Copie Attention : ce fichier ne doit contenir qu'une seule ligne
Attention : les fichiers /home/centreon/bin/asterisk_centreon.confet /home/centreon/bin/asterisk_centreon.confdoivent être exécutables et lisibles par l' utilisateur centreon
Mode SSH
- Serveur Tiscom Voice
Créer utilisateur centreon
useradd centreon -g root -s /bin/sh
Lui définir un mot de passe
passwd centreon
- Serveur Centreon
se connecter en user centreon
su - centreon
Envoyer sa clé ssh au serveur tiscom voice
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.10.10.232 /bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/spool/centreon/.ssh/id_rsa.pub" The authenticity of host '10.10.10.232 (10.10.10.232)' can't be established. ECDSA key fingerprint is SHA256:9YM1mTisdUt49W0r1yVeAa3srrMHU/gnoMfw4B2X4Pc. ECDSA key fingerprint is MD5:41:5e:7a:5d:d2:91:5c:55:ee:58:f8:dd:01:a2:5e:09. Are you sure you want to continue connecting (yes/no)? yes /bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys centreon@10.10.10.232's password: Entrer le mot de passe précédemment créer Number of key(s) added: 1 Now try logging into the machine, with: "ssh '10.10.10.232'" and check to make sure that only the key(s) you wanted were added.
- Sur serveur tiscom voice
Désactiver le mot de passe de l'user centreon
passwd -l centreon
- Sur serveur Centreon
Tester la connexion ssh
ssh@10.10.10.232
Si aucun mot de passe n'est demandé, et que vous tombé sur la console ssh Tiscom voice, c'est gagné.