Giter VIP home page Giter VIP logo

docker-freepbx's Introduction

👋

I'm Dave, residing in the far west of Canada. In the 2000s I got fed up with my life working with computers and sold everything I owned, bought a bicycle, and rode it around the world. Eventually along the way I ran out of money, got married, and ended up moving back to Canada. You guessed it, I'm back in IT doing "good" for organizations around the world.

I'm using Github to share some of the work in use for clients, sanitized for public consumption. I like lightweight, highly configurable solutions that can meet more than a single use case.

I'm helping a limited number of teams and organizations. If you would like to have my help with your team and/or product, feel free to contact me.

If my open source projects are useful for your product/company you can also sponsor my work on them.

My website https://www.tiredofit.ca has more details.

docker-freepbx's People

Contributors

jmturner avatar joycebabu avatar mattcvincent avatar si458 avatar tiredofit avatar

Stargazers

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

Watchers

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

docker-freepbx's Issues

Cant create new extension with voicemail?

Hello,

I have successfully added a sipgate trunk but cant add a station with voicemail, should voicemail be available in this Docker image? Adding a station without VM works OK.

freepbx issue

can't start asterisk when building image from the Dockerfile

I'm trying to build an image from the Dockerfile and it's working but when I start the container I got the following error:

STARTING ASTERISK
./start_asterisk: line 45: /usr/sbin/safe_asterisk: No such file or directory
Asterisk Started
** [freepbx] Can't seem to start Asterisk.. Exitting
[cont-init.d] 10-freepbx: exited 1.
[cont-init.d] 99-container-init: executing... 
[cont-init.d] 99-container-init: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

** NO ISSUE** Thanks for the Docker

Just wanted to say thanks for the Docker, i have written a little xml to help users run and manage this docker from within the unraid UI. I have it running haven't had chance to test it fully yet. But
has to be one of the easiest ways of getting freepbx up and running

freepbx docker 1

freepbx docker 2

Thanks again

Marc

Looking for docker-compose complete example w/ rev. proxy

What I've got isn't hooking in to your compose file; could you provide a complete example using compose?

`version: "2"

services:
nginx:
restart: always
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/nginx/conf.d"
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "./volumes/proxy/certs:/etc/nginx/certs:ro"

nginx-gen:
restart: always
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./volumes/proxy/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
volumes_from:
- nginx
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf

letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes_from:
- nginx
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./volumes/proxy/certs:/etc/nginx/certs:rw"
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen

networks:
proxy-tier:
external:
name: nginx-proxy`

UCP failed to install on first setup

For some reason the UCP won't install on first setup?

but if you go into the GUI then install it manually from the Module Admin, it then installs without any issues?

Module pm2 successfully installed
Updating Hooks...Done
Resetting temporarily repository state
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...
    0 [>---------------------------]
  100 [---------------->-----------]
2018-11-14T15:37:03.515584217Z 
Finished setting permissions
Reloading FreePBX
Successfully reloaded
Edge repository temporarily enabled
No repos specified, using: [standard] from last GUI settings
2018-11-14T15:37:20.291126404Z 
Downloading module 'ucp'
Processing ucp
Downloading...
  200 [---->-----------------------]       0/4260245 [>---------------------------]   0%
  426816/4260245 [==>-------------------------]  10%
  852264/4260245 [=====>----------------------]  20%
 1279080/4260245 [========>-------------------]  30%
 1707264/4260245 [===========>----------------]  40%
 2132712/4260245 [==============>-------------]  50%
 2556792/4260245 [================>-----------]  60%
 2984976/4260245 [===================>--------]  70%
 3410388/4260245 [======================>-----]  80%
 3838608/4260245 [=========================>--]  90%
2018-11-14T15:37:30.282660460Z 
Finished downloading
Extracting...Done
Download completed in 40 seconds
Updating tables ucp_sessions...Done
Home directory [/home/asterisk/.npm] is not writable
Unable to install module ucp:
 - Failed to run installation scripts
Updating Hooks...Done
Resetting temporarily repository state
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...
 4260245/4260245 [============================] 100%    0 [>---------------------------]
  100 [---------------->-----------]
2018-11-14T15:41:14.399881306Z 
Finished setting permissions

Apply Configs Will Not Save.

I am trying to set this up on a Ubuntu Based VPS. On a new install I immediately get a "Apply Config" button. It pops the "Restarting" Dialog up and then goes nowhere. I left that going for about 20 mins at one point. I can referesh the page and the settings seem to have applied. But nothing actually works.

  1. I tried recreating the containers
  2. I tried Deleting all the data folders and recreating.
  3. I tried Deleting all the data and removing the images to re-pull.

All three had the same result. Can not apply settings.

version: '2'

services:
  freepbx-app:
	container_name: freepbx-app
	image: tiredofit/freepbx
	ports:
	 #### If you aren't using a reverse proxy
	  - 8002:80
	 #### If you want SSL Support and not using a reverse proxy
	 #- 443:443
	  - 5060:5060
	  - 5160:5160
	  - 18000-18100:18000-18100/udp
	 #### Flash Operator Panel
	  - 4445:4445
	volumes:
	  - ./certs:/certs
	  - ./data:/data
	  - ./logs:/var/log
	  - ./data/www:/var/www/html
	 ### Only Enable this option below if you set DB_EMBEDDED=TRUE
	 #- ./db:/var/lib/mysql
	 ### You can drop custom files overtop of the image if you have made modifications to modules/css/whatever - Use with care
	 #- ./assets/custom:/assets/custom

	environment:
	  - VIRTUAL_HOST=voice.####.com
	  - VIRTUAL_NETWORK=nginx-proxy
	 ### If you want to connect to the SSL Enabled Container
	 #- VIRTUAL_PORT=443
	 #- VIRTUAL_PROTO=https
	  - VIRTUAL_PORT=80
	  - LETSENCRYPT_HOST=voice.####.com
	  - LETSENCRYPT_EMAIL=####

	  - ZABBIX_HOSTNAME=freepbx-app

	  - RTP_START=18000
	  - RTP_FINISH=18100

	 ## Use for External MySQL Server
	  - DB_EMBEDDED=FALSE

	 ### These are only necessary if DB_EMBEDDED=FALSE
	  - DB_HOST=freepbx-db
	  - DB_PORT=3306
	  - DB_NAME=asterisk
	  - DB_USER=asterisk
	  - DB_PASS=####

	 ### If you are using TLS Support for Apache to listen on 443 in the container drop them in /certs and set these:
	 #- TLS_CERT=cert.pem
	 #- TLS_KEY=key.pem

	restart: always
	networks:
	  - proxy-tier

	### These final lines are for Fail2ban. If you don't want, comment and also add ENABLE_FAIL2BAN=FALSE to your environment
	cap_add:
	  - NET_ADMIN
	privileged: true

  freepbx-db:
	container_name: freepbx-db
	image: tiredofit/mariadb
	restart: always
	volumes:
	  - ./db:/var/lib/mysql
	environment:
	  - MYSQL_ROOT_PASSWORD=password
	  - MYSQL_DATABASE=asterisk
	  - MYSQL_USER=asterisk
	  - MYSQL_PASSWORD=####
	networks:
	  - proxy-tier

  freepbx-db-backup:
	container_name: freepbx-db-backup
	image: tiredofit/db-backup
	links:
	 - freepbx-db
	volumes:
	  - ./dbbackup:/backup
	environment:
	  - ZABBIX_HOSTNAME=freepbx-db-backup
	  - DB_HOST=freepbx-db
	  - DB_TYPE=mariadb
	  - DB_NAME=asterisk
	  - DB_USER=asterisk
	  - DB_PASS=####
	  - DB_DUMP_FREQ=1440
	  - DB_DUMP_BEGIN=0000
	  - DB_CLEANUP_TIME=8640
	  - COMPRESSION=BZ
	  - MD5=TRUE
	networks:
	  - proxy-tier
	restart: always

