The GUI - Asterisk Manager Interface (AMI)

[Ref: OpenBSD 5.1, Asterisk 1.8.11 (from ports), Asterisk Manager Interface

Table of Contents

  • Asterisk Management Interface
  • GUI

Asterisk Management Interface

The default install of Asterisk does not enable key components required for Asterisk GUI. To configure, enable the gui we need to configure the Asterisk Manager Interface, which involves configuring at least 2 configuration files:

  • manager.conf
  • http.conf

We can confirm the status of the http module by using the console-commands manager show settings and http show status

myhost*CLI> manager show settings
Global Settings

   Manager (AMI):           No
   Web Manager (AMI/HTTP):  No
myhost*CLI> http show status
HTTP Server Status:
Server Disabled

Enabled URI's:
/httpstatus => Asterisk HTTP General Status
/phoneprov/... => Asterisk HTTP Phone Provisioning Tool
/static/... => Asterisk HTTP Static Delivery

Enabled Redirects:

Note, the Server Disabled information.

Use locate(1) to find the sample copies from the Asterisk Package and copy that as the initial configuration.

Edit with the following changes:

File extract: /etc/asterisk/manager.conf


File extract: /etc/asterisk/http.conf



Enable the configuration by reloading Asterisk, which can be done through restarting asterisk (always a good practise) but in a live environment, you can reload Asterisk using core reload

myhost*CLI> core reload

Enabled and Operational

With the above configuration safely in place, you should get at least the minimal below display.

myhost*CLI> http show status
HTTP Server Status:
Server Enabled and Bound to

Enabled URI's:
/httpstatus => Asterisk HTTP General Status
/phoneprov/... => Asterisk HTTP Phone Provisioning Tool
/static/... => Asterisk HTTP Static Delivery

Enabled Redirects:
$ lynx http://localhost:8080/httpstatus
                    Asterisk(TM) HTTP Status

                       Bind Address
                           Bind Port 8080
Asterisk and Digium are registered trademarks of Digium, Inc

Asterisk GUI

[Ref: Interesting Applications

Grab the install files from the subversion repository

$ svn co asterisk-gui
$ cd asterisk-gui
$ cd ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/usr/local/share

Edit the generated Makefile to make the following changes.

  • set ASTVARLIBDIR:=/usr/local/share/asterisk

$ diff -u Makefile
---        Thu Apr  4 13:08:08 2013
+++ Makefile    Thu Apr  4 13:09:36 2013
@@ -64,7 +64,7 @@
     ifeq ($(OSARCH),FreeBSD)
-      ASTVARLIBDIR:=$(DESTDIR)$(localstatedir)/lib/asterisk
+      ASTVARLIBDIR:=$(DESTDIR)$(localstatedir)/asterisk

I’m making the above changes, because the OpenBSD package install configures astlibdir (inside /etc/asterisk/asterisk.conf) to /usr/local/share/asterisk but this is not being picked up by the build process.

$ gmake
+------- Asterisk-GUI Build Complete -------+
 + Asterisk-GUI has successfully been built, +
 + and can be installed by running:          +
 +                                           +
 +               gmake install                +
$ sudo gmake install

 +---- Asterisk GUI Installation Complete ---+
 +                                           +
 +                                           +
 + Asterisk-GUI has successfully been        +
 + installed.                                +
 +                                           +
 +                                           +
 +          BEFORE THE GUI WILL WORK         +
 +                                           +
 + Before the GUI will run, you must perform +
 + some modifications to the Asterisk        +
 + configuration files in accordance with    +
 + the README file.  When done, you can      +
 + check your changes by doing:              +
 +                                           +
 +               gmake checkconfig            +
 +                                           +

The install process copies files to their appropriate directories.

$ sudo gmake checkconfig
 --- Checking Asterisk configuration to see if it will support the GUI ---
* Checking for http.conf: OK
* Checking for manager.conf: OK
* Checking if HTTP is enabled: OK
* Checking if HTTP static support is enabled: OK
* Checking if manager is enabled: OK
* Checking if manager over HTTP is enabled: OK
 --- Everything looks good ---
 * GUI should be available at

 * Note: If you have bindaddr= in /etc//asterisk/http.conf
   you will only be able to visit it from the local machine.

   Example: http://localhost:8088/asterisk/static/config/index.html

 * The login and password should be an entry from /etc//asterisk/manager.conf
   which has 'config' permission in read and write.  For example:

    secret = mysecret9602
    read = system,call,log,verbose,command,agent,config
    write = system,call,log,verbose,command,agent,config

 --- Good luck! ---

Unfortunately, the sample user account [admin] shown above does not work for me, but using the sample specified in the README file does.

File Excerpt: README

3) Create an appropriate entry in manager.conf for the administrative user
(PLEASE READ THE security.txt FILE!)

    secret = thiswouldbeaninsecurepassword
    read = system,call,log,verbose,command,agent,config,read,write,originate
    write = system,call,log,verbose,command,agent,config,read,write,originate

1) Check your config permissions:
        $ chown asterisk:asterisk /etc/asterisk/*.conf
        $ chmod 644 /etc/asterisk/*.conf

Missing Configuration Files

Some configuration settings are expected, but missing from our OpenBSD package install:

  • dahdi_genconf
  • dahdi_guiread.conf
  • guipreferences.conf

File extract: /etc/asterisk/dahdi_genconf

File extract: /etc/asterisk/dahdi_guiread.conf


File extract: /etc/asterisk/guipreferences.conf

config_upgraded = yes 

Remember the file permissions from the README file.

Paths in Scripts

Location: /usr/local/share/asterisk/scripts, /usr/local/share/asterisk/static-http/config/js

In the above locations, modify all references to /var/lib/asterisk to the standard OpenBSD Package install path: /usr/local/share/asterisk

Location: /usr/local/share/asterisk/static-http

Ensure to give the _asterisk user read/write permissions to the “config” path and subdirectories

Location: /var/lib/asterisk

Since there are so many references, to the ‘wrong’ location, simplest solution is to create a symlink between the ‘broken’ path and the ‘correct’ path:

# ln -s /usr/local/share/asterisk /var/lib/asterisk