Manager

Synopsis
The Manager interface is used to remotely view/change console (and other) actions.  Through the use of the manager interface, you are able to send actions and receive responses very similar to the CLI interface.

How To Use
The Manager interface requires the following
/etc/asterisk/manager.conf

Syntax
The Interaction is formed as follows:
telnet localhost 5038

Note: you must have a user specified in manager.conf, and enabled = yes.

/etc/asterisk/manager.conf

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[theuser]
secret = somepassword
read = system,call,log,verbose,command,agent
write = system,call,log,verbose,command,agent

Commands
 
Ping, Logoff, Hangup, Status, Redirect, Originate, MailboxStatus, Command, ExtensionState, Monitor, StopMonitor, ChangeMonitor, IAXPeers, Queues

Ping: 			Action: Ping 

Logoff:		Action: Logoff

Hangup: 		Action: Hangup
			Channel: <num>

Status: 		Action: Status

Redirect: 		Action: Redirect
			Channel: 
			ExtraChannel:
			Exten:
			Context:
			Priority:

Originate:		Action: Originate
			Channel: Zap/g2/14085551212
			Exten:
			Context: pstn
			Priority: 1
			Timeout: 20
			CallerID: Your Company <(408) 000-0000>

MailboxStatus:	Action: MailboxStatus
			Mailbox: <num>

Command:		Action: Command
			Command: Show Manager Commands

ExtensionState: 	Action: ExtensionState
			Exten: 
			Context:

Monitor: 		Action: Monitor

StopMonitor:		Action: StopMonitor

ChangeMonitor: 	Action: ChangeMonitor

IAXPeers: 		Action: IAXPeers

Queues:		Action: Queues
Example
Connect to manager interface and list channels in use.  Remember that you must do CR’s to end input.

System prompt #    telnet localhost 5038

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/1.0

Action: Login <CR>
Username: theuser <CR>
Secret: somepassword <CR>
<CR>

Response: Success
Message: Authentication accepted

Action: Command <CR>
Command: Show Manager Commands <CR>
<CR>

Response: Follows
        Ping  Ping
        Logoff  Logoff Manager
        Hangup  Hangup Channel
        Status  Status
        Redirect  Redirect
        Originate  Originate Call
        MailboxStatus  Check Mailbox
        Command  Execute Command
        ExtensionState  Check Extension Status
        Monitor  Monitor a channel
        StopMonitor  Stop monitoring a channel
        ChangeMonitor  Change monitoring filename of a channel
        IAXpeers  List IAX Peers
        IAXpeers  List IAX Peers
        Queues  Queues
--END COMMAND--

Action: Status <CR>
<CR>

Response: Success
Message: Channel status will follow

And so forth…