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 from the image

The image is a complete VM ready to start: Debian 13, PostgreSQL, FreeSWITCH and FusionPBX, the PBX and nginx in front of the portal, text-to-speech (Piper, French and English voices), plus keepalived and rsync for active/passive, idle until configured. It is the recommended way to install the PBX.

FileFor
centrex-v3-<version>.qcow2KVM, Proxmox, OpenStack.
centrex-v3-<version>.ovaVMware, VirtualBox (2 vCPUs, 4 GB, VMXNET3 NIC).
centrex-v3-<version>.sha256Checksums of both: check them before importing.

12 GB disk, grown on first boot to the size given to the VM. Add a second, empty disk for call recordings: see Recordings volume.

Granting access

The image has no open account and no password: access is granted on first boot, through cloud-init, as for Debian or Ubuntu images of this kind.

  • OVA (VMware): the import wizard asks for the VM properties.
    • Public SSH key: authorized for the debian account (administrator, sudo).
    • Machine name: fully qualified name (pbx.operator.example). It gives the portal address and the default domain.
    • cloud-init configuration (optional): a #cloud-config document in base64.
  • qcow2 (Proxmox, OpenStack): the hypervisor’s cloud-init tab or fields (user, SSH key, name), or a NoCloud source. Example:
#cloud-config
fqdn: pbx.operator.example
prefer_fqdn_over_hostname: true
users:
  - name: admin
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    ssh_authorized_keys:
      - ssh-ed25519 AAAA… admin@operator

Without a key (VirtualBox, OVA imported without filling in the key), nobody can log in: import again with the key, or attach a NoCloud CD.

First boot

Once, after cloud-init, the VM:

  1. generates its own secrets: passwords of the database, the event socket and the CDRs, self-signed certificate, first secrets encryption key;
  2. creates the FusionPBX database, with the machine name as the default domain;
  3. sets up FreeSWITCH: local event socket (sudo fs_cli without a password), CDRs to the PBX, French voice, 100 new sessions per second, SIP over TLS on 5061 with the self-signed certificate;
  4. fills in the PBX settings (/etc/centrex-v3/centrex.env), with https://<machine name> as the public address;
  5. puts call recordings on their own volume: the second disk if there is one, otherwise a 50 GB file (Recordings volume);
  6. starts PostgreSQL, FreeSWITCH, the PBX and nginx.

No secret is shared by two VMs made from the same image: SSH keys, machine ID and cloud-init state are erased when the image is built.

Next

  1. Create the operator and its first administrator:

    sudo -u centrex sh -c 'set -a; . /etc/centrex-v3/centrex.env; centrex initialiser \
        --operateur "Operator name" --admin-courriel admin@operator.example \
        --admin-nom "First Last"'
    

    It prints a single-use link to choose the password.

  2. Replace the self-signed certificate of nginx (/etc/nginx/sites-available/centrex) and of SIP over TLS: with certbot, with --deploy-hook /usr/local/sbin/centrex-certificat-sip, or with yours, which sudo centrex-certificat-sip chain.pem key.pem gives to SIP (Quick start).

  3. Fix the public address (CENTREX_URL_PUBLIQUE in /etc/centrex-v3/centrex.env, then sudo systemctl restart centrex) if the portal is not served under the machine name: the links in invitations and for phones use it.

  4. Set up email in the portal (Settings page), before creating users.

  5. Declare the update repository (Updates): without it, no new version is reported.

Free software sources

The sources of FreeSWITCH (MPL 1.1), sofia-sip and spandsp (LGPL-2.1) and libks, at the versions built, are in /usr/share/centrex-pbx/sources; FusionPBX is installed from source, unmodified, in /var/www/fusionpbx. Piper (GPL-3.0) is in /opt/centrex-v3/piper, its sources and those of espeak-ng, with the voice credits, in /usr/share/centrex-v3/sources/piper. The notices of the PBX’s libraries are in /usr/share/doc/centrex-v3/.