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 AppBridge container only. Add them before the next step:
fonoster folder, add the user and password to .env:init stops if config/appbridge.example.yaml names a value that .env doesn’t set.2
Uncomment the analytics block
Open
config/appbridge.example.yaml. Under callRecord, uncomment analytics and set the URL of
your ClickHouse HTTP interface:Edit the example, not
config/appbridge.yaml: init writes that file again from the example.3
Write the config and restart AppBridge
Write
config/appbridge.yaml, check it, and recreate AppBridge: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.