Howto Freepbx container: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
Line 12: Line 12:
fix sql directory permissions:
fix sql directory permissions:
  chmod 755 -R sql/
  chmod 755 -R sql/
if you want to change container parameters including domain, passwords ect you need to edit docker-compose.yml file:
if you want to change container parameters you need to edit docker-compose.yml file:
    environment:
vi docker-compose.yml
      - TZ=America/Puerto_Rico
      - DB_USER=asterisk
      - DB_PASS=asteriskpass
      - DBENGINE=mysql
      - DBNAME=asterisk
      - DBHOST=172.18.0.2
      - DBPORT=3306
      - CDRDBNAME=asteriskcdrdb
      - DBUSER=asterisk
      - DBPASS=asterisk
      - USER=asterisk
      - GROUP=asterisk
      - WEBROOT=/var/www/html
      - ASTETCDIR=/etc/asterisk
      - ASTMODDIR=/usr/lib64/asterisk/modules
      - ASTVARLIBDIR=/var/lib/asterisk
      - ASTAGIDIR=/var/lib/asterisk/agi-bin
      - ASTSPOOLDIR=/var/spool/asterisk
      - ASTRUNDIR=/var/run/asterisk
      - AMPBIN=/var/lib/asterisk/bin
      - AMPSBIN=/usr/sbin
      - AMPCGIBIN=/var/www/cgi-bin
      - AMPPLAYBACK=/var/lib/asterisk/playback
deploy freepbx container using docker-compose:
deploy freepbx container using docker-compose:
  docker-compose up -d
  docker-compose up -d

Revision as of 05:30, 11 December 2023

install docker

first we need to install docker and docker compose:

https://wiki.vidalinux.org/index.php/Howto_docker

deploy freepbx container

clone the following repo from github:

git clone https://github.com/vidalinux/docker.git

enter docker-freepbx directory:

cd docker/docker-freepbx

create certs directory and add your domain ssl certificate and key:

mkdir certs
cp server.crt server.key certs/

fix sql directory permissions:

chmod 755 -R sql/

if you want to change container parameters you need to edit docker-compose.yml file:

vi docker-compose.yml

deploy freepbx container using docker-compose:

docker-compose up -d

view containers deployment log using this command:

docker-compose logs -f

callcentric account

go to callcentric and create and account:

https://callcentric.com

add outbound plan to your account:

https://www.callcentric.com/rate/plans/

add inbound plan to your account:

https://www.callcentric.com/did/

change extension password:

https://my.callcentric.com/extensions.php

forward your inbound calls to your extension:

https://my.callcentric.com/pref_callforward.php

accesss freepbx interface

if you doesn't have an internal dns edit /etc/hosts to add the domain:

192.168.75.2 freepbx.ovox.io

enter freepbx interface using your domain:

https://freepbx.ovox.io

configure freepbx

add iax2 extension:

user extension: 101
display name 101
outbound cid: 77777777
secret: mypassword

add pjsip trunk:

PJSIP Trunk / General

trunk name: callcentric
outbound callerid: 77777777
maximum channels: 5

PJSIP Trunk / Dial Number Manipulation Rules

( 1 ) | [ 787. ]
( 1 ) | [ 939. ]

PJSIP Trunk / pjsip Settings / General

username: 1777xxxxxxx
secret: mypassword
sip server: sip.callcentric.net
context: from-pstn-toheader

PJSIP Trunk / pjsip Settings / Advanced

send line in registration: yes
send connected line: no
permanent auth rejection: no
user = phone: no
from domain: sip.callcentric.net
from user: 1777xxxxxxx

configure outbound routes on freepbx:

Outbound Routes / Route Settings

route name: callcentric-outgoing
override extension: no
trunk sequence for matched routes: callcentric

Outbound Routes / Dial Patterns

(   ) | [ 1NXXNXXXXXX ]
( 1 ) | [ 787. ]
( 1 ) | [ 939. ]

configure inbound routes on freepbx:

description: callcentric-incoming
did number: ANY
callid number: ANY
cid priority route: no
set destination: Extensions / 101

install iax2 client

install zoiper client on archlinux:

yay -S zoiper

download zoiper client for debian:

https://www.zoiper.com/en/voip-softphone/download/zoiper5/for/linux-deb

install zoiper client on debian:

dpkg -i Zoiper5_5.6.1_x86_64.deb

download zoiper client for rhel:

https://www.zoiper.com/en/voip-softphone/download/zoiper5/for/linux-rpm

install zoiper client on rhel:

yum install -y Zoiper5_5.6.1_x86_64.rpm

references