networks:
  proxy-tier:
	external:
	  name: ee-global-frontend-network

Getting an error - Starting Apache httpd web server: apache2 failed!

Fresh install but using this branch of asterisk.

Dockerfile changes:

### Set Defaults
   ENV DB_EMBEDDED=TRUE \
       ENABLE_CRON=TRUE \
       ENABLE_SMTP=TRUE \
       ASTERISK_VERSION=13 \
       BCG729_VERSION=1.0.4 \
       UCP_FIRST=TRUE
.
.
.
### Build Asterisk
       cd /usr/src ; \
#       curl -sSL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-${ASTERISK_VERSION}-current.tar.gz | tar xvfz - -C /usr/src/ ; \
       git clone -b gvsip https://github.com/naf419/asterisk.git /usr/src/asterisk-${ASTERISK_VERSION} ; \
       cd /usr/src/asterisk-${ASTERISK_VERSION}*/ ; \

Please advise:

docker run -itd \
--name=freepbx \
--net=host \
--restart unless-stopped \
-v /home/rancher/freepbx/certs:/certs \
-v /home/rancher/freepbx/data:/data \
-v /home/rancher/freepbx/logs:/var/log/ \
-v /home/rancher/freepbx/data/www:/var/www/html \
-v /home/rancher/freepbx/db:/var/lib/mysql \
-v /home/rancher/freepbx/assets:/assets/custom \
-e DB_EMBEDDED=TRUE \
-e ENABLE_FAIL2BAN=FALSE \
wicadmin/freepbx
root@pbx:/# service apache2 start
[FAIL] Starting Apache httpd web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:1
AH00014: Configuration check failed
Action 'configtest' failed.
The Apache error log may have more information.

Cron line added didn't remain in crontab on final check.

Hey!
I'm looking into using these containers in prod and while testing them out I keep getting this error whenever I try applying any changes

exit: 1 Unable to continue. Cron line added didn't remain in crontab on final check. Check /tmp/cron.error for reason. in /var/www/html/admin/libraries/BMO/Cron.class.php on line 128 #0 /var/www/html/admin/modules/dashboard/Dashboard.class.php(126): FreePBX\Cron->addLine('* * * * * [ -x ...') #1 /var/www/html/admin/libraries/BMO/DialplanHooks.class.php(107): Dashboard->doDialplanHook(Object(extensions), 'asterisk', 500) #2 /data/var/lib/asterisk/bin/retrieve_conf(860): FreePBX\DialplanHooks->processHooks('asterisk', Array) #3 {main}

/tmp/cron.error content is
/var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied /var/spool/cron/: mkstemp: Permission denied

I'm running the container on a Kubernetes cluster, volumes are bindmounted from the host

if I run fwconsole reload manually it seems to work fine, looks like it's only when invoked via the web UI

I'll gladly supply more information as needed.

Permission denied on /etc/amportal.conf on first start

After I first start the server, I get this error when I open the http interface: file(/etc/amportal.conf): failed to open stream: Permission denied

This matches the permissions on the file:

root@83d4a48d1d8f:/# ls -la /etc/amportal.conf 
lrwxrwxrwx 1 asterisk asterisk 23 Apr  5 04:18 /etc/amportal.conf -> /data/etc/amportal.conf
root@83d4a48d1d8f:/# ls -la /data/etc/amportal.conf
-rw-rw---- 1 root root 19017 Apr  5 16:48 /data/etc/amportal.conf

As soon as I restart the server, the issue is magically fixed:

root@83d4a48d1d8f:/# ls -la /etc/amportal.conf 
lrwxrwxrwx 1 asterisk asterisk 23 Apr  5 04:18 /etc/amportal.conf -> /data/etc/amportal.conf
root@83d4a48d1d8f:/# ls -la /data/etc/amportal.conf
-rw-rw---- 1 asterisk asterisk 19017 Apr  5 16:57 /data/etc/amportal.conf

UPCOMING BREAKING IMAGE CHANGES

To all,
In the coming days I will release a new series of images that track Asterisk 16 and Freepbx 15.
Your existing installations will not automatically upgrade to this version as jumping from major releases will introduce breakages. I have created a new branch 14 which tracks the present day version using Asterisk 14.78 and Freepbx 14.

I strongly urge all users ahead of time to alter their configuration files when launching this container to pull from tiredofit/freepbx:14-latest as opposed to tiredofit/freepbx:latest.

If you do not do this the next time you pull the image you will be presented with an error message causing the container not to function until you make this manual change. At present time I haven't figured out a way to do an automatic in place upgrade to support this change.

I will continue to maintain the 14 branch for a period of time yet will be investing most efforts into keeping the new release up to date.

I will update this thread upon any new news.

Apache does not start

Hey,

I wanted to run This docker file included an internal database
I installed it by rewriting a bit of your docker-compose file.

`version: '2'

services:
  freepbx-app:
    container_name: freepbx-app
    image: tiredofit/freepbx
    ports:
     #### If you aren't using a reverse proxy
     #- 80:80
     #### If you want SSL Support and not using a reverse proxy
     #- 443:443
      - 5060:5060
      - 5160:5160
      - 18000-18100:18000-18100/udp
     #### Flash Operator Panel
      - 4445:4445
    volumes:
      - ./certs:/certs
      - ./data:/data
      - ./logs:/var/log
      - ./data/www:/var/www/html
     ### Only Enable this option below if you set DB_EMBEDDED=TRUE
     #- ./db:/var/lib/mysql
     ### You can drop custom files overtop of the image if you have made modifications to modules/css/whatever - Use with care
     #- ./assets/custom:/assets/custom

environment: 
  - VIRTUAL_HOST=voip.xx.nl
  - VIRTUAL_NETWORK=nginx-proxy
 ### If you want to connect to the SSL Enabled Container 
 #- VIRTUAL_PORT=443
 #- VIRTUAL_PROTO=https
  - VIRTUAL_PORT=80
  - LETSENCRYPT_HOST=voip.xx.nl
  - [email protected]

  - ZABBIX_HOSTNAME=freepbx-app

  - RTP_START=18000
  - RTP_FINISH=18100

 ## Use for External MySQL Server
  - DB_EMBEDDED=FALSE

 ### These are only necessary if DB_EMBEDDED=FALSE
  - DB_HOST=freepbx-db
  - DB_PORT=3306
  - DB_NAME=asterisk
  - DB_USER=asterisk
  - DB_PASS=asteriskpass

 ### If you are using TLS Support for Apache to listen on 443 in the container drop them in /certs and set these:
 #- TLS_CERT=cert.pem
 #- TLS_KEY=key.pem
 
restart: always
networks:
  - proxy-tier

### These final lines are for Fail2ban. If you don't want, comment and also add ENABLE_FAIL2BAN=FALSE to your environment
cap_add:
  - NET_ADMIN
privileged: true

freepbx-db:
container_name: freepbx-db
image: tiredofit/mariadb
restart: always
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=asterisk
- MYSQL_USER=asterisk
- MYSQL_PASSWORD=asteriskpass
networks:
- proxy-tier

freepbx-db-backup:
container_name: freepbx-db-backup
image: tiredofit/db-backup
links:
- freepbx-db
volumes:
- ./dbbackup:/backup
environment:
- ZABBIX_HOSTNAME=freepbx-db-backup
- DB_HOST=freepbx-db
- DB_TYPE=mariadb
- DB_NAME=asterisk
- DB_USER=asterisk
- DB_PASS=asteriskpass
- DB_DUMP_FREQ=1440
- DB_DUMP_BEGIN=0000
- DB_CLEANUP_TIME=8640
- COMPRESSION=BZ
- MD5=TRUE
networks:
- proxy-tier
restart: always

networks:
proxy-tier:
external:
name: nginx-proxy`

Then I ran:

docker-compose up -d

When I ssh'ed the docker container I get this error:

[FAIL] Starting Apache httpd web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
AH00558: apache2: Could not reliably determine the server's fully qualified doma                                                                                                                                  in name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress t                                                                                                                                  his message
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2                                                                                                                                  /' for main error log
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2                                                                                                                                  /' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf                                                                                                                                  :1
AH00014: Configuration check failed
Action 'configtest' failed.
The Apache error log may have more information.

Install on NAS QNAP TS-431P2

I'm trying to install it but I have the following error:

Background task error for create freepbx-1: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=90)

