I have installed a Debian 8 container with FreePBX 14 and Asterisk 13 using the instructions in the WIKI and creating the startup script also from the WIKI for that. The only problem I ran into was the PEAR server not being available because of the hack, so I had to install Console_Getopt manually. Not sure if I did it correctly or not but PEAR thinks it’s there…
root@template:~# pear list
Installed packages, channel pear.php.net
Package Version State
Archive_Tar 1.4.4 stable
Console_Getopt 1.4.1 stable
PEAR 1.10.7 stable
Structures_Graph 1.1.1 stable
XML_Util 1.4.3 stable
Other than that the install went without a hitch. I’m having several problems that may all be related to one.
First, Asterisk does not start when using systemctl (hangs for about 2 minutes)…
root@template:~# systemctl start freepbx
Job for freepbx.service failed. See ‘systemctl status freepbx.service’ and ‘journalctl -xn’ for details.
root@template:~# systemctl status freepbx.service
● freepbx.service - FreePBX VoIP Server
Loaded: loaded (/etc/systemd/system/freepbx.service; enabled)
Active: failed (Result: exit-code) since Thu 2019-02-21 23:52:02 EST; 12s ago
Process: 1262 ExecStart=/usr/sbin/fwconsole start -q (code=exited, status=1/FAILURE)
Main PID: 1262 (code=exited, status=1/FAILURE)
Feb 21 23:52:02 template fwconsole[1262]: In Start.class.php line 187:
Feb 21 23:52:02 template fwconsole[1262]: Unable to connect to Asterisk. Did it start?
Feb 21 23:52:02 template fwconsole[1262]: start [–pre] [–post] [–skipchown] [–] []…
Feb 21 23:52:02 template systemd[1]: freepbx.service: main process exited, code=exited, status=1/FAILURE
Feb 21 23:52:02 template systemd[1]: Failed to start FreePBX VoIP Server.
Feb 21 23:52:02 template systemd[1]: Unit freepbx.service entered failed state.
And ps doesn’t show Asterisk running.
When I try and start it using fwconsole…
root@template:~# fwconsole start
Running FreePBX startup…
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
11428 [============================]
Finished setting permissions
Starting Asterisk…
[--------------->------------] 1 min
In Start.class.php line 187:
Unable to connect to Asterisk. Did it start?
start [–pre] [–post] [–skipchown] [–] []…
Checked ps, not running.
But if I re-run systemctl start freepbx, it runs!
However, if I hit the interface to start the setup, the Initial Setup screen appears, but at the top right corner in a red box: Can Not Connect to Asterisk, even though I know its running…
2042 pts/0 S 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
2044 pts/0 Sl 0:06 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
If I attempt a fwconsole restart…
root@template:~# fwconsole restart
Running FreePBX shutdown…
In php-asmanager.php line 489:
fclose(): 92 is not a valid stream resource
restart [-i|–immediate] [–] []…
So here are my manager settings:
template*CLI> manager show settings
Global Settings
Manager (AMI): Yes
Web Manager (AMI/HTTP): No
TCP Bindaddress: 0.0.0.0:5038
HTTP Timeout (seconds): 60
TLS Enable: No
TLS Bindaddress: Disabled
TLS Certfile: asterisk.pem
TLS Privatekey:
TLS Cipher:
Allow multiple login: Yes
Display connects: No
Timestamp events: No
Channel vars:
Debug: No
And the manager.conf:
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+
[admin]
secret =
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000
And here is is listening…
root@template:~# netstat -an | grep 5038
tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN
If I try to stop the service using systemctl, I get no error, but Asterisk is still running. Asterisk CLI works. So PHP can’t talk to Asterisk.
So I’m not sure if its a faulty Console_Getopt install, Asterisk problem, PHP, etc. Any help would be greatly appreciated! I’ll provide any missing info. Thanks in advance!
-Mike Walker