aboutsummaryrefslogtreecommitdiffstats
path: root/doc/manager.txt
blob: 3693c8dbd66dc4a4ff8213d97b53d43a19d19a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
The Asterisk Manager TCP/IP API
===============================

The manager is a client/server model over TCP. With the manager interface,
you'll be able to control the PBX, originate calls, check mailbox status,
monitor channels and queues as well as execute Asterisk commands.

Management users are configured in the configuration file manager.conf and are 
given permissions for read and write, where write represents their ability 
to perform this class of "action", and read represents their ability to 
receive this class of "event".

Command Syntax
--------------
Management communication consists of tags of the form "header: value", 
terminated with an empty newline (\r\n) in the style of SMTP, HTTP, and
other headers.


The first tag MUST be one of the following:

    * Action: An action requested by the CLIENT to the Asterisk SERVER. Only one "Action" may be outstanding at any time.
    * Response: A response to an action from the Asterisk SERVER to the CLIENT.
    * Event: An event reported by the Asterisk SERVER to the CLIENT 


Manager commands
----------------
Output from the CLI command 'show manager' command:

    * 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
    * AbsoluteTimeout: Set Absolute Timeout
    * MailboxCount: Check Mailbox Message Count
    * Monitor: Monitor a channel
    * StopMonitor: Stop monitoring a channel
    * ChangeMonitor: Change monitoring filename of a channel
    * IAXpeers: List IAX Peers (Defaults to IAX2)
    * IAX1peers: List IAX version 1 Peers
    * Queues: Queues
    * QueueStatus: Queue Status 


Command Summary
--------------

Command: Command
Parameters: Command

Command: ExtensionState
Parameters: Exten, Context, ActionID

Command: Hangup
Parameters: Channel

Command: Logoff
Parameters: None

Command: MailboxCount
Parameters: Mailbox, ActionID

Command: MailboxStatus
Parameters: Mailbox, ActionID

Command: Originate
Parameters: Channel, Exten, Context, Priority, Timeout, 
CallerID, Variable, Account, Application, Data, Async

Command: Ping
Parameters: None

Command: Redirect
Parameters: Channel, ExtraChannel, Exten, Context, Priority

Command: Timeout
Parameters: Channel, Timeout


Examples
--------
Login - Log a user into the manager interface.

   Action: Login
   Username: testuser
   Secret: testsecret

Originate - Originate a call from a channel to an extension.

   Action: Originate
   Channel: sip/12345
   Exten: 1234
   Context: default

Originate - Originate a call from a channel to an extension without waiting
for call to complete.

   Action: Originate
   Channel: sip/12345
   Exten: 1234
   Context: default
   Async: yes


Redirect with ExtraChannel:
  Attempted goal:
  Have a 'robot' program Redirect both ends of an already-connected call
  to a meetme room using the ExtraChannel feature through the management interface.

  Action: Redirect
  Channel: Zap/1-1
  ExtraChannel: SIP/3064-7e00 (varies)
  Exten: 680
  Priority: 1

Where 680 is an extension that sends you to a MeetMe room.

There are a number of GUI tools that use the manager interface, please search
the mailing list archives and the documentation page on the http://www.asterisk.org
web site for more information.




-----------------