Thanks

unable to install xmpp because mongodb is missing

when you try installing the xmpp extension it will fail because mongodb is missing

is it possible to include this in the image at all?

root@dc50f5977496:/home/asterisk# fwconsole ma downloadinstall xmpp
No repos specified, using: [standard] from last GUI settings
Downloading module 'xmpp'
Processing xmpp
Verifying local module download...Verified
Extracting...Done
Download completed in 2 seconds
MongoDB is not installed
Unable to install module xmpp:
 - Failed to run installation scripts
Updating Hooks...Done

Fop wont't save any user

Hi,
Thanks for the great Container and all your work. Everthing works great so far, except for fop.

I am logged in info freepbx and open /fop/admin in order to create a user for fop (existing Extension), but although it says user XX added, no user is shown and I cannot login.

Latest version (Asterisk 16) [freepbx] ERROR - This container has been detected to have FreePBX 14 installed

Hello.

I've download the lastest version of the docker image (asterisk 16) and the logs says:

Container


freepbx-app          | ** [freepbx] ERROR - This container has been detected to have FreePBX 14 installed
freepbx-app          | ** [freepbx] ERROR - You cannot perform an inplace upgrade to FreePBX 15 and Asterisk 16
freepbx-app          | ** [freepbx] ERROR - To continue using this image switch to using tiredofit/freepbx:14-latest
freepbx-app          | ** [freepbx] ERROR - See https://github.com/tiredofit/docker-freepbx/issues/51 for more details
freepbx-app          | ** [freepbx] ERROR - This container will now cease to function
freepbx-app          | **
freepbx-app          | [cont-init.d] 10-freepbx: exited 1.

I've deleted everything (docker system prune -a) of the last conainers and also i've modify the docker-compose.yml file like to file of this repo and I add image: tiredofit/freepb:latest, but I have the same result.

My system:
Docker version 18.09.1, build 4c52b90
docker-compose version 1.21.2, build a133471

Best regards.

Install on Synology DS916+ NAS

Hi,

I have tried installing this multiple times and only managed to see freepbx being pulled once, only to see that the core module does not install once I login to the web console. During all other times, the instance just throws keep alive events and does not pull the freepbx binaries to install (have kept it running over night so its not time related). Am I doing something wrong here? Have attached the log for your reference. Thank you in advance for your help!

tiredofit-freepbx2 (1).txt

How to access FreePBX?

Hi, this is my first attempt at using Asterisk/FreePBX and I followed the instructions as best as I could.
Here is the command I used with an empty /docker/freepbx directory:

docker run -d \
  --name freepbx \
  --restart=always \
  --net=host \
  --privileged \
  -v /docker/freepbx/certs:/certs \
  -v /docker/freepbx/www:/www/freepbx \
  -v /docker/freepbx/log:/var/log/ \
  -v /docker/freepbx/data:/data \
  -e DB_EMBEDDED=TRUE \
  tiredofit/freepbx

If I then go to log in I simply get:

Apache2 Debian Default Page

Is there something I am missing?

Not able to make calls

Hi,
Using the "almost" standard configuration from suggestions, I still cannot make calls. Here are some logs during intra-extensions calls. I appreciate if you can point out if its a mistake on my configuration.

-- Executing [s@macro-dial-one:51] NoOp("SIP/400-000030f4", "") in new stack
    -- Executing [s@macro-dial-one:52] Dial("SIP/400-000030f4", "SIP/500,,HhTtrIb(func-apply-sipheaders^s^1)") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- SIP/500-000030f5 Internal Gosub(func-apply-sipheaders,s,1) start
    -- Executing [s@func-apply-sipheaders:1] NoOp("SIP/500-000030f5", "Applying SIP Headers to channel") in new stack
    -- Executing [s@func-apply-sipheaders:2] Set("SIP/500-000030f5", "SIPHEADERKEYS=") in new stack
    -- Executing [s@func-apply-sipheaders:3] While("SIP/500-000030f5", "0") in new stack
    -- Jumping to priority 6
    -- Executing [s@func-apply-sipheaders:7] Return("SIP/500-000030f5", "") in new stack
  == Spawn extension (from-internal, 500, 1) exited non-zero on 'SIP/500-000030f5'
    -- SIP/500-000030f5 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
    -- Called SIP/500
    -- Connected line update to SIP/400-000030f4 prevented.
    -- Connected line update to SIP/400-000030f4 prevented.
    -- SIP/500-000030f5 is ringing
       > 0x7fe08c009f90 -- Strict RTP learning after remote address set to: 10.0.4.150:16400
    -- Connected line update to SIP/400-000030f4 prevented.
    -- SIP/500-000030f5 answered SIP/400-000030f4
    -- Channel SIP/500-000030f5 joined 'simple_bridge' basic-bridge <91c72704-da14-4652-a996-cdadcc492d49>
    -- Channel SIP/400-000030f4 joined 'simple_bridge' basic-bridge <91c72704-da14-4652-a996-cdadcc492d49>
