Page 255 - Asterisk™: The Future of Telephony
P. 255
CHAPTER 10
Asterisk Manager Interface (AMI) and
Adhearsion
Do but take care to express yourself in a plain, easy
Manner, in well-chosen, significant and decent Terms,
and to give a harmonious and pleasing Turn to your
Periods: study to explain your Thoughts, and set them
in the truest Light, labouring as much as possible, not
to leave them dark nor intricate, but clear and
intelligible.
—Miguel de Cervantes, Preface to Don Quixote
The Manager Interface
The Asterisk Manager Interface (AMI) is a powerful programmatic interface. It allows
*
external programs to both control and monitor an Asterisk system. This interface is
often used to integrate Asterisk with existing business processes and systems, CRM
(Customer Relationship Management) software. It can also be used for a wide variety
of applications, such as automated dialers and click-to-call systems.
The Asterisk Manager Interface listens for connections on a network port. A client
program can then connect to the Asterisk Manager Interface on that port, authenticate
itself, and send commands to Asterisk. Asterisk will then respond to the request, as
well as update the client program with the status of the system.
To use the Manager, you must define an account in the
file /etc/asterisk/manager.conf. This file will look something like this:
[general]
enabled = yes
port = 5038
* Contrast this with the Asterisk Gateway Interface (AGI), which allows Asterisk to launch an external program
from the dialplan. The AGI and AMI interfaces are very much complimentary to each other.
227