Code Monkey home page Code Monkey logo

freepbx's Introduction

FreePBX on Docker

Image includes mostly RPM binaries of

  • CentOS 7.8.2003

  • LAMP stack (apache2, mariadb, php)

  • Shorewall Firewall and Fail2ban

  • Webmin UI for System Administration on Port 9990, change on docker run by passing:

    -e WEBMINPORT=xxxx

  • SSH on Port 2122, can be changed or turned off on docker run by passing:

    -e SSHPORT="off" or -e SSHPORT=xxxx

  • Asterisk 16

  • FreePBX 15 - downloaded and complied in from source

  • AvantFax 3.3.7 - file embedded in this repo, Hylafax

  • Using Postfix instead of SendMail.

Running FreePBX

[Docker Hub] (https://hub.docker.com/r/technoexpress/freepbx/builds/) automatically builds the latest changes into images which can easily be pulled and ran with a simple docker run command.

I found for best results and since I have more than one public IP, i'm using mac vlan network bridge set up:

docker network create -d macvlan \
-o macvlan_mode=bridge \
--subnet=111.222.333.443/29 \
--gateway=111.222.333.444 \
-o parent=eth1 macvlan_bridge

For the firewall to work adding --cap-add=NET_ADMIN is necessary. For best performance use --net=host or custom networking.

docker run --name freepbx \
-v freepbx-etc:/etc \
-v freepbx-www:/var/www \
-v freepbx-log:/var/log \
-v freepbx-lib:/var/lib \
-v freepbx-home:/home \
-v /etc/resolv.conf:/etc/resolv.conf:ro \
--cap-add=NET_ADMIN --net=macvlan_bridge \
--mac-address=00:00:00:00:00:00 --ip=111.222.333.446 --hostname=free.pbx.host \
--restart=always -itd technoexpress/freepbx

Setup Tips

Using the Webmin UI visit: https://ip_or_hostname:9990

Change Linux root password from default 'freepbx':

"System -> Change Passwords -> root"

Setup automatic software updating:

"System -> Software Package Updates -> check for update - every day, - Install any updates"

Create SSL certificate:

"Webmin -> Webmin Configuration -> SSL Encryption -> Let's Encrypt -> Website root directory for validation file -> Other directory `/var/www/html`"

Add Let's Encrypt SSL certicate to Apache default:

"Servers -> Apache Webserver -> select 443 virtual host -> uncheck -> SSLv2 SSLv3 TLSv1 -> SSL Options

  • Certificate/private key file /etc/webmin/letsencrypt-cert.pem
  • Private key file /etc/webmin/letsencrypt-key.pem
  • Certificate authorities file /etc/webmin/letsencrypt-ca.pem"

Change MariaDB database root password from default 'CLEARTEXT_PASSWORD':

"Servers -> MySQL Database Server -> Change Administration Password"

Add public IP addresses you will be accessing this FreePBX installation to Fail2ban to prevent lockout/banning:

"Networking -> Fail2Ban Intrusion Detector -> Filter Action Jails -> Default Jail Options -> IP addresses to never ban"

Faxing Setup with Avantfax combining IAXModem/Hylafax

This installation has an menu link pointing to: https://ip_or_hostname/avantfax

Avantfax is password-protected. Default is:

username: admin
password: password

IAXModem default fax modem configuration:

vim /etc/iaxmodem/ttyIAX0

device /dev/ttyIAX0
owner uucp:uucp
mode 660
port 4570
refresh 60
server 127.0.0.1
peername 19999
secret CLEARTEXT_PASSWORD
cidname Fax System
cidnumber 9999999999
codec ulaw

vim /etc/asterisk/iax_custom.conf

[19999]
deny=0.0.0.0/0.0.0.0
secret=CLEARTEXT_PASSWORD
transfer=yes
host=dynamic
type=friend
port=4570
qualify=yes
dial=IAX2/19999
accountcode=
permit=0.0.0.0/0.0.0.0
requirecalltoken=no
context=from-internal
secret_origional=CLEARTEXT_PASSWORD
callerid=Fax System <19999>
setvar=REALCALLERIDNUM=

After editing run Hylafax:

faxsetup

Which will also run faxaddmodem, use ttyIAX0 for "Serial port of modem".

In FreePBX GUI, add the following Custom Destination:

Fax(Hylafax) => custom-fax-iaxmodem,s,1

Incoming fax support requires a dedicated DID, and point the DID to the new Custom Destination.

Outbound faxing will go out via the normal trunks as configured.

Before visiting https://ip_or_hostname/avantfax, update/change root password to access Avantfax Database to the one that was set using Webmin UI Servers -> MySQL Database Server -> Change Administration Password.

vim /var/www/html/avantfax/includes/local_config.php

Your now ready to config FreePBX by visiting

  • https://host_ip
  • https://host_name

For better security

Make sure to turn off:

Allow Anonymous Inbound SIP Calls and Allow SIP Guests

Under Settings -> Asterisk SIP Settings -> Security Settings.


For Free SIP VoIP service using Google Voice and obitalk.com with Obihai devices

Modified setup configurations from https://cboh.org/voip/obi/OBi_As_ITSP.html

Add your Google Voice number trunk trunk

Add your public ip address of your obi ATA device/router

Add SIP Credentials that was set on the obi ATA device/router trunk trunk trunk trunk trunk

Inbound Outbound

Insure you have all items in red "!" are changed/edited to match. obiata

Add your FreePBX Server IP address/URI and create SIP Credentials obiata obiata obiata obiata obiata

Additional setting need to be set using Obi device built-in webserver obiata-device obiata-device obiata-device obiata-device

Test calling out before making this final change. Adding your Google Voice number obigooglevoice

Make sure to change setting at Google Voice website to have calls going only to your Obi ATA device, not to any other phone or device.

freepbx's People

Contributors

thetechstech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

freepbx's Issues

I can't login from webmin

Hello everybody, that's my firs post on GitHub.

Please I need support, I installed this container and everything is fine, I can open the webadmin, but when I enter the username (admin) and password (issabel-4) I get a message that says: "Warning! Login failed. Please try again. ".

If someone has the same problem or someone has the solution, I would really appreciate it.

OSError: [Errno 2] No such file or directory

regardless of the run settings, circles with below errors
docker version | grep Version
Version: 17.11.0-ce
Version: 17.11.0-ce

Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Starting sshd: G[ OK ]
2017-12-01 19:22:17,898 fail2ban.server [599]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:22:17,898 fail2ban.server [599]: INFO Starting in daemon mode
ERROR:systemctl:the service is already running on PID 622
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:22:29,825 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:22:29,825 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:22:41,050 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:22:41,050 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:24:49,309 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:24:49,309 fail2ban.server [566]: INFO Starting in daemon mode
ERROR:systemctl:the service is already running on PID 640
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:24:59,773 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:24:59,773 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:29:05,340 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:29:05,340 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:31:13,786 fail2ban.server [567]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:31:13,787 fail2ban.server [567]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:33:22,218 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:33:22,218 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:35:30,575 fail2ban.server [565]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:35:30,575 fail2ban.server [565]: INFO Starting in daemon mode
ERROR:systemctl:the service is already running on PID 640
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:35:39,956 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:35:39,956 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:39:45,655 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:39:45,655 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:43:51,356 fail2ban.server [565]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:43:51,356 fail2ban.server [565]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:45:59,900 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:45:59,900 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:48:08,368 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:48:08,368 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:52:14,014 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:52:14,014 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 19:56:20,566 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 19:56:20,566 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 20:00:26,113 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 20:00:26,113 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 20:02:34,378 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 20:02:34,378 fail2ban.server [566]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 20:04:42,807 fail2ban.server [568]: INFO Starting Fail2ban v0.9.7
2017-12-01 20:04:42,807 fail2ban.server [568]: INFO Starting in daemon mode
Traceback (most recent call last):
File "/usr/bin/systemctl", line 3162, in
result = command_func()
File "/usr/bin/systemctl", line 2807, in system_default
self.start_system_default(init = init)
File "/usr/bin/systemctl", line 2814, in start_system_default
self.start_units(default_services)
File "/usr/bin/systemctl", line 1280, in start_units
if not self.start_unit(unit):
File "/usr/bin/systemctl", line 1295, in start_unit
return self.start_unit_from(conf)
File "/usr/bin/systemctl", line 1317, in start_unit_from
run = subprocess_wait(sudo+newcmd, env)
File "/usr/bin/systemctl", line 410, in subprocess_wait
run = subprocess.Popen(cmd, shell=shell, env=env)
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
2017-12-01 20:06:51,283 fail2ban.server [566]: INFO Starting Fail2ban v0.9.7
2017-12-01 20:06:51,283 fail2ban.server [566]: INFO Starting in daemon mode

No CDR reports

full:[2019-02-25 08:00:43] WARNING[23746] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can't open lib 'libmyodbc.so' : file not found
full:[2019-02-25 08:00:43] NOTICE[23746] res_odbc.c: Registered ODBC class 'asteriskcdrdb' dsn->[MySQL-asteriskcdrdb]

Run without mac vlan

Nice work!

Can you please help me get it run without mac vlan?

I tried:
docker pull technoexpress/freepbx
then


docker run --name freepbx \
-v freepbx-etc:/etc \
-v freepbx-www:/var/www \
-v freepbx-log:/var/log \
-v freepbx-lib:/var/lib \
-v freepbx-home:/home \
-v /etc/resolv.conf:/etc/resolv.conf:ro \
--cap-add=NET_ADMIN --ip=192.168.103.44 \
--restart=always -itd technoexpress/freepbx

It shows

/Downloads/technoexpress_freepbx$ sudo docker ps
CONTAINER ID   IMAGE                     COMMAND                  CREATED         STATUS         PORTS                                                                                                                                                                                NAMES
fc1b762c38a8   technoexpress/freepbx     "/usr/bin/systemctl …"   8 seconds ago   Up 7 seconds   25/tcp, 80/tcp, 443/tcp, 465/tcp, 953/tcp, 2122/tcp, 53/udp, 5060-5063/tcp, 8001/tcp, 8003/tcp, 8088-8089/tcp, 5060-5063/udp, 9990/tcp, 9990/udp, 10000-10100/tcp, 10000-10100/udp   freepbx

But I cannot access the panel via https://192.168.103.44:9990.

Please help, followed readme, docker container is up and running but cannot access at IP:9000

I figured this out, I will document the things I noticed, but primarily to make use of the ports that are defined with EXPOSE in the Dockerfile you have to use -P in your run command, otherwise the webui cannot be accessed, and the default readme lists it as being at port 9000 but its actually port 9990

This Got me up and running:

docker run -P --name freepbx \
-v freepbx-etc:/etc \
-v freepbx-www:/var/www \
-v freepbx-log:/var/log \
-v freepbx-lib:/var/lib \
-v freepbx-home:/home \
-v /etc/resolv.conf:/etc/resolv.conf:ro \
--cap-add=NET_ADMIN --net=host \
--hostname=freepbx.example.com \
--restart=always -itd technoexpress/freepbx

https://IPADDRESS:9990
default login is: root / freepbx

Also if using -P to allow the webui to be accessed is a bad way of doing it, please let me know the better way, im still new to using docker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.