[2018-04-08 10:28:03] NOTICE[5152]: chan_sip.c:29611 check_rtp_timeout: Disconnecting call 'SIP/400-000030f4' for lack of RTP activity in 31 seconds
[2018-04-08 10:28:03] NOTICE[5152]: chan_sip.c:29611 check_rtp_timeout: Disconnecting call 'SIP/500-000030f5' for lack of RTP activity in 31 seconds
    -- Channel SIP/400-000030f4 left 'simple_bridge' basic-bridge <91c72704-da14-4652-a996-cdadcc492d49>
    -- Channel SIP/500-000030f5 left 'simple_bridge' basic-bridge <91c72704-da14-4652-a996-cdadcc492d49>
  == Spawn extension (macro-dial-one, s, 52) exited non-zero on 'SIP/400-000030f4' in macro 'dial-one'
  == Spawn extension (macro-exten-vm, s, 14) exited non-zero on 'SIP/400-000030f4' in macro 'exten-vm'
  == Spawn extension (from-internal, 500, 2) exited non-zero on 'SIP/400-000030f4'
    -- Executing [h@from-internal:1] Macro("SIP/400-000030f4", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/400-000030f4", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("SIP/400-000030f4", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("SIP/400-000030f4", "SIP/500-000030f5 monior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] AGI("SIP/400-000030f4", "attendedtransfer-rec-restart.php,SIP/500-000030f5,") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
    -- <SIP/400-000030f4>AGI Script attendedtransfer-rec-restart.php completed, returning 0
    -- Executing [s@macro-hangupcall:6] Hangup("SIP/400-000030f4", "") in new stack
  == Spawn extension (macro-hangupcall, s, 6) exited non-zero on 'SIP/400-000030f4' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/400-000030f4'
[2018-04-08 10:28:04] WARNING[5152]: chan_sip.c:4077 retrans_pkt: Retransmission timeout reached on transmission lC2NwJbGosBXLyvMRQHgUQ.. for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response

Stock MSMTP Doesn't Work

When using the MSMTP environment variables from the base image with gmail, configuration changes have to be made to get it to work:
auto_from on has to be added to /etc/msmtp
/etc/msmtp has to be owned by asterisk and permissions have to be set to 600

Please add an environment variable to support gmail with msmtp

SQL Error Select when install FOP

Hello, created again the docker-compose, when i run:

docker-compose up -d && docker-compose logs -f

I can see the next errors

freepbx-app          | Table fop2managerUserContext created successfully
freepbx-app          |
freepbx-app          | ┌──────────────────────────────────────────────────────────────────────────────┐
freepbx-app          | │ literal                                                                      │
freepbx-app          | └──────────────────────────────────────────────────────────────────────────────┘
freepbx-app          | string (195) "256, SQL Error: SELECT id,keyword,data FROM asterisk.queues_details   WHERE keyword in ('strategy','member')
freepbx-app          | Table 'asterisk.queues_details' doesn't exist (/var/www/html/fop2/admin/dblib.php, 108"
freepbx-app          | ════════════════════════════════════════════════════════════════════════════════
freepbx-app          | Called from .../functions.php:2573 [fop2manager_error()]
freepbx-app          |
freepbx-app          | ┌──────────────────────────────────────────────────────────────────────────────┐
freepbx-app          | │ literal                                                                      │
freepbx-app          | └──────────────────────────────────────────────────────────────────────────────┘
freepbx-app          | string (195) "256, SQL Error: SELECT id,keyword,data FROM asterisk.queues_details   WHERE keyword in ('strategy','member')
freepbx-app          | Table 'asterisk.queues_details' doesn't exist (/var/www/html/fop2/admin/dblib.php, 108"
freepbx-app          | ════════════════════════════════════════════════════════════════════════════════
freepbx-app          | Called from .../functions.php:2573 [fop2manager_error()]
freepbx-app          | Updating buttons for context GENERAL
freepbx-app          |
freepbx-app          | ┌──────────────────────────────────────────────────────────────────────────────┐
freepbx-app          | │ literal                                                                      │
freepbx-app          | └──────────────────────────────────────────────────────────────────────────────┘
freepbx-app          | string (195) "256, SQL Error: SELECT id,keyword,data FROM asterisk.queues_details   WHERE keyword in ('strategy','member')
freepbx-app          | Table 'asterisk.queues_details' doesn't exist (/var/www/html/fop2/admin/dblib.php, 108"
freepbx-app          | ════════════════════════════════════════════════════════════════════════════════
freepbx-app          | Called from .../functions.php:2573 [fop2manager_error()]
freepbx-app          |
freepbx-app          | ┌──────────────────────────────────────────────────────────────────────────────┐
freepbx-app          | │ literal                                                                      │
freepbx-app          | └──────────────────────────────────────────────────────────────────────────────┘
freepbx-app          | string (195) "256, SQL Error: SELECT id,keyword,data FROM asterisk.queues_details   WHERE keyword in ('strategy','member')
freepbx-app          | Table 'asterisk.queues_details' doesn't exist (/var/www/html/fop2/admin/dblib.php, 108"
freepbx-app          | ════════════════════════════════════════════════════════════════════════════════
freepbx-app          | Called from .../functions.php:2573 [fop2manager_error()]
freepbx-app          |
freepbx-app          | Finished!
freepbx-app          | Restarting Flash Operator Panel 2: fop2.
freepbx-app          | ** [freepbx] Setting Configuration

Docker version

Docker version 18.09.0, build 4d60db4

docker-compose version 1.21.2, build a133471

can't install core

Downloading module 'core'
Processing core
Verifying local module download...Verified
Extracting...Done
Download completed in 1 seconds
Checking if directdids need migrating..already done
updating zap callgroup, pickupgroup..not needed
checking for delay_answer field ..fatal error
Unable to install module core:
 - Failed to run installation scripts

Can't change UI language

I installed everything and it's working but when I tried to switch UI language except English nothing works.
screen shot 2018-10-05 at 10 29 46 pm

Error when open or close some RTP ports

I used the docker-compose file example, but when i try to modify RTP ports the conainer never start up.

