I have try to install FreePBX on Ubuntu20.04 using this guide
[הקלידו או הדביקו קוד כאן](https://www.atlantic.net/vps-hosting/how-to-install-asterisk-and-freepbx-on-ubuntu-20-04/)
the installtion went OK - didn’t get any errors
coudn’t get to the web interface
this time I can see Asterisk is running , but when I run fwconsole I get error
fwconsole status
PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Class 'Symfony\Component\Console\Application' not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11
what is wrong this time?
****a small thought:
mayeb I’m installing it wrong?
some command I’m using sudo
some from root user
and some without nothing
Actually, I am reading now this guide, it guides you to install Asterisk 17 which is EOL.
For beginners we usually recommend to install the FreePBX distro which is based on CentOS7. You can get it here: Download | FreePBX - Let Freedom Ring
However, if you do want a manual install, I have success with Bill Simon’s Debian guides. Here’s FreePBX16 with Asterisk 16 on Debian 11: Sangoma Documentation
fwconsole chown
PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening ‘/etc/freepbx.conf’ for inclusion (include_path=‘.:/usr/share/php’) in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11
ubuntu@asterisk-freepbx-ubuntu20-01:~$ sudo fwconsole chown
Taking too long? Customize the chown command, See FreePBX Chown Conf - FreePBX OpenSource Project - Documentation
Setting Permissions…
Setting base permissions…Done in 1 seconds
Setting specific permissions…
28141 [============================]
Finished setting permissions
fwconsole status
PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening ‘/etc/freepbx.conf’ for inclusion (include_path=‘.:/usr/share/php’) in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11
ubuntu@asterisk-freepbx-ubuntu20-01:~$ fwconsole start
PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening ‘/etc/freepbx.conf’ for inclusion (include_path=‘.:/usr/share/php’) in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11
reboot
still not working - get the same error message
It looks like you are not logged in as root, which if you are not running things with elevated permission, you will run into issues. Have you installed Asterisk/FreePBX with elevated permissions?
sudo fwconsole reload
Reload Started
In Self_Helper.class.php line 212:
Unable to locate the FreePBX BMO Class 'Pm2'A required module might be disabled or uninstalled. Recommende
d steps (run from the CLI): 1) fwconsole ma install pm2 2) fwconsole ma enable pm2
reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]
maybe I made a mistake during the installation ?
becaue I run some command not from root
will it save time if I will start a new clean ubuntu
then I will enter root mode at start (‘sudo su -’)
then run all this commands:
sudo fwconsole ma downloadinstall pm2
No repos specified, using: [standard] from last GUI settings
Downloading module 'pm2'
Processing pm2
Downloading...
29043/29043 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 2 seconds
sh: 1: npm: not found
Node Package Manager is not installed
Unable to install module pm2:
- Failed to run installation scripts
Updating Hooks...Done
Chowning directories...Done
fwconsole reload
PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening '/etc/freepbx.conf' for inclusion (include_path='.:/usr/share/php') in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Class 'Symfony\Component\Console\Application' not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11
ubuntu@asterisk-freepbx-ubuntu20-01:~$ sudo fwconsole reload
Reload Started
Starting Call Transfer Monitoring Service
Stopping Call Transfer Monitoring Service
Restarting Call Transfer Monitoring Service
Reload Complete
ubuntu@asterisk-freepbx-ubuntu20-01:~$ sudo fwconsole start
Asterisk already running
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 in 0 seconds
Setting specific permissions...
39599 [============================]
Finished setting permissions
Unable to run Pre-Asterisk hooks, because Asterisk is already running on PID 1016 and has been running for 2 minutes, 21 seconds
Running Asterisk post from Core module
Starting Call Transfer Monitoring Service
Stopping Call Transfer Monitoring Service
Restarting Call Transfer Monitoring Service
Core FastAGI Server has already been running on PID 3438 for 16 seconds
but still nothing in the web page
I thought maybe the firewall is blocking but it’s disable
after reboot I need to change the iptables and also run manually “fwconsole”
I guess I can make a script that will run it on boot - but is there an way to fix it ?
I mange to create 2 extensions , connect to them from my phone(Android) and my Windows PC
but when I try to make a call it doesn’t work , in the logs I see this:
[2022-07-27 12:21:03] WARNING[4977][C-00000001] pbx.c: No application 'Macro' for extension (from-internal, 0002, 3)
1779 [2022-07-27 12:21:03] WARNING[4977][C-00000001] pbx.c: No application 'Macro' for extension (from-internal, h, 1)
1780 [2022-07-27 12:22:08] WARNING[5021][C-00000002] pbx.c: No application 'Macro' for extension (from-internal, 0001, 3)
1781 [2022-07-27 12:22:08] WARNING[5021][C-00000002] pbx.c: No application 'Macro' for extension (from-internal, h, 1)
what do I need in order to install the 'Macro' App?
Make sure that it is enabled when you run make menuconfig,
Make sure you remove any noload directive, for it, in modules.conf.
app_macro is deprecated in Asterisk and is not loaded (possibly also not built) in default installations of supported versions of Asterisk. FreePBX is critically dependent on it.
so I need to redo to the installtion ?
or just run make menuconfig ,then make install
ad this is all ?
maybe I’m missing something in the understanding
all I want\need is to be able to make calles using my VPN netwrok
I have setup the extension as
chan_pjsip
mayeb I need to setup then as something else? and then it will work ?
does it metter how to I setup them ?
You need to run everything from make menuconfig through make install, and may also need to edit /etc/asterisk/modules.conf.
make menuconfig sets up files which describe the options to use.
make actually compiles everything.
make install installs the binaries created by make.
You’ll probably get away without the following steps, as I don’t think what is left over will have been invalidated.
If you do run make samples, you may have to repeat all the following steps that update the config files, although it looks like overriding OVERWRITE to no will stop this. (I’m using a combination of experience of an older version of the build system and looking at the Makefile here, so I’m not 100% sure that make samples will overwrite the installed configuration.)