Howto Freepbx container: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 51: Line 51:
  https://my.callcentric.com/pref_callforward.php
  https://my.callcentric.com/pref_callforward.php


= accesss freepbx interface =
= access freepbx interface =
edit /etc/hosts to add your domain name matching your ssl certificates:
edit /etc/hosts to add your domain name matching your ssl certificates:
  192.168.75.2 freepbx.ovox.io
  192.168.75.2 freepbx.ovox.io
enter freepbx interface using your domain:
enter freepbx interface using your domain:
  https://freepbx.ovox.io
  https://freepbx.ovox.io
= debug or troubleshoot =
to enter freepbx_server container environment:
docker exec -it freepbx_server bash
inside the container to view asterisk server logs:
asterisk -vvr
turn on debug:
asterisk -r
core set verbose 5
core set debug 5
sip set debug on
module logger reload
verify sip registrations:


= configure freepbx =
= configure freepbx =
Line 93: Line 81:
  secret: mypassword
  secret: mypassword
  sip server: sip.callcentric.net
  sip server: sip.callcentric.net
  context: from-pstn-toheader
  context: from-pstn


'''PJSIP Trunk /  pjsip Settings / Advanced '''
'''PJSIP Trunk /  pjsip Settings / Advanced '''
Line 135: Line 123:
download zoiper client for windows:
download zoiper client for windows:
  https://www.zoiper.com/en/voip-softphone/download/zoiper5/for/windows
  https://www.zoiper.com/en/voip-softphone/download/zoiper5/for/windows
= inbound fax only =
enable fax in settings / asterisk sip settings / general sip settings:
t38 pass-through: yes with redundancy
create a connectivity / extensions / virtual extension:
disable voicemail
user manager setting / link to diferent default user: make sure it link to the extension numbers
submit and apply configuration
edit user in admin / user manager:
select the user that was created in the virtual extension
click the "fax" tab
select the file format for the received faxes (PDF)
in user details set email address: user@yourdomain.com
submit and apply configuration
create connectivity / inbound route for your fax:
set the did number to the inbound fax number
set Destination: to "fax recipient" and select the virtual extension created from the above
then, client the "fax" tab to continue
detect fax: enable
fax detection type: sip
fax destination: to fax Recipient inbound fax only
submit and apply configuration
configure settings / fax configuration
outgoing email address: "fax@your domain"
email address: user@domain.com recipient email address
submit and apply configuration
= debug or troubleshoot =
to enter freepbx_server container environment:
docker exec -it freepbx_server bash
inside the container to view asterisk server logs:
asterisk -vvr
turn on debug:
core set verbose 5
core set debug 5
sip set debug on
module logger reload
revert debug settings:
core set verbose 0
core set debug 0
sip set debug off
module logger reload
show iax2 extensions:
iax2 show peers
show pjsip trunks registrations:
pjsip show registrations
show pjsip authentications:
pjsip show auths
show all commands help:
core show help


= references =
= references =
* https://sangomakb.atlassian.net/wiki/spaces/FP/pages/10682545/How+to+Install+FreePBX+17+on+Debian+12+with+Asterisk+20
* https://sangomakb.atlassian.net/wiki/spaces/FP/pages/10682545/How+to+Install+FreePBX+17+on+Debian+12+with+Asterisk+20
* https://www.callcentric.com/support/device/freepbx/15
* https://www.callcentric.com/support/device/freepbx/15

Latest revision as of 00:01, 14 November 2024

install docker

first we need to install docker and docker compose:

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

create your own ssl cert

create rsa key:

openssl genrsa -out server.key 3072

create certificate csr:

openssl req -new -key server.key -out server.csr

fill the following blanks:

Country Name (2 letter code) []: US
State or Province Name (full name) []: Puerto Rico
Locality Name (eg, city) []: San Juan
Organization Name (eg, company) []: Vidalinux.com Corp.
Organizational Unit Name (eg, section) []: Linux Consulting
Common Name (eg, your name or your server's hostname) []: freepbx.ovox.io
Email Address []: asterisk@ovox.io
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: just press enter
An optional company name []: just press enter

create the certificate:

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

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 name 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

access freepbx interface

edit /etc/hosts to add your domain name matching your ssl certificates:

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

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

download zoiper client for windows:

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

inbound fax only

enable fax in settings / asterisk sip settings / general sip settings:

t38 pass-through: yes with redundancy

create a connectivity / extensions / virtual extension:

disable voicemail
user manager setting / link to diferent default user: make sure it link to the extension numbers
submit and apply configuration

edit user in admin / user manager:

select the user that was created in the virtual extension
click the "fax" tab
select the file format for the received faxes (PDF)
in user details set email address: user@yourdomain.com
submit and apply configuration

create connectivity / inbound route for your fax:

set the did number to the inbound fax number
set Destination: to "fax recipient" and select the virtual extension created from the above
then, client the "fax" tab to continue
detect fax: enable
fax detection type: sip
fax destination: to fax Recipient inbound fax only
submit and apply configuration

configure settings / fax configuration

outgoing email address: "fax@your domain"
email address: user@domain.com recipient email address
submit and apply configuration

debug or troubleshoot

to enter freepbx_server container environment:

docker exec -it freepbx_server bash

inside the container to view asterisk server logs:

asterisk -vvr

turn on debug:

core set verbose 5
core set debug 5
sip set debug on
module logger reload

revert debug settings:

core set verbose 0
core set debug 0
sip set debug off
module logger reload

show iax2 extensions:

iax2 show peers

show pjsip trunks registrations:

pjsip show registrations

show pjsip authentications:

pjsip show auths

show all commands help:

core show help

references