This is my RTP configuration:



   ports:
      - 18000-19999:18000-19999/udp
   environment:
      - RTP_START=18000
      - RTP_FINISH=19999

The console error is:

ERROR: for freepbx-app UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

If I try with the example ports 18000-18100 and exec the "docker ps", the result is:

e4f5d090028a tiredofit/freepbx "/init" 18 seconds ago Up 9 seconds 80/tcp, 443/tcp, 1025/tcp, 4569/tcp, 5060/tcp, 0.0.0.0:5060->5060/udp, 5160/tcp, 8001/tcp, 8003/tcp, 8008-8009/tcp, 8025/tcp, 0.0.0.0:5160->5160/udp, 10050/tcp, 0.0.0.0:4445->4445/tcp, 0.0.0.0:18000-18100->18000-18100/udp, 18101-20000/udp freepbx-app

You can see the 18101-20000 open ports.

I try change the RTP ports because the server work fine, I can connect extensions, but the calls don't have audio.

Please check that.

Best regards.

Rene

Illegal instruction - BUILD_NATIVE

I tried to use your container, on localhost it works pretty well, but when i try to use it on server it throwed error when you try run /usr/sbin/asterisk return Illegal instruction.
It is caused by compilation.
On my local i7 it works but on my VPS it doesn't.

It caused by build flags.

Related info -> https://stackoverflow.com/questions/19607378/illegal-instruction-error-comes-when-i-start-asterisk-1-8-22/19610145#19610145

Solution should be disabling BUILD_NATIVE in menuselect.

InnoDB error

Hi buddy,
First - thanks for taking the effort and putting this repository in place.
I'm looking for a quick way to test out VOIP for my home.
I ran the docker-compose, and keep getting this error in a loop:

"freepbx-app | ** [freepbx] MariaDB Server 'freepbx-db' unavailable. Sleeping a little bit ...
freepbx-db | ** [mariadb] Starting MariaDB 10.3.9
freepbx-db | 2018-12-01 1:17:29 0 [Note] /usr/bin/mysqld (mysqld 10.3.9-MariaDB) starting as process 9871 ...
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Using Linux native AIO
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Uses event mutexes
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Number of pools: 1
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Using SSE2 crc32 instructions
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Completed initialization of buffer pool
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Starting shutdown...
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Plugin 'InnoDB' init function returned error.
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Unknown/unsupported storage engine: InnoDB
freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Aborting"

Image Tags

Hi!
I was a bit confused by the image tags.
Readme:

15 - Asterisk 16, Freepbx 15 - Debian Stretch
14 - Asterisk 14, Freepbx 14 - Debian Stretch
latest - Asterisk 16, Freepbx 15 - Debian Stretch 

https://hub.docker.com/r/tiredofit/freepbx/tags:

3.*
2.*
14-*

I'd suggest having either 15, 14 ... or 2, 3 ...
It would also be nice to have 15 always be the newest release of the 15 image and have 15.x.y available for more specific versions like redis does for example: https://hub.docker.com/_/redis

Brand new deployment on CentOS 7, doesn't work

When running docker-compose up, I get:

freepbx-db           | Version: '10.3.9-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Source distribution
freepbx-app          | .
freepbx-app          | [cont-init.d] 05-fail2ban: exited 0.
freepbx-app          | [cont-init.d] 08-mongodb: executing...
freepbx-app          | [cont-init.d] 08-mongodb: exited 0.
freepbx-app          | [cont-init.d] 09-mariadb: executing...
freepbx-db-backup    | ** [db-backup] Initialized at at Thu Mar 7 11:10:30 PST 2019
freepbx-app          | [cont-init.d] 09-mariadb: exited 0.
freepbx-app          | [cont-init.d] 10-freepbx: executing...
freepbx-app          | ** [freepbx] Creating Default Configuration Files
freepbx-app          | ** [freepbx] Setting File Permissions
freepbx-app          | ** [freepbx] New Install Detected - Please wait while we fetch FreePBX - Will take 3 to 30 minutes!
freepbx-app          | ** [freepbx] Starting Asterisk for the first time..
freepbx-app          | ** [freepbx] Installing FreePBX source code
**freepbx-app          | ** [freepbx] Can't seem to locate /usr/sbin/fwconsole.. Exitting
freepbx-app          | [cont-init.d] 10-freepbx: exited 1.**
freepbx-app          | [cont-init.d] 99-container-init: executing...
freepbx-app          | [cont-init.d] 99-container-init: exited 0.
freepbx-app          | [cont-init.d] done.
freepbx-app          | [services.d] starting services
freepbx-app          | [services.d] done.
freepbx-app          |
freepbx-app          | **** [zabbix] Starting Zabbix Agent
freepbx-app          |
freepbx-app          | ** [cron] Starting cron

I'm not sure how to begin troubleshooting this. Thoughts?

Thanks for the help!

No Conference Room App

from GUI


Critical Errors found
Please check for errors in the notification section

Neither app_meetme nor app_confbridge is configured in Asterisk, conferencing, paging and other functionality will not work properly

from installation logs

**** [zabbix] Starting Zabbix Agent
 
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 10-freepbx: executing... 
Exception: SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/utility.functions.php on line 204
Stack trace:
  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:204
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:142
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:137
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:137
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:71
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:153
  7. require_once() /etc/freepbx.conf:13
  8. include_once() /data/var/lib/asterisk/bin/fwconsole:12
s6-maximumtime: warning: unable to wait for child process: Operation timed out
Stopping Apache httpd web server: apache2[cont-finish.d] 10-freepbx: exited 99.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
 

No CDR

I configured this docker with embedded DB, but there is NO cdr recorded after making some calls.

Another issue is apache service NOT started after restarting the docker.

service doesn't come up when reboot server

when reboot the server DB and Freepbx containers are running but it has a connection issue to the DB.

Here is the log from Freepbx container:

** [freepbx] MariaDB Server 'freepbx-db' unavailable. Sleeping a little bit ...

Here is the log from the DB:

s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise 02-zabbix: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise 10-mariadb: warning: unable to spawn ./run - waiting 10 seconds

cannot use this image with the proposed compose

I'm trying to use your image with the proposed docker compose file and this is where I'm stuck:

