Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing the package

The PBX also ships as a Debian package, centrex-v3, for a machine where FusionPBX and FreeSWITCH are already installed. The image remains the recommended way: it sets up FreeSWITCH and FusionPBX as the PBX expects, which has to be done by hand here.

Expected machine

  • Debian 13, PostgreSQL (the postgresql-client of the same version, for backups);
  • FreeSWITCH 1.11 and FusionPBX 5.6.5, the tested versions;
  • nginx in front of the portal, with TLS.

What the package contains

PathRole
/usr/bin/centrexThe binary: API, portal, MCP server, background tasks, operations commands.
/usr/share/centrex-v3/portailThe portal and this guide (guide/, guide/en/).
centrex.serviceThe service, under the centrex account (www-data group, for FreeSWITCH files and the FusionPBX cache).
/etc/centrex-v3/centrex.envThe settings, created on first install from the template /usr/share/centrex-v3/centrex.env, never rewritten afterwards.
/etc/centrex-v3/clesThe keyring of the secrets encryption keys, created with a first key.
/usr/share/doc/centrex-v3/License, third-party library notices, reference Prometheus alerts.

Installing

  1. Declare the vendor’s repository (Updates), then sudo apt update && sudo apt install centrex-v3.

  2. Set up FreeSWITCH as the image’s first boot does:

    • event socket: listening on 127.0.0.1, loopback.auto ACL, a password of its own (event_socket.conf.xml);
    • CDRs: load mod_json_cdr and send to http://127.0.0.1:8085/cdr, with basic authentication and a username and password drawn for the purpose (json_cdr.conf.xml);
    • sessions: sessions-per-second at 100 (switch.conf.xml);
    • SIP over TLS: variables internal_ssl_enable set to true and sip_tls_version to tlsv1.2,tlsv1.3 (FusionPBX, Advanced > Variables), then in /etc/freeswitch/tls agent.pem (certificate, chain and key) and cafile.pem (the chain), readable by www-data; fs_cli -x reloadcert reloads them on every renewal;
    • files: www-data group and setgid bit on /var/lib/freeswitch/recordings, /var/lib/freeswitch/storage (and voicemail, json_cdr below it) and /var/cache/fusionpbx, where the PBX writes.
  3. Fill in /etc/centrex-v3/centrex.env (Server settings): FusionPBX’s PostgreSQL database, public address, event socket, CDR credentials.

  4. Create the operator and its first administrator, as for the image:

    sudo -u centrex sh -c 'set -a; . /etc/centrex-v3/centrex.env; centrex migrate; \
        centrex initialiser --operateur "…" --admin-courriel … --admin-nom "…"'
    
  5. Optional, text-to-speech: without it, announcements are uploaded as audio files. Install Piper and its voices like the image does, then set CENTREX_PIPER, CENTREX_VOIX_PIPER and CENTREX_VOIX_PIPER_EN:

    sudo apt install python3-venv
    sudo python3 -m venv /opt/centrex-v3/piper
    sudo /opt/centrex-v3/piper/bin/pip install piper-tts==1.8.0
    sudo mkdir -p /usr/share/centrex-v3/voix && cd /usr/share/centrex-v3/voix
    v=https://huggingface.co/rhasspy/piper-voices/resolve/main
    for f in fr/fr_FR/siwis/medium/fr_FR-siwis-medium en/en_US/ljspeech/medium/en_US-ljspeech-medium; do
        sudo curl -fsSLO "$v/$f.onnx" && sudo curl -fsSLO "$v/$f.onnx.json"
    done
    
  6. sudo systemctl start centrex, then nginx with TLS in front, to 127.0.0.1:8080, forwarding Host (with the port), X-Forwarded-For and X-Forwarded-Proto, and accepting 21 MB uploads (audio files).

  7. Give recordings their own volume (Recordings volume).

  8. In the portal: email (Settings page), then your team and your resellers (Resellers feature to turn on first, same page).

The service applies database migrations on every start. As long as the settings are empty, the package does not start it.

Removing

apt remove stops the service and removes the binary; apt purge also removes the settings, but keeps the keyring: without it, the database secrets would be unreadable.