active()
activeCalls()
bridged()
chanADSI()
chanAMAFlags()
chanAccountCode()
chanApp()
chanBridge()
chanCallGroup()
chanCidANI()
chanCidANI2()
chanCidDNID()
chanCidName()
chanCidNum()
chanCidPresentation()
chanCidRDNIS()
chanCidTNS()
chanCidTON()
chanContext()
chanData()
chanExten()
chanFlags()
chanForwardTo()
chanHangupCause()
chanLanguage()
chanMacroContext()
chanMacroExten()
chanMacroPri()
chanMasq()
chanMasqr()
chanMusicClass()
chanMuted()
chanName()
chanPickupGroup()
chanPri()
chanRings()
chanState()
chanToneZone()
chanTransferCap()
chanType()
chanUniqueId()
chanVariables()
chanWhenHangup()
channelDetails()
descriptions()
details()
deviceStates()
names()
progressIndications()
supported()
transfers()
_chanVarsToArray()
$CHANNEL_ADSIs
$CHANNEL_AMA_FLAGS
$CHANNEL_HANGUP_CAUSES
$CHANNEL_STATES
$CHANNEL_TRANSFER_CAPABILITIES
CHANNEL_ADSI_AVAILABLE
CHANNEL_ADSI_OFF_HOOK_ONLY
CHANNEL_ADSI_UNAVAILABLE
CHANNEL_ADSI_UNKNOWN
CHANNEL_AMA_FLAG_BILLING
CHANNEL_AMA_FLAG_DEFAULT
CHANNEL_AMA_FLAG_DOCUMENTATION
CHANNEL_AMA_FLAG_OMIT
CHANNEL_HANGUP_CAUSE_BUSY
CHANNEL_HANGUP_CAUSE_CONGESTION
CHANNEL_HANGUP_CAUSE_FAILURE
CHANNEL_HANGUP_CAUSE_NORMAL
CHANNEL_HANGUP_CAUSE_NOT_DEFINED
CHANNEL_HANGUP_CAUSE_NO_ANSWER
CHANNEL_HANGUP_CAUSE_NO_SUCH_DRIVER
CHANNEL_HANGUP_CAUSE_UNREGISTERED
CHANNEL_STATE_BUSY
CHANNEL_STATE_DIALING
CHANNEL_STATE_DIALING_OFF_HOOK
CHANNEL_STATE_DOWN
CHANNEL_STATE_OFF_HOOK
CHANNEL_STATE_PRE_RING
CHANNEL_STATE_RESERVED
CHANNEL_STATE_RING
CHANNEL_STATE_RINGING
CHANNEL_STATE_UP
CHANNEL_TRANSFER_CAPABILITY_AUDIO_3K
CHANNEL_TRANSFER_CAPABILITY_DIGITAL
CHANNEL_TRANSFER_CAPABILITY_DIGITAL_WITH_TONES
CHANNEL_TRANSFER_CAPABILITY_RESTRICTED_DIGITAL
CHANNEL_TRANSFER_CAPABILITY_SPEECH
CHANNEL_TRANSFER_CAPABILITY_VIDEO
OID_ASTERISK_CHANNELS_ACTIVE
OID_ASTERISK_CHANNELS_BRIDGED
OID_ASTERISK_CHANNELS_SUPPORTED
OID_ASTERISK_CHANNEL_ACCOUNT_CODE
OID_ASTERISK_CHANNEL_ADSI
OID_ASTERISK_CHANNEL_AMA_FLAGS
OID_ASTERISK_CHANNEL_APP
OID_ASTERISK_CHANNEL_BRIDGE
OID_ASTERISK_CHANNEL_CALL_GROUP
OID_ASTERISK_CHANNEL_CID_ANI
OID_ASTERISK_CHANNEL_CID_ANI2
OID_ASTERISK_CHANNEL_CID_DNID
OID_ASTERISK_CHANNEL_CID_NAME
OID_ASTERISK_CHANNEL_CID_NUM
OID_ASTERISK_CHANNEL_CID_PRESENTATION
OID_ASTERISK_CHANNEL_CID_RDNIS
OID_ASTERISK_CHANNEL_CID_TNS
OID_ASTERISK_CHANNEL_CID_TON
OID_ASTERISK_CHANNEL_CONTEXT
OID_ASTERISK_CHANNEL_DATA
OID_ASTERISK_CHANNEL_EXTEN
OID_ASTERISK_CHANNEL_FLAGS
OID_ASTERISK_CHANNEL_FORWARD_TO
OID_ASTERISK_CHANNEL_HANGUP_CAUSE
OID_ASTERISK_CHANNEL_LANGUAGE
OID_ASTERISK_CHANNEL_MACRO_CONTEXT
OID_ASTERISK_CHANNEL_MACRO_EXTEN
OID_ASTERISK_CHANNEL_MACRO_PRI
OID_ASTERISK_CHANNEL_MASQ
OID_ASTERISK_CHANNEL_MASQR
OID_ASTERISK_CHANNEL_MUSIC_CLASS
OID_ASTERISK_CHANNEL_MUTED
OID_ASTERISK_CHANNEL_NAME
OID_ASTERISK_CHANNEL_PICKUP_GROUP
OID_ASTERISK_CHANNEL_PRI
OID_ASTERISK_CHANNEL_RINGS
OID_ASTERISK_CHANNEL_STATE
OID_ASTERISK_CHANNEL_TONE_ZONE
OID_ASTERISK_CHANNEL_TRANSFER_CAP
OID_ASTERISK_CHANNEL_TYPE
OID_ASTERISK_CHANNEL_TYPE_CHANNELS
OID_ASTERISK_CHANNEL_TYPE_DESCRIPTION
OID_ASTERISK_CHANNEL_TYPE_INDICATION
OID_ASTERISK_CHANNEL_TYPE_NAME
OID_ASTERISK_CHANNEL_TYPE_STATE
OID_ASTERISK_CHANNEL_TYPE_TRANSFER
OID_ASTERISK_CHANNEL_UNQIUEID
OID_ASTERISK_CHANNEL_VARIABLES
OID_ASTERISK_CHANNEL_WHEN_HANGUP
A class for performing SNMP V2 queries on Asterisk
see | \OSS_SNMP\MIBS\Asterisk\https://wiki.asterisk.org/wiki/display/AST/Asterisk+MIB+Definitions |
---|---|
copyright | Copyright (c) 2012, Open Source Solutions Limited, Dublin, Ireland |
author | Barry O'Donovan |
active() : int
Current number of active channels.
int
The current number of active channels.activeCalls() : array
Number of active channels using the current technology.
array
Active calls on supported channelsbridged() : int
Number of channels currently in a bridged state.
int
Array of active calls on supported channelschanADSI(bool $translate) : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Whether or not ADSI is detected on CPE. (see constants)
bool
If true, use the $CHANNEL_ADSIs
array to return textual representation
array
Whether or not ADSI is detected on CPE. (see constants)chanAMAFlags(bool $translate) : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
AMA Flags. (See constants)
bool
If true, use the $CHANNEL_AMA_FLAGS
array to return textual representation
array
AMA Flags. (See constants)chanAccountCode() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Account Code for billing.
array
Account Code for billing.chanApp() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current application for the channel.
array
Current application for the channel.chanBridge() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Which channel this channel is currently bridged (in a conversation) with.
array
Which channel this channel is currently bridged (in a conversation) with.chanCallGroup() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Call Group.
array
Call Group.chanCidANI() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
ANI
array
ANIchanCidANI2() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
ANI 2 (info digit).
array
ANI 2 (info digit).chanCidDNID() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Dialled Number ID.
array
Dialled Number ID.chanCidName() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Caller Name.
array
Caller Name.chanCidNum() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Caller Number.
array
Caller Number.chanCidPresentation() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Number Presentation/Screening.
array
Number Presentation/Screening.chanCidRDNIS() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Redirected Dialled Number Service.
array
Redirected Dialled Number Service.chanCidTNS() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Transit Network Select.
array
Transit Network Select.chanCidTON() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Type of Number.
array
Type of Number.chanContext() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current extension context.
array
Current extension context.chanData() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Arguments passed to the current application.
array
Arguments passed to the current application.chanExten() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current extension.
array
Current extension.chanFlags() : array
Returns a HEX number - but I could not map it to the following from Asterisk docs:
BITS { wantsJitter(0), deferDTMF(1), writeInterrupt(2), blocking(3), zombie(4), exception(5), musicOnHold(6), spying(7), nativeBridge(8), autoIncrementingLoop(9) }
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Flags set on this channel. (see constants)
array
Flags set on this channel. (see constants)chanForwardTo() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Where to forward to if asked to dial on this interface.
array
Where to forward to if asked to dial on this interface.chanHangupCause(bool $translate) : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Why is the channel hung up. (see constants)
bool
If true, use the $CHANNEL_HANGUP_CAUSES
array to return textual representation
array
Why is the channel hung up. (see constants)chanLanguage() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Which language the current channel is configured to use -- used mainly for prompts.
array
Which language the current channel is configured to use -- used mainly for prompts.chanMacroContext() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current macro context.
array
Current macro context.chanMacroExten() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current macro extension.
array
Current macro extension.chanMacroPri() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current macro priority.
array
Current macro priority.chanMasq() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Channel masquerading for us.
array
Channel masquerading for us.chanMasqr() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Channel we are masquerading for.
array
Channel we are masquerading for.chanMusicClass() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Music class to be used for Music on Hold for this channel.
array
Music class to be used for Music on Hold for this channel.chanMuted() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Transmission of voice data has been muted.
array
Transmission of voice data has been muted.chanName() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Name of the current channel.
array
Name of the current channel.chanPickupGroup() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Pickup Group.
array
Pickup Group.chanPri() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Current priority.
array
Current priority.chanRings() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Number of rings so far.
array
Number of rings so far.chanState(bool $translate) : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Channel state (see channel state constants).
bool
If true, use the $CHANNEL_STATES
array to return textual representation
array
Channel state (see channel state constants).chanToneZone() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Indication zone to use for channel.
array
Indication zone to use for channel.chanTransferCap(bool $translate) : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Transfer Capabilities for this channel. (see constants)
bool
If true, use the $CHANNEL_TRANSFER_CAPABILITIES
array to return textual representation
array
Transfer Capabilities for this channel. (see constants)chanType() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Underlying technology for the current channel.
array
Underlying technology for the current channel.chanUniqueId() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Unique Channel Identifier.
array
Unique Channel Identifier.chanVariables() : array
Returns an array of arrays where the inner array is key/value pairs
of channel variables for that channel: [varName] => [varValue]
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
Channel Variables defined for this channel.
array
Channel Variables defined for this channel.chanWhenHangup() : array
NB: SNMP exceptions are caught and in such cases null is returned as not all channels have all properties.
How long until this channel will be hung up.
array
How long until this channel will be hung up.channelDetails(bool $translate, bool $useIndexes) : array
Essentially, this function calls all chanXXX()
functions to return the details for
individual channels gathered together. E.g.
Array
(
....
[SIP/foobar-654-00000372] => Array
(
[chanName] => SIP/foobar-654-00000372
[chanLanguage] => en
[chanType] => SIP
[chanMusicClass] => (null)
...
[chanVariables] => Array
(
[DIALEDPEERNUMBER] => foobar-654
[SIPCALLID] => 1be189fa6281ffc1108db32935f05016@192.168.7.7:5060
)
[chanFlags] => 1020
[chanTransferCap] => speech
)
....
)
The function returns an array of all channels. Unknown parameters within the channel are set to null.
An empty array is returned if there are no active channels.
bool
Translate parameters when possible
bool
Rather than indexing the outer array with the unique channel name, index with the SNMP table position
array
All the details of individual channels into an array.descriptions() : array
Description of the channel type (technology).
array
Supported channel type descriptionsdetails(bool $useIndex) : 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
.
bool
If true, the array is indexed using the SNMP table index rather than the unique channel type name
array
Channel details as an associative arraydeviceStates() : array
Whether the current technology can hold device states.
array
Whether the current technology can hold device states.names() : array
Unique name of the technology we are describing.
array
Supported channel type namesprogressIndications() : array
Whether the current technology supports progress indication.
array
Whether the current technology supports progress indication.supported() : int
Number of channel types (technologies) supported.
int
The number of channel types (technologies) supported.transfers() : array
Whether the current technology supports transfers, where Asterisk can get out from inbetween two bridged channels.
array
Whether the current technology transfers_chanVarsToArray(string $str) : Array
string
String containing channel variables (from chanVariables()
Array
An array of `[varName] => [varValue]` pairs for the channel$CHANNEL_ADSIs
$CHANNEL_AMA_FLAGS
$CHANNEL_HANGUP_CAUSES
$CHANNEL_STATES
$CHANNEL_TRANSFER_CAPABILITIES
CHANNEL_ADSI_AVAILABLE
CHANNEL_ADSI_OFF_HOOK_ONLY
CHANNEL_ADSI_UNAVAILABLE
CHANNEL_ADSI_UNKNOWN
CHANNEL_AMA_FLAG_BILLING
CHANNEL_AMA_FLAG_DEFAULT
CHANNEL_AMA_FLAG_DOCUMENTATION
CHANNEL_AMA_FLAG_OMIT
CHANNEL_HANGUP_CAUSE_BUSY
CHANNEL_HANGUP_CAUSE_CONGESTION
CHANNEL_HANGUP_CAUSE_FAILURE
CHANNEL_HANGUP_CAUSE_NORMAL
CHANNEL_HANGUP_CAUSE_NOT_DEFINED
CHANNEL_HANGUP_CAUSE_NO_ANSWER
CHANNEL_HANGUP_CAUSE_NO_SUCH_DRIVER
CHANNEL_HANGUP_CAUSE_UNREGISTERED
CHANNEL_STATE_BUSY
CHANNEL_STATE_DIALING
CHANNEL_STATE_DIALING_OFF_HOOK
CHANNEL_STATE_DOWN
CHANNEL_STATE_OFF_HOOK
CHANNEL_STATE_PRE_RING
CHANNEL_STATE_RESERVED
CHANNEL_STATE_RING
CHANNEL_STATE_RINGING
CHANNEL_STATE_UP
CHANNEL_TRANSFER_CAPABILITY_AUDIO_3K
CHANNEL_TRANSFER_CAPABILITY_DIGITAL
CHANNEL_TRANSFER_CAPABILITY_DIGITAL_WITH_TONES
CHANNEL_TRANSFER_CAPABILITY_RESTRICTED_DIGITAL
CHANNEL_TRANSFER_CAPABILITY_SPEECH
CHANNEL_TRANSFER_CAPABILITY_VIDEO
OID_ASTERISK_CHANNELS_ACTIVE
OID_ASTERISK_CHANNELS_BRIDGED
OID_ASTERISK_CHANNELS_SUPPORTED
OID_ASTERISK_CHANNEL_ACCOUNT_CODE
OID_ASTERISK_CHANNEL_ADSI
OID_ASTERISK_CHANNEL_AMA_FLAGS
OID_ASTERISK_CHANNEL_APP
OID_ASTERISK_CHANNEL_BRIDGE
OID_ASTERISK_CHANNEL_CALL_GROUP
OID_ASTERISK_CHANNEL_CID_ANI
OID_ASTERISK_CHANNEL_CID_ANI2
OID_ASTERISK_CHANNEL_CID_DNID
OID_ASTERISK_CHANNEL_CID_NAME
OID_ASTERISK_CHANNEL_CID_NUM
OID_ASTERISK_CHANNEL_CID_PRESENTATION
OID_ASTERISK_CHANNEL_CID_RDNIS
OID_ASTERISK_CHANNEL_CID_TNS
OID_ASTERISK_CHANNEL_CID_TON
OID_ASTERISK_CHANNEL_CONTEXT
OID_ASTERISK_CHANNEL_DATA
OID_ASTERISK_CHANNEL_EXTEN
OID_ASTERISK_CHANNEL_FLAGS
OID_ASTERISK_CHANNEL_FORWARD_TO
OID_ASTERISK_CHANNEL_HANGUP_CAUSE
OID_ASTERISK_CHANNEL_LANGUAGE
OID_ASTERISK_CHANNEL_MACRO_CONTEXT
OID_ASTERISK_CHANNEL_MACRO_EXTEN
OID_ASTERISK_CHANNEL_MACRO_PRI
OID_ASTERISK_CHANNEL_MASQ
OID_ASTERISK_CHANNEL_MASQR
OID_ASTERISK_CHANNEL_MUSIC_CLASS
OID_ASTERISK_CHANNEL_MUTED
OID_ASTERISK_CHANNEL_NAME
OID_ASTERISK_CHANNEL_PICKUP_GROUP
OID_ASTERISK_CHANNEL_PRI
OID_ASTERISK_CHANNEL_RINGS
OID_ASTERISK_CHANNEL_STATE
OID_ASTERISK_CHANNEL_TONE_ZONE
OID_ASTERISK_CHANNEL_TRANSFER_CAP
OID_ASTERISK_CHANNEL_TYPE
OID_ASTERISK_CHANNEL_TYPE_CHANNELS
OID_ASTERISK_CHANNEL_TYPE_DESCRIPTION
OID_ASTERISK_CHANNEL_TYPE_INDICATION
OID_ASTERISK_CHANNEL_TYPE_NAME
OID_ASTERISK_CHANNEL_TYPE_STATE
OID_ASTERISK_CHANNEL_TYPE_TRANSFER
OID_ASTERISK_CHANNEL_UNQIUEID
OID_ASTERISK_CHANNEL_VARIABLES
OID_ASTERISK_CHANNEL_WHEN_HANGUP