freepbx-app    | STARTING ASTERISK
freepbx-app    | cat: /var/run/asterisk/asterisk.pid: No such file or directory
freepbx-app    | cat: /var/run/asterisk/asterisk.pid: No such file or directory
freepbx-app    | Asterisk Started
freepbx-app    | ** [freepbx] Installing FreePBX
freepbx-app    | Checking if SELinux is enabled...Its not (good)!
freepbx-app    | Reading /etc/asterisk/asterisk.conf...Done
freepbx-app    | Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Error!
freepbx-app    | Error communicating with Asterisk.  Ensure that Asterisk is properly installed and running as the asterisk user
freepbx-app    | Asterisk does not appear to be running
freepbx-app    | Try starting Asterisk with the './start_asterisk start' command in this directory
freepbx-app    | ** [freepbx] Enabling Default Modules
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 110: fwconsole: command not found
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 111: fwconsole: command not found
freepbx-app    | ERROR 1050 (42S01) at line 1: Table 'cdr' already exists
freepbx-app    | ERROR 1146 (42S02) at line 1: Table 'asterisk.freepbx_settings' doesn't exist
freepbx-app    | cp: cannot stat '/www/freepbx/admin/modules/cdr/install.php': No such file or directory
freepbx-app    | sed: can't read /www/freepbx/admin/modules/cdr/install.php: No such file or directory
freepbx-app    | sed: can't read /www/freepbx/admin/modules/cdr/install.php: No such file or directory
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 118: fwconsole: command not found
freepbx-app    | cp: cannot stat '/www/freepbx/admin/modules/cdr/.install.php': No such file or directory
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 120: fwconsole: command not found
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 121: fwconsole: command not found
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 122: fwconsole: command not found
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 123: fwconsole: command not found
freepbx-app    | /var/run/s6/etc/cont-init.d/10-nginx: line 124: fwconsole: command not found
freepbx-app    | ln: failed to create symbolic link '/usr/sbin/fwconsole': File exists
freepbx-app    | ln: failed to create symbolic link '/usr/sbin/amportal': File exists
freepbx-app    | ln: failed to create symbolic link '/etc/amportal.conf': File exists
freepbx-app    | ** [freepbx] Setting Configuration
freepbx-app    | ** [freepbx] Set RTP Ports
freepbx-app    | ERROR 1146 (42S02) at line 1: Table 'asterisk.sipsettings' doesn't exist
freepbx-app    | ERROR 1146 (42S02) at line 1: Table 'asterisk.featurecodes' doesn't exist
freepbx-app    | ** [freepbx] Starting Asterisk]
freepbx-app    | [cont-init.d] 10-nginx: exited 0.
freepbx-app    | [cont-init.d] 20-php-fpm: executing...
freepbx-app    | [cont-init.d] 20-php-fpm: exited 0.
freepbx-app    | [cont-init.d] 99-container-init: executing...
freepbx-app    | [cont-init.d] 99-container-init: exited 0.
freepbx-app    | [cont-init.d] done.
freepbx-app    | [services.d] starting services
freepbx-app    | [services.d] done.
freepbx-app    | cat: /var/run/asterisk/asterisk.pid: No such file or directory

Logrotate two times via crontab and anacron give a conflict

Logrotation of /var/log/apache is defined

  1. via crontab (see crontab -e)
  2. via /etc/cond.daily/apache

Theese two systems work in same directory and rotate there file each other. Very confusing. This triggers high load of CPU and in filesystem.

A decision is needed about witch system to use in future.

Record() application produces muted audio files

Hello. Thanks for your great work!. I'm using asterisk-java to control freepbx through AGI/AMI and I have a full application which works well with the FreePBX ISO available at freepbx.org. Now I'm switching to your docker image to ease my automation setup but I'm not able to record audio using the record dialplan application though AGI interface:

  • Asterisk produces muted WAV files with 44 bytes size
  • I switched to ulaw audio format but this time, asterisk produced ULAW files with 0 bytes size
  • There are no recording related messages in asterisk full log

¿maybe missing codecs in the docker image asterisk setup?

PFA a couple of sample audio files recorded with this problem. Thank you!

audio-samples.zip

ivr module support?

i installed the ivr module and uploaded a custom recording, but i can't get it to play. when asterisk answers the call, it just goes to silence and the ivr doesn't actually work...is there any way to get the ivr module working with this image?

Docker Compose

Hello,

I would like to use your container, having some issues running it from scratch, could you please update the broken links on the documentation with the docker-compose.yml files ? and maybe a hint on how to run it manually ?

Thanks a lot.

Cannot deploy

I'm having several errors trying to deploy this on docker, also I'm always greeted with the "It works!" page on Apache.

First I create the appropriate volumes.

Then I deploy your mariadb image:
docker run -d --name freepbxdb -e MYSQL_ROOT_PASSWORD=passwordhere -e MYSQL_DATABASE=asterisk -e MYSQL_USER=asterisk -e MYSQL_PASSWORD=rootpasswordhere -v mariadb:/var/lib/mysql tiredofit/mariadb

And finally the FreePBX container:
docker run -d --name freepbxapp -e DB_EMBEDDED=FALSE -e ZABBIX_HOSTNAME=freepbx-app -e RTP_START=18000 -e RTP_FINISH=20000 -e DEBUG_MODE=TRUE -e DB_HOST=freepbxdb -e DB_NAME=asterisk -e DB_USER=asterisk -e DB_PASS=passwordhere -v freepbx-certs:/certs -v freepbx-web:/www/freepbx -v freepbx-logs:/www/logs -v freepbx-data:/data --link freepbxdb:freepbxdb -p 8000:80 -p 4569:4569 -p 5060:5060/udp -p 5160:5160 -p 18000-20000:18000-20000/udp tiredofit/freepbx

I have a couple of test images and portainer installed.

Docker log output:

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-zabbix: executing...
[cont-init.d] 01-zabbix: exited 0.
[cont-init.d] 02-cron: executing...
**** [cron] Disabling Cron
[cont-init.d] 02-cron: exited 0.
[cont-init.d] 03-smtp: executing...
**** [smtp] Disabling SMTP Features
[cont-init.d] 03-smtp: exited 0.
[cont-init.d] 04-fail2ban: executing...

