System information
$ wget "http://localhost:8088/rawman?action=logoff" --load-cookies cookies.txt -O -
--2010-08-31 12:34:23--
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8088... connected.
HTTP request sent, awaiting response... 200 OK
Length: 56 [text/plain]
Saving to: `STDOUT'
Response: Goodbye
Message: Thanks for all the fish.
2010-08-31 12:34:23 (696 KB/s) - written to stdout [56/56]
The HTTP interface to AMI lets you integrate Asterisk call control into a web service.
Configuration
The section “Quick Start” on page 457 showed a very basic set of configuration files to
get you started. However, there are many more options available for the AMI.
manager.conf
The main configuration file for the AMI is /etc/asterisk/manager.conf. The [general]
section contains options (listed in Table 20-1) that control the overall operation of the
AMI. Any other sections in the manager.conf file will define accounts for logging in and
using the AMI.
Table 20-1. Options in the manager.conf [general] section
Option Value/Example Description
enabled yes Enables the AMI. The default is no.
webenabled yes Allows access to the AMI through the built-in HTTP
server. The default is no.
a
port 5038 Sets the port number to listen on for AMI connections.
The default is 5038.
bindaddr 127.0.0.1 Sets the address to listen on for AMI connections. The
default is to listen on all addresses (0.0.0.0). How-
ever, it is highly recommended to set this to
127.0.0.1.
tlsenable yes Enables listening for AMI connections using TLS. The
default is no. It is highly recommended to only expose
connectivity via TLS outside of the local machine.
b
tlsbindport 5039 Sets the port to listen on for TLS connections to the
AMI. The default is 5039.
460 | Chapter 20: Asterisk Manager Interface (AMI)