Asterisk-3733

Asterisk Configuration

http.conf

Using your favourite editor, edit /etc/asterisk/http.conf.

In the below example we assume that your Asterisk server's IP address is 10.10.0.1, you will need to change the address to reflect the actual address of your Asterisk server.

Check that it has the following lines uncommented.

[general]
enabled=yes
bindaddr=10.10.0.1 ; Change this IP address to reflect your actual asterisk server's IP address
bindport=8088
prefix=asterisk

manager.conf

Next edit /etc/asterisk/manager.conf

Under the general section check that the option 'enabled' and 'webenabled' are both set to 'yes'

[general]
enabled=yes
webenabled=yes

At the bottom of the file create a new section similar to the following. You should change the text 'apassword' to an appropriate password. You should also add additional 'permit' lines to reflect the network of computers that will connect.

[click]
secret = apassword
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0 ; allow connections for the local computer
permit=192.168.0.0/255.255.0.0 ; allow connections from all computers with an IP in the range 192.168.X.X
permit=10.10.0.0/255.255.0.0 ; allow connections from all computers with an IP in the range 10.10.X.X
read = system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,agent,user,originate

Test Asterisk configuration

You can now test your Asterisk AJAM configuration by running the following from the Asterisk server CLI.

Start by forcing asterisk to reload the manager.conf and http.conf files.

sudo asterisk -rx "manager reload"
sudo asterisk -rx "http reload"

Now check that AJAM is configured correctly:

sudo asterisk -rx "http show status"

The server should respond with the following:

HTTP Server Status:
Prefix: /asterisk
Server Enabled and Bound to 10.10.0.1:8088

Enabled URI's:
/asterisk/httpstatus => Asterisk HTTP General Status
/asterisk/manager => HTML Manager Event Interface
/asterisk/rawman => Raw HTTP Manager Event Interface
/asterisk/static/... => Asterisk HTTP Static Delivery
/asterisk/mxml => XML Manager Event Interface

You can now test that the manager.conf settings are working by entering the following URL from a browser:

http://10.10.0.1:8088/asterisk/manager?action=login&username=click&secret=apassword

This test that the manager authentication is set up correctly.