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.

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

Return to Documentation Home I Return to Sangoma Support