/
Asterisk Manager Class
Asterisk Manager Class
Asterisk Manager Class
The asterisk manager class (Stored in the global variable $astman) allows a module to directly access and manipulate Asterisk.
- 1 Asterisk Manager Class
- 1.1 Initial Setup
- 1.2 List of Commands
- 1.2.1 Check if Asterisk is connected
- 1.2.2 Set Absolute Timeout
- 1.2.3 Execute Command
- 1.2.4 Check Extension Status
- 1.2.5 Get Channel Variable
- 1.2.6 Set Channel Variable
- 1.2.7 MessageSend
- 1.2.8 Codecs
- 1.2.9 ConfbridgeKick
- 1.2.10 ConfbridgeList
- 1.2.11 ConfbridgeListRooms
- 1.2.12 ConfbridgeLock
- 1.2.13 ConfbridgeMute
- 1.2.14 ConfbridgeSetSingleVideoSrc
- 1.2.15 ConfbridgeStartRecord
- 1.2.16 ConfbridgeStopRecord
- 1.2.17 ConfbridgeUnlock
- 1.2.18 ConfbridgeUnmute
- 1.2.19 MeetmeList
- 1.2.20 MeetmeListRooms
- 1.2.21 MeetmeMute
- 1.2.22 MeetmeUnmute
- 1.2.23 Hangup Channel
- 1.2.24 List IAX Peers
- 1.2.25 List available manager commands
- 1.2.26 Check Mailbox Message Count
- 1.2.27 Check Mailbox
- 1.2.28 Monitor a channel
- 1.2.29 Originate Call
- 1.2.30 List Parked Calls
- 1.2.31 Queue Add
- 1.2.32 Queue Remove
- 1.2.33 Queues
- 1.2.34 Queue Status
- 1.2.35 Redirect
- 1.2.36 List SIP Peers
- 1.2.37 Channel Status
- 1.2.38 Stop monitoring a channel
- 1.2.39 Log a message
- 1.2.40 Add event handler
- 1.2.41 Enable/Disable Sending of events to this manager
- 1.2.42 Process Event
- 1.2.43 Show All Database Entries (Or by Family)
- 1.2.44 Add an Entry to the Asterisk Database
- 1.2.45 Get an entry from the asterisk database
- 1.2.46 Delete an entry from the asterisk database
- 1.2.47 Delete a family from the asterisk database
- 1.2.48 Function Exists
- 1.2.49 Application Exists
- 1.2.50 Module Loaded
- 1.2.51 Set Global Variable
- 1.2.52 Reload
- 1.2.53 Start Mixmonitor
- 1.2.54 Stop Mixmonitor
Initial Setup
The Asterisk Manager Class can be initiated in FreePBX by first running
global $astman; |
Once this is done you will have full access to the asterisk manager list of commands below:
List of Commands
Check if Asterisk is connected
/**
* Check if the socket is connected
* @return boolean True if connected. False if not
*/
$astman->connected(); |
Set Absolute Timeout
/**
* Set Absolute Timeout
*
* @link http://www.voip-info.org/wiki-Asterisk+Manager+API+Action+AbsoluteTimeout
* @param string $channel
* @param integer $timeout
*/
$astman->AbsoluteTimeout($channel, $timeout); |
Execute Command
Check Extension Status
Get Channel Variable
Set Channel Variable
MessageSend
Codecs
ConfbridgeKick
ConfbridgeList
ConfbridgeListRooms
ConfbridgeLock
ConfbridgeMute
ConfbridgeSetSingleVideoSrc
ConfbridgeStartRecord
ConfbridgeStopRecord
ConfbridgeUnlock
ConfbridgeUnmute
MeetmeList
MeetmeListRooms
MeetmeMute
MeetmeUnmute
Hangup Channel
List IAX Peers
List available manager commands
Check Mailbox Message Count
Check Mailbox
Monitor a channel
Originate Call
List Parked Calls
Queue Add
Queue Remove
Queues
Queue Status
Redirect
List SIP Peers
Channel Status
Stop monitoring a channel
Log a message
Add event handler
Enable/Disable Sending of events to this manager
Process Event
Show All Database Entries (Or by Family)
Add an Entry to the Asterisk Database
Get an entry from the asterisk database
Delete an entry from the asterisk database
Delete a family from the asterisk database
Function Exists
Application Exists
Module Loaded
Set Global Variable
Reload
Start Mixmonitor
Stop Mixmonitor
, multiple selections available,