This post seems to cover the exact same problem -
Environment:
Ubuntu 14.02 - 32 Bit
Asterisk 13.5
FreePBX 13
Chrome Browser
Asterisk compiled according to instructions provided by asterisk.org , is running on the machine with user id asterisk
FreePBX built and installed from instructions in wiki.
When I connect to the machine, the GUI comes up with the error message “Can not connect to Asterisk”
Looking at the freepbx.log, the last message is:
[2015-Aug-19 10:34:50] [CRITICAL] (admin/bootstrap.php:208) - Connection attmempt to AMI fail…
however while it says what he did to fix it, it doesn’t actually share the configurations needed.
I followed this guide -
wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+6
on a brand new fresh CentOS 6 Installation on a Virtual Machine.
Everything goes great during installation, which is wicked BTW, but it says that FreePBX can’t connect to Asterisk.
There are two questions in the provided topic link.
Are both Apache and Asterisk running as same user, while I am 90% sure they are, how can I check this.
More then likely I need to enable an ACL to allow AMI to connect via Localhost in the manager.conf
Can I get an example of this configuration?
All the last poster says is, I fixed it by editing manager.conf… I wish he had left his config. Any help is appreciated.
Sorry I can’t add links because I am new.
bksales
(bksales)
May 12, 2016, 3:52pm
2
did you try rebooting the system. we see this occasionally and simply rebooting fixes the issue.
I am a support Technician / Network OPs guy for a living, I know to try that first lol, Thank you tho! I am hopefully with the fast response of this forum that I can get this resolved
bksales
(bksales)
May 12, 2016, 4:35pm
4
did you try manually starting asterisk?
Yes, I will post cat /full later, I am away ATM, but it said user “admin” failed to authenticate at 127.0.0.1
[2016-05-12 14:35:45] VERBOSE[1805] loader.c: app_queue.so => (True Call Queueing)
[2016-05-12 14:35:45] VERBOSE[1805] loader.c: Loading res_manager_devicestate.so.
[2016-05-12 14:35:45] VERBOSE[1805] manager.c: Manager registered action DeviceStateList
[2016-05-12 14:35:45] VERBOSE[1805] loader.c: res_manager_devicestate.so => (Manager Device State Topic Forwarder)
[2016-05-12 14:35:45] VERBOSE[1805] loader.c: Loading res_manager_presencestate.so.
[2016-05-12 14:35:45] VERBOSE[1805] manager.c: Manager registered action PresenceStateList
[2016-05-12 14:35:45] VERBOSE[1805] loader.c: res_manager_presencestate.so => (Manager Presence State Topic Forwarder)
[2016-05-12 14:35:45] VERBOSE[1805] asterisk.c: Asterisk Ready.
[2016-05-12 14:36:45] NOTICE[2088] manager.c: 127.0.0.1 failed to authenticate as ‘admin’
xrobau
(Rob Thomas)
May 12, 2016, 7:36pm
7
That means the contents of /etc/asterisk/manager.conf doesn’t match what is set in FreePBX’s Admin->Advanced Settings → Asterisk Manager settings
Make them Match
#/etc/amportal.conf
# Asterisk Manager User
# Default Value: admin
AMPMGRUSER=admin
# Asterisk Manager Password
# Default Value: amp111
AMPMGRPASS=amp111
ASTMANAGERHOST=localhost
#/etc/asterisk/manager.conf
[admin]
secret = amp111
permit=127.0.0.1/255.255.255.0
Mine had some sort of hash that wasn’t flying so I set to default and it worked
xrobau
(Rob Thomas)
May 13, 2016, 1:56am
9
Woah. ‘amp111’ is a well known password. Don’t use that.
Do this:
dd if=/dev/urandom bs=9 count=1 | base64
Take the random string that that generated and put it in both places.
This is for testing, I am well aware of the risks of default password, plus the point was to get it to connect then work on changing it. BUT Thank you for your advice, I hadn’t look at the GUI yet, only the manager.conf, so I was able to figure this out after loggin into the web.