Webitel: Documentation

Webitel installation and licensing on one server


Webitel can be installed in one of two ways:

  • With Ansible (recommended). The playbook from the webitel/deployment repository installs the entire stack on Debian – PostgreSQL, RabbitMQ, Consul, FreeSWITCH, OpenSIPS, rtpengine, NGINX, Grafana and the Webitel services – and configures it for the selected profile.

  • Manually, component by component. See Manual installation.

Profiles

A profile defines how many servers are used and how components are made redundant. This guide covers singlehost and multihost.

Criterion

singlehost

multihost

Sample inventory

singlehost.example

multihost.example

Data centers

1 (single server)

1

PostgreSQL

standalone

standalone

Consul

1 server

1 server

RabbitMQ / Nomad

single node

single node

Tolerates

–

loss of a non-database server

Database failover

–

–

RPO

last backup

last backup

RTO

hours

hours

RPO and RTO are target values for the database with default settings, not guarantees.

singlehost handles up to 30–40 thousand calls per day (about 60 concurrent recorded calls) and up to 50 thousand chat conversations per day. For multihost, see Basic Architecture of the Industrial Environment.

Requirements

Servers

  • x86-64 (amd64) CPU.

  • Debian 12 (bookworm) or 13 (trixie) with internet access.

  • singlehost: at least 4 cores / 8 threads at 3.0 GHz, 8 GB RAM, 100 GB disk (>150 IOPS).

  • multihost: see Basic Architecture of the Industrial Environment.

  • For call recordings – a separate disk or S3 storage.

  • multihost: servers on the same private network with no access restrictions between them.

The machine that runs Ansible can be any Linux server or one of the Webitel servers, with SSH access and sudo privileges on all servers.

Prerequisites

  • Webitel APT repository keys (access key and secret key) – request them from your Webitel manager.

  • SignalWire Personal Access Token for FreeSWITCH – how to create one.

  • For HTTPS (required for WebRTC), one of the following:

    • a domain name pointing to the NGINX server – for a Let's Encrypt certificate;

    • your own certificate and key in PEM format;

    • a self-signed certificate (the default; the browser will show a warning).

Preparation

Run these steps on the machine you will run Ansible from.

  1. Install Ansible.

    Debian 13:

    Bash
    apt install git sudo ansible-core python3-cryptography
    

    Debian 12:

    Bash
    apt install git sudo pipx
    pipx install --include-deps ansible-core
    pipx inject ansible-core cryptography
    pipx ensurepath && exec bash
    
  2. Make sure the ansible-core version is 2.16 or later:

    Bash
    ansible --version
    
  3. Download the playbook and install the Ansible collections:

    Bash
    cd /opt
    git clone --single-branch -b v26.06 https://github.com/webitel/deployment.git
    cd deployment/ansible
    ansible-galaxy collection install -r requirements.yml
    

Configuration

The playbook is configured through an inventory – a directory with three files:

  • 01-hosts.yml – the servers and the services on each of them;

  • group_vars/all/main.yml – parameters;

  • group_vars/all/vault.yml – secrets.

Create an inventory from the sample for your profile:

Bash
cp -r inventories/<profile>.example inventories/production

General parameters

In inventories/production/group_vars/all/main.yml:

Parameter

Value

nginx_site_name

Domain name of the NGINX server.

nginx_tls_mode

self_signed (default), letsencrypt or provided.

nginx_mail_address

Email for Let's Encrypt – only for letsencrypt.

nginx_tls_cert, nginx_tls_key

Paths to the certificate and key on the Ansible machine – only for provided.

rtpengine_mode

global – calls from the internet, local – local network only.

rtpengine_public_address

Public IP address for media, if it is not detected automatically.

opensips_fail2ban

true – protection against SIP attacks.

grafana_basic_dashboards

true – install the basic Grafana dashboards.

base_timezone

Server time zone, UTC by default.

http_proxy, https_proxy

Proxy, if the servers can reach the internet only through it.

General secrets

Copy the template and replace all CHANGE_ME values:

Bash
cp inventories/production/group_vars/all/vault.yml.example \
   inventories/production/group_vars/all/vault.yml
$EDITOR inventories/production/group_vars/all/vault.yml

Key

Value

vault_webitel_repo_s3_access_key, vault_webitel_repo_s3_secret_key

Webitel APT repository keys.

vault_freeswitch_signalwire_key

SignalWire token.

vault_webitel_cookie_seed

A random string: openssl rand -hex 32.

vault_webitel_pg_password, vault_webitel_amqp_password

PostgreSQL and RabbitMQ passwords.

vault_grafana_admin_password

Grafana administrator password.

vault_grafana_db_password, vault_grafana_datasource_password

Grafana database passwords.

Passwords may contain only letters, digits and the characters . _ ~ -, for example openssl rand -hex 16.

singlehost

In inventories/production/01-hosts.yml, specify the server address. Do not change the list of services.

Ansible on the server itself:

YAML
all:
  hosts:
    node1:
      ansible_host: 127.0.0.1
      ansible_connection: local

Ansible on another machine:

YAML
all:
  hosts:
    node1:
      ansible_host: 203.0.113.10
      ansible_user: admin
      ansible_ssh_private_key_file: ~/.ssh/id_rsa

multihost

In inventories/production/01-hosts.yml, specify the servers and the services on each of them. In this example, the infrastructure runs on infra1 and the Webitel applications run on app1:

YAML
all:
  hosts:
    infra1:
      ansible_host: 10.0.0.11
      ansible_user: admin
      services: [consul_server, postgres, rabbitmq, freeswitch, rtpengine, opensips]
    app1:
      ansible_host: 10.0.0.12
      ansible_user: admin
      services:
        - consul_agent
        - nginx
        - grafana
        - webitel_core
        - webitel_engine
        - webitel_call_center
        - webitel_flow_manager
        - webitel_storage
        - webitel_messages
        - webitel_logger
        - webitel_cases
        - webitel_media_exporter
        - webitel_frontend

Additionally, in vault.yml:

Key

Value

vault_consul_encrypt_key

Consul encryption key: openssl rand -base64 32.

Passwords cannot be left at the default value (webitel).

Validate the inventory:

Bash
ansible-playbook -i inventories/production playbooks/validate_topology.yml

Running the playbook

  1. Encrypt the secrets and remember the password:

    Bash
    ansible-vault encrypt inventories/production/group_vars/all/vault.yml
    
  2. Run the playbook:

    Bash
    ansible-playbook -i inventories/production site.yml --ask-vault-pass
    

The playbook validates the configuration first and stops with an explanation if something is wrong. Fix the reported issue and run it again – re-running is safe.

Licensing

  1. At the end of the installation, the playbook prints the server ID. You can also get it on the NGINX server:

    Bash
    curl -k https://localhost/api/srvinfo
    
  2. Create a request on the support portal with this ID.

  3. Open https://<nginx_site_name> and create a user and a domain with the license key you received.

  4. Open Admin and proceed to the system settings.

Network access

Open only the following ports to the internet: 443/tcp (web interface and WebRTC), 80/tcp (HTTPS redirect and Let's Encrypt), plus SIP and RTP according to your connection setup.

Manual installation

Install the components in the following order. Each directory contains instructions, sample configurations and service files:

  1. PostgreSQL

  2. Consul

  3. RabbitMQ

  4. RTPEngine

  5. OpenSIPS

  6. Webitel services

  7. FreeSWITCH

  8. NGINX

Then proceed to Licensing.