** [fail2ban] Starting Fail2ban
Starting authentication failure monitor: fail2ban.
[cont-init.d] 04-fail2ban: exited 0.
[cont-init.d] 09-mariadb: executing...
[cont-init.d] 09-mariadb: exited 0.
[cont-init.d] 10-freepbx: executing...
+ [[ FALSE = \T\R\U\E ]]
+ DB_EMBEDDED=FALSE
+ '[' FALSE = FALSE ']'
+ '[' '!' -n DB_HOST ']'
+ '[' '!' -n DB_NAME ']'
+ '[' '!' -n DB_USER ']'
+ '[' '!' -n DB_PASS ']'
+ DB_PORT=3306
+ RTP_START=18000
+ RTP_END=20000
+ '[' FALSE = FALSE ']'
+ true
+ mysqlcmd='mysql -uasterisk -hfreepbxdb -pswIdPmOvKYoL'
++ mysql -uasterisk -hfreepbxdb -pswIdPmOvKYoL -e 'SELECT COUNT(*) FROM information_schema.FILES;'
+ out='COUNT(*)
0'
+ echo 'COUNT(*)
0'
+ grep -E 'COUNT|Enter'
+ '[' 0 -eq 0 ']'
+ echo '** [freepbx] DB Server is available !'
+ break
+ '[' '!' -f /data/.installed ']'
** [freepbx] DB Server is available !
** [freepbx] Creating Default Configuration Files
+ echo '** [freepbx] Creating Default Configuration Files'
+ cp -R /assets/config/home /assets/config/var /data/
** [freepbx] Setting File Permissions
+ echo '** [freepbx] Setting File Permissions'
+ mkdir -p /data/etc/asterisk
+ mkdir -p /data/var/lib/asterisk/agi-bin /data/var/lib/asterisk/bin /data/var/lib/asterisk/playback
+ mkdir -p /data/var/spool/asterisk/dictate /data/var/spool/asterisk/meetme /data/var/spool/asterisk/monitor /data/var/spool/asterisk/recording /data/var/spool/asterisk/system /data/var/spool/asterisk/tmp /data/var/spool/asterisk/voicemail
+ mkdir -p /data/var/run/asterisk
+ chown -R asterisk:asterisk /data
+ '[' '!' -f /var/www/html/admin/index.php ']'
+ echo '** [freepbx] New Install Detected - Please wait while we fetch FreePBX...'
+ '[' FALSE = FALSE ']'
** [freepbx] New Install Detected - Please wait while we fetch FreePBX...
+ cat
+ sudo -u asterisk gpg --refresh-keys --keyserver pgp.mit.edu
+ sudo -u asterisk gpg --keyserver pgp.mit.edu --recv-key 9F9169F4B33B4659
+ sudo -u asterisk gpg --keyserver pgp.mit.edu --recv-key 3DDB2122FE6D84F7
+ sudo -u asterisk gpg --keyserver pgp.mit.edu --recv-key 86CE877469D2EAD9
+ cd /usr/src
+ git clone -b release/14.0 --single-branch https://github.com/FreePBX/framework.git freepbx
+ cd /usr/src/freepbx
+ cp -R /etc/odbc.ini /usr/src/freepbx/installlib/files/odbc.ini
+ ./start_asterisk start


STARTING ASTERISK
/usr/sbin/safe_asterisk: 96: ulimit: error setting limit (Operation not permitted)
cat: /var/run/asterisk/asterisk.pid: No such file or directory
cat: /var/run/asterisk/asterisk.pid: No such file or directory
Asterisk Started
+ '[' FALSE = FALSE ']'
+ sed -i -e 's/$amp_conf\['\''AMPDBHOST'\''\] = '\''localhost'\'';/$amp_conf\['\''AMPDBHOST'\''\] = '\''freepbxdb'\'';/g' /usr/src/freepbx/installlib/installcommand.class.php
+ sed -i -e 's/$amp_conf\['\''CDRDBNAME'\''\] : '\''asteriskcdrdb'\'',/$amp_conf\['\''CDRDBNAME'\''\] : '\''asterisk'\'',/g' /usr/src/freepbx/installlib/installcommand.class.php
+ sed -i -e 's/$amp_conf\['\''CDRDBNAME'\''\] : '\''asteriskcdrdb'\'',/$amp_conf\['\''CDRDBNAME'\''\] : '\''asterisk'\'',/g' /usr/src/freepbx/amp_conf/htdocs/admin/bootstrap.php
** [freepbx] Installing FreePBX
+ echo '** [freepbx] Installing FreePBX'
+ '[' FALSE = FALSE ']'
+ ./install -n --dbuser=asterisk --dbpass=swIdPmOvKYoL --dbname=asterisk --cdrdbname=asterisk --webroot=/var/www/html
Checking if SELinux is enabled...Its not (good)!
No /etc/asterisk/asterisk.conf file detected. Installing...Writing /etc/asterisk/asterisk.conf...Done
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Error!
Error communicating with Asterisk.  Ensure that Asterisk is properly installed and running as the asterisk user
Asterisk does not appear to be running
Try starting Asterisk with the './start_asterisk start' command in this directory
+ '[' FALSE = FALSE ']'
+ cat
** [freepbx] Enabling Default Modules
+ echo '** [freepbx] Enabling Default Modules'
+ fwconsole ma upgrade framework core
/var/run/s6/etc/cont-init.d/10-freepbx: line 130: fwconsole: command not found
+ fwconsole ma download cdr
/var/run/s6/etc/cont-init.d/10-freepbx: line 131: fwconsole: command not found
+ '[' FALSE = FALSE ']'
+ mysql -uasterisk -pswIdPmOvKYoL -hfreepbxdb asterisk
+ mysql -uasterisk -pswIdPmOvKYoL -hfreepbxdb -e 'USE asterisk; UPDATE freepbx_settings SET `value` = "freepbxdb" WHERE keyword = "CDRDBHOST"; UPDATE freepbx_settings SET `value` = "asterisk" WHERE keyword = "CDRDBNAME"; UPDATE freepbx_settings SET `value` = "swIdPmOvKYoL" WHERE keyword = "CDRDBPASS"; UPDATE freepbx_settings SET `value` = "asterisk" WHERE keyword = "CDRDBUSER"; UPDATE freepbx_settings SET `value` = "mysql" WHERE keyword = "CDRDBTYPE"; UPDATE freepbx_settings SET `value` = "3306" WHERE keyword = "CDRDBPORT"; UPDATE freepbx_settings SET `value` = "cdr" WHERE keyword = "CDRDBTABLENAME";'
ERROR 1146 (42S02) at line 1: Table 'asterisk.freepbx_settings' doesn't exist
+ cp -R /var/www/html/admin/modules/cdr/install.php /var/www/html/admin/modules/cdr/.install.php
cp: cannot stat '/var/www/html/admin/modules/cdr/install.php': No such file or directory
+ sed -i -e 's/\$db_host = !empty(\$db_host) ? \$db_host : "localhost";/\$db_host = !empty(\$db_host) ? \$db_host : "freepbxdb";/g' /www/freepbx/admin/modules/cdr/install.php
sed: can't read /www/freepbx/admin/modules/cdr/install.php: No such file or directory
+ sed -i -e 's/\$db_name = !empty(\$db_name) ? \$db_name : "asteriskcdrdb";/\$db_name = !empty(\$db_name) ? \$db_name : "asterisk";/g' /www/freepbx/admin/modules/cdr/install.php
sed: can't read /www/freepbx/admin/modules/cdr/install.php: No such file or directory
+ fwconsole ma install cdr
/var/run/s6/etc/cont-init.d/10-freepbx: line 140: fwconsole: command not found
+ cp -R /var/www/html/admin/modules/cdr/.install.php /var/www/html/admin/modules/cdr/install.php
cp: cannot stat '/var/www/html/admin/modules/cdr/.install.php': No such file or directory
+ fwconsole ma upgrade voicemail sipsettings infoservices featurecodeadmin logfiles callrecording dashboard music conferences
/var/run/s6/etc/cont-init.d/10-freepbx: line 146: fwconsole: command not found
+ fwconsole ma upgrade certman userman pm2
/var/run/s6/etc/cont-init.d/10-freepbx: line 147: fwconsole: command not found
+ fwconsole chown
/var/run/s6/etc/cont-init.d/10-freepbx: line 148: fwconsole: command not found
+ fwconsole reload
/var/run/s6/etc/cont-init.d/10-freepbx: line 149: fwconsole: command not found
+ fwconsole ma upgrade ucp
/var/run/s6/etc/cont-init.d/10-freepbx: line 150: fwconsole: command not found
+ fwconsole chown
/var/run/s6/etc/cont-init.d/10-freepbx: line 151: fwconsole: command not found
+ fwconsole reload
/var/run/s6/etc/cont-init.d/10-freepbx: line 152: fwconsole: command not found
+ fwconsole restart
/var/run/s6/etc/cont-init.d/10-freepbx: line 153: fwconsole: command not found
+ fwconsole stop
/var/run/s6/etc/cont-init.d/10-freepbx: line 154: fwconsole: command not found
+ cd /
+ rm -rf /usr/src/freepbx
+ touch /data/.installed
+ '[' '!' -f /usr/sbin/fwconsole ']'
+ ln -s /var/lib/asterisk/bin/fwconsole /usr/sbin/fwconsole
+ '[' '!' -f /usr/sbin/amportal ']'
+ ln -s /var/lib/asterisk/bin/amportal /usr/sbin/amportal
+ '[' '!' -f /data/etc/amportal.conf ']'
+ mkdir -p /data/etc/
+ cp -R /etc/amportal.conf /data/etc/
cp: cannot stat '/etc/amportal.conf': No such file or directory
+ rm -rf /etc/amportal.conf
+ touch /data/etc/amportal.conf
+ chown asterisk:asterisk /data/etc/amportal.conf
+ ln -s /data/etc/amportal.conf /etc/amportal.conf
+ '[' FALSE = TRUE ']'
+ '[' FALSE = FALSE ']'
+ echo '** [freepbx] Setting Configuration'
** [freepbx] Setting Configuration
+ cat
+ cat
+ '[' '!' -f /etc/asterisk/cdr_adaptive_odbc.conf ']'
+ cat
+ chown asterisk:asterisk /etc/freepbx.conf
+ '[' FALSE = FALSE ']'
+ echo '** [freepbx] Set RTP Ports'
+ mysql -uasterisk -pswIdPmOvKYoL -hfreepbxdb -e 'USE asterisk; UPDATE sipsettings SET `data` = "18000" WHERE keyword = "rtpstart";  UPDATE sipsettings SET `data` = "20000" WHERE keyword = "rtpend";'
** [freepbx] Set RTP Ports
ERROR 1146 (42S02) at line 1: Table 'asterisk.sipsettings' doesn't exist
+ mysql -uasterisk -pswIdPmOvKYoL -hfreepbxdb -e 'USE asterisk; ALTER TABLE featurecodes CHANGE column helptext helptext VARCHAR(10000);'
ERROR 1146 (42S02) at line 1: Table 'asterisk.featurecodes' doesn't exist
** [freepbx] Starting Asterisk
+ echo '** [freepbx] Starting Asterisk'
+ fwconsole chown
+ fwconsole start
+ fwconsole reload
+ chown -R asterisk /etc/asterisk/asterisk.conf /etc/asterisk/cdr_adaptive_odbc.conf
+ cat
+ a2enconf allowoverride
+ sed -i 's/\(APACHE_RUN_USER=\)\(.*\)/\1asterisk/g' /etc/apache2/envvars
+ sed -i 's/\(APACHE_RUN_GROUP=\)\(.*\)/\1asterisk/g' /etc/apache2/envvars
+ chown asterisk. /run/lock/apache2
+ a2enmod rewrite
+ service apache2 restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message
cat: /var/run/asterisk/asterisk.pid: No such file or directory
+ mkdir -p /tmp/state
+ touch /tmp/state/10-freepbx-init
[cont-init.d] 10-freepbx: exited 0.
[cont-init.d] 99-container-init: executing...
[cont-init.d] 99-container-init: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

