Before you begin
You need:- Fonoster installed with Docker Compose. See Install with Docker Compose.
- A ClickHouse server AppBridge container can reach over HTTP or HTTPS (port
8123or8443).localhostinside the container is the container itself, not your machine. - A ClickHouse user that can run
CREATE DATABASE,CREATE TABLE,INSERT,DELETEandSELECTon the database you pick.
Turn on analytics
1
Add the ClickHouse login to .env
In your Compose passes these two values to the AppBridge container only. Add them before the next step:
without them, AppBridge sends an empty user and password.
fonoster folder, add the user and password to .env:2
Uncomment the analytics block
Open
config/appbridge.yaml. Under callRecord, uncomment analytics and set the URL of
your ClickHouse HTTP interface:When you upgrade, carry this edit over to the new release’s file (see
Upgrade).
3
Recreate AppBridge
Recreate AppBridge so it reads the file and the new values:If the file has a bad key, AppBridge stops at start and
docker compose logs appbridge names
it.loaded_at
wins). When a call is erased, its row is deleted. The metrics come from the redacted copy of the
record, so no transcript text reaches ClickHouse.
Check that rows arrive
Make a call and hang up. Then, in ClickHouse, list the latest calls.FINAL returns one row per
call:
Load calls made before analytics was on
AppBridge only loads records it seals after you turn analytics on. To fill the table from every record already stored, runanalytics rebuild inside AppBridge container. It empties the table
first, then loads each sealed record from the bundle’s MinIO bucket:
rebuilt fonoster.call_metrics from <n> records. Add --keep to add rows without
emptying the table first. The ClickHouse login comes from the container’s CLICKHOUSE_USER and
CLICKHOUSE_PASSWORD, never from the command line.