**** [zabbix] Starting Zabbix Agent
cat: /var/run/asterisk/asterisk.pid: No such file or directory
cat: /var/run/asterisk/asterisk.pid: No such file or directory```

MariaDB wrong timestamp

I got warnings after every call
asterisk cannot insert call information into cel table
There is an error in eventtime format
INSERT INTO cel (eventtype, eventtime, cid_name, cid_num, cid_ani, cid_rdnis, cid_dnid, exten, context, channame, appname, appdata, amaflags, accountcode, uniqueid, linkedid, peer, userdeftype, extra)
VALUES ('HANGUP', {ts '2019-03-27 01:47:02.728779'}, 'PhoneUser', '41', '41', '', '42', 'h', 'from-internal', 'PJSIP/41-00000196', '', '', 3, '', '1553676404.408', '1553676404.408', '', '', '{"hangupcause":127,"hangupsource":"PJSIP/41-00000196","dialstatus":"CANCEL"}')
[2019-03-27 01:47:02] WARNING[1151] res_odbc.c: SQL Execute returned an error: 22007: [ma-2.0.18][10.3.13-MariaDB-1:10.3.13+maria~bionic]Incorrect string value: '\xC5\x82 Mat...' for column asterisk.cel.cid_name at row 1
I'm using tiredofit/freepbx:15-3.3.1 and mariadb:10.3.13

Web port other than 80?

I would like to put in a request for an environment variable to control the web port so I can have the option keep the container on host networking.

Good container install but wont work after a container restart.

I installed the FreePbx docker as per this post:

 docker run -d \
  --name freepbx \
  --restart=always \
  --net=host \
  --privileged \
  -v /docker/freepbx/certs:/certs \
  -v /docker/freepbx/www:/www/freepbx \
  -v /docker/freepbx/log:/var/log/ \
  -v /docker/freepbx/data:/data \
  -e DB_EMBEDDED=TRUE \
  tiredofit/freepbx

and it runs perfectly fine.
But if I restart the container for any reason - it doesnt seem to start back up.
The /admin page shows this error

Exception (1698)
SQLSTATE[HY000] [1698] Access denied for user 'freepbxuser'@'localhost'::SQLSTATE[HY000] [1698] Access denied for user 'freepbxuser'@'localhost'

Can I provide any more info that would help ?

No Swap

I see this message on the dashboard

Your system has no swap space. This should be fixed as soon as possible. Once fixed issue a reload to remove this message

and I tried to do

dd if=/dev/zero of=/swapfile count=1024 bs=1M && \
       chmod 600 /swapfile && \
       mkswap /swapfile && \
       echo '/swapfile swap swap defaults 0 0' >> /etc/fstab && \
       swapon /swapfile
       free -m && \

I have swap space available but the message is still persistent. Is there a way to fix it?

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.