Appearance
Configuration reference
PBXsight reads one YAML file at start (config.yaml), then environment variables, and checks the result before it opens the database. This page lists every key with its type, default and meaning, which keys are app-wide and which only seed the first PBX profile, the command-line options, and the configuration of pbxsight-agent. Defaults are those built into the binary (internal/config/config.go); the template config.example.yaml repeats them with comments.
First step: copy config.example.yaml to config.yaml (packages install one for you) and change only what you need; every key can also be set as PBXSIGHT_<SECTION>_<KEY>.
How the configuration is loaded
- Built-in defaults.
- The YAML file:
config.yamlin the current directory, or the file given with-config FILE. The default path may be missing (then defaults + environment only); a file named with-configmust exist. The packages and the Docker image start with-config /etc/pbxsight/config.yaml. - Environment variables
PBXSIGHT_<SECTION>_<KEY>override single keys. - Validation: every problem is reported at once and the app does not start, e.g.
config: tester.media_sockets 40: 1 to 32.
Keys you leave out keep their default. Unknown keys are rejected (field … not found in type config.…), so a typo surfaces at start instead of being ignored silently.
App-wide keys vs. profile seed
Since PBX profiles exist, the file has two kinds of sections:
| App-wide (read at every start) | Profile seed (read once) |
|---|---|
server, storage, license, tester.media_port, tester.media_sockets, tester.rtcp, tester.work_dir | pbx, webrtc, esl, kamailio, rtpengine, stuck_calls, safety, criteria, tester.media, tester.local_ip, tester.media_ip |
The profile-seed sections are used only when the database has no profile yet andpbx.sip_host is set: they become the profile default. After that they are ignored (the app logs a warning) and you edit targets on the Profiles page. They are validated only when pbx.sip_host is set. The packaged config therefore contains no target at all: you create the first profile in the UI.
In the profile editor and the API the three tester.* seed keys are called media.mode, media.local_ip and media.media_ip (UI: Media, SIP from, Media from).
Environment variables
The name is PBXSIGHT_ followed by the YAML path, segments joined with _, upper case:
| YAML | Environment variable |
|---|---|
server.listen | PBXSIGHT_SERVER_LISTEN |
server.tls.enabled | PBXSIGHT_SERVER_TLS_ENABLED |
esl.password | PBXSIGHT_ESL_PASSWORD |
criteria.call.min_answer_rate | PBXSIGHT_CRITERIA_CALL_MIN_ANSWER_RATE |
storage.secret_key | PBXSIGHT_STORAGE_SECRET_KEY |
storage.retention_days | PBXSIGHT_STORAGE_RETENTION_DAYS |
- Lists are comma separated, blanks trimmed:
PBXSIGHT_SAFETY_ALLOWED_DESTINATIONS=9196,9197,PBXSIGHT_SERVER_ALLOWED_HOSTS=pbxsight.example.com. - Durations as in YAML:
PBXSIGHT_ESL_POLL_INTERVAL=2s. - Booleans:
true/false(also1/0). - Criteria: an empty value switches a criterion off:
PBXSIGHT_CRITERIA_CALL_MAX_SETUP_P95_MS=. - An unparsable value stops the start with
env PBXSIGHT_…: …. - With systemd:
systemctl edit pbxsight→[Service]Environment=PBXSIGHT_…=…. With Docker Compose: theenvironment:block.
Environment variables for the profile-seed sections behave like the YAML: they seed the first profile only.
Durations
Duration values are strings in Go's format: a number and a unit, combinable — 500ms, 30s, 5m, 2h, 1h30m. Units: ms, s, m, h (no d: write 168h for 7 days).
server
App-wide. The web UI and API.
| Key | Type | Default | Meaning |
|---|---|---|---|
listen | string host:port | 127.0.0.1:8080 | Address of the UI/API. 127.0.0.1 = this machine only; 0.0.0.0:8080 = the network. The packaged config uses 0.0.0.0:8080. |
allowed_hosts | list of strings | [] | Host names (besides localhost and IP addresses) the UI may be opened under, e.g. pbxsight.example.com. Protects against DNS rebinding; requests under other names get 403. Also put into a self-signed certificate. |
log_level | debug | info | warn | error | info | Log level (log goes to stderr / the journal). |
log_format | text | json | text | Log format. |
tls.enabled | bool | false | Serve HTTPS (on the same port). |
tls.cert_file | path | "" | PEM certificate (with the chain). Set both files or neither. |
tls.key_file | path | "" | Its PEM private key. Without both files a self-signed certificate tls-selfsigned.crt/.key is created next to the database. |
session_idle_timeout | duration | 168h (7 days) | Logged out after this long without a request. At least 1m. |
session_max_age | duration | 720h (30 days) | Logged out after this long in any case. At least 1m. |
trusted_proxies | list of IPs/CIDRs | [] | Reverse proxies in front of the app. Only from them are X-Forwarded-For (client address in the activity log) and X-Forwarded-Proto (secure cookies) believed. |
tester
Mixed: the first four keys are app-wide, the last three seed the first profile.
| Key | Type | Default | Scope | Meaning |
|---|---|---|---|---|
media_port | int | 16000 | app | First local RTP port. The callers' engine uses media_port, +2, … (media_sockets ports, RTCP on each + 1), the virtual phones' engine the same number right after: 4 × media_sockets ports in all. See Ports. |
media_sockets | int, 1–32 | 4 | app | UDP sockets (RTP ports) per media engine. One socket carries roughly 1000 concurrent calls with audio; more sockets carry more. media_port + 4 × media_sockets − 1 must stay ≤ 65535. |
rtcp | bool | true | app | Also send RTCP sender/receiver reports from each RTP port + 1. Relays such as rtpengine compute their per-call MOS from RTCP. |
work_dir | path | ./runs | app | Run files (runs/<id>/: caller log, phones log, watch log, media log). Packaged: /var/lib/pbxsight/runs. Required. |
media | none | rtp | srtp | none | seed | What call tests send during the hold. none: SDP only, no audio. rtp: plain RTP. srtp: SDES-SRTP (RTP/SAVP + a=crypto). Use srtp when the relay forces SRTP towards TLS clients. Calls between test extensions and busy hour need rtp or srtp. |
local_ip | IP | "" | seed | SIP source address put in Via/Contact (and SDP unless media_ip is set). Empty = the address of the interface that routes to the SIP entry point. |
media_ip | IP | "" | seed | Address for RTP (SDP c= line and audio source). Empty = same as local_ip. Set it when audio must use another interface than SIP (e.g. SIP to a public proxy, RTP over a VPN). |
storage
App-wide.
| Key | Type | Default | Meaning |
|---|---|---|---|
db_path | path | ./pbxsight.db | SQLite database. Packaged: /var/lib/pbxsight/pbxsight.db. Required. |
secret_key_file | path | "" | File with the key that encrypts the secrets in the database (ESL passwords, rtpengine tokens, SIP passwords). Empty = next to the database with the extension .key (pbxsight.db → pbxsight.key). Created on first start. Back it up together with the database. |
secret_key | string | "" | The key itself (32 bytes, base64 or hex, e.g. openssl rand -base64 32). Wins over the file. Meant for PBXSIGHT_STORAGE_SECRET_KEY from a Docker or systemd secret; never returned by the API. |
retention_days | int | 14 | A finished run's per-second samples and log files are removed this many days after it ended; summary, verdict, windows and counters are kept. 0 = keep forever; negative is refused. An admin's value on the Settings page wins over this one. See Data retention. |
See Secrets at rest and backups.
license
App-wide.
| Key | Type | Default | Meaning |
|---|---|---|---|
server_url | URL | https://licence.pbxsight.com | The licence server online keys are activated and checked with (once a day, HTTPS). Only the key, a random installation ID, the app version and a one-time check value are sent. Must be https://; plain http:// only for a loopback address (tests). Behind a proxy set HTTPS_PROXY / NO_PROXY in the app's environment. Offline keys never use it. |
See Licence.
pbx
Profile seed. The SIP entry point.
| Key | Type | Default | Meaning |
|---|---|---|---|
sip_host | host name or IP | "" | The SIP entry point: a proxy/SBC (e.g. Kamailio) or FreeSWITCH itself. Required for a profile. A name with several A records is resolved per test; every run goes to one address. |
sip_port | int | 5060 | Its port (5061 is usual for TLS). |
transport | udp | tcp | tls | udp | SIP transport. TCP/TLS: one connection per test extension. The TLS certificate is not verified. |
default_domain | string | "" | SIP domain (realm) for extension CSV rows with an empty domain column. |
sofia_profile | string | internal | FreeSWITCH sofia profile acting as registrar (used for registration counts). Required. |
webrtc
Profile seed, optional. Where web clients (virtual sip.js-like browser clients: SIP over WebSocket, ICE + DTLS-SRTP audio) connect. Independent of pbx.transport, which stays the SIP phones' transport, so one profile can run calls between both kinds. UI: Profiles › Web clients (WebRTC).
| Key | Type | Default | Meaning |
|---|---|---|---|
ws_urls | list of ws:// or wss:// URLs | [] | The SIP-over-WebSocket listeners the web app connects to, each with host, optional port and path, e.g. wss://sip.example.com:7443/ws. Several (e.g. one per Kamailio): a run spreads its web clients over them round-robin, each client stays on its URL. Empty = no web clients for this profile. Env: comma separated (PBXSIGHT_WEBRTC_WS_URLS). The host is resolved once per run (like sip_host); the certificate is not verified (as for TLS). |
stun | list of stun:host[:port] | [] | STUN servers for server-reflexive ICE candidates (the tester behind NAT). Empty = host candidates on the tester's media IP only. No TURN. |
Web clients need tester.media: srtp (DTLS-SRTP) and the codec G.722 or PCMA.
esl
Profile seed. FreeSWITCH's Event Socket, reached directly (not through the proxy).
| Key | Type | Default | Meaning |
|---|---|---|---|
enabled | bool | true | false = run without PBX-side metrics (no FreeSWITCH counts, MOS, setup breakdown, stuck calls, hints that need them). |
host | host name or IP | "" | FreeSWITCH's address. Required when enabled. |
port | int | 8021 | listen-port of event_socket.conf.xml. |
password | string | ClueCon | ESL password. Never returned by the API. Change it on FreeSWITCH. |
poll_interval | duration | 1s | Polling of show calls/channels/registrations count and status while a test runs. At least 100ms. |
idle_poll_interval | duration | 5s | The same when no test runs (Dashboard). At least poll_interval. |
kamailio
Profile seed. Optional source: Kamailio's counters over JSON-RPC (read-only).
| Key | Type | Default | Meaning |
|---|---|---|---|
enabled | bool | false | Turn the source on. |
urls | list of http(s):// URLs | [] (the example shows http://10.0.0.5:5060/RPC) | One JSON-RPC endpoint per Kamailio; all are polled and summed. At least one when enabled. Credentials in a URL are hidden in the API. |
poll_interval | duration | 5s | While a test or watch runs. At least 1s. |
idle_poll_interval | duration | 30s | Otherwise (Dashboard). At least poll_interval. |
timeout | duration | 3s | Per request. More than 0, at most 30s. |
rtpengine
Profile seed. Optional source: rtpengine statistics through pbxsight-agent.
| Key | Type | Default | Meaning |
|---|---|---|---|
enabled | bool | false | Turn the source on. |
urls | list of http(s):// URLs | [] (the example shows http://10.0.0.10:9310) | One per agent; all are polled and summed. A URL may carry its own token: http://TOKEN@10.0.0.10:9310. |
token | string | "" | The agents' bearer token (used for URLs without their own). Never returned by the API. |
token_file | path | "" | Read the token from this file (one line) when token is empty. |
poll_interval | duration | 5s | While a test or watch runs. At least 1s. |
idle_poll_interval | duration | 30s | Otherwise. At least poll_interval. |
timeout | duration | 8s | Per request; keep it above the agent's request_timeout (5 s). More than 0, at most 60s. |
calls | bool | true | Also poll the per-call summary during runs (agent API 2): one-way audio, stuck calls, the Media path card's rtpengine part. |
When enabled, every URL needs a token (in the URL, token or token_file), otherwise: rtpengine: HOST has no token (…).
stuck_calls
Profile seed. The stuck / zombie call check during call tests and watches (needs ESL; rtpengine adds the media rules). It only flags legs, it never ends a call. See Stuck calls.
| Key | Type | Default | Minimum | Flags a leg when |
|---|---|---|---|---|
enabled | bool | true | ||
ring_after | duration | 3m | 10s | not answered this long |
long_after | duration | 4h | 1m | answered this long |
no_media_after | duration | 30s | 10s | a side sent nothing in rtpengine this long while FreeSWITCH still has the call |
orphan_after | duration | 2m | 40s | (watch) an rtpengine session that no FreeSWITCH channel has is this old |
safety
Profile seed. Server-side limits every test request is checked against; a request above one is refused with 422 and the limit's name.
| Key | Type | Default | Meaning |
|---|---|---|---|
allowed_destinations | list of strings | ["*9196", "9196"] | Numbers a call test may dial (echo-test numbers: 9196 in vanilla FreeSWITCH, *9196 on some platforms). Calls between test extensions dial only extensions of the selected set. |
max_cps | number | 50 | Highest call rate (calls per second), also the highest busy-hour rate and limit step. > 0. |
max_registration_rate | number | 50 | Highest registration rate (new extensions per second). Virtual phones register at min(10, this) per second. > 0. |
max_concurrent_calls | int | 500 | Highest number of calls up at once. > 0. |
max_duration | duration | 2h | Longest estimated test duration. > 0. |
max_watch_duration | duration | 24h | Longest PBX watch. > 0. |
max_virtual_phones | int | 100 | Most extensions the tester registers as answering phones (calls between test extensions, busy hour). 0 disables those modes. |
criteria
Profile seed. Default pass/fail thresholds per test type; the New test form can override them per run. A criterion that has no value is not checked. Explained in Pass / fail verdict.
Switching a criterion off in YAML
Keys you leave out of criteria keep their built-in default — they are not switched off. To switch one off in YAML write null (e.g. max_mos_drop: null); with an environment variable, set it to an empty value. In the UI, clear the field in the profile editor.
Ranges are checked: percentages 0–100, times and counts ≥ 0, MOS 1–4.5, max_mos_drop 0–3.5.
| Key | Unit | call | registration | busy_hour | watch | limit (per step) |
|---|---|---|---|---|---|---|
min_answer_rate | % | 99 | 99 | 99 | ||
max_setup_p95_ms | ms | 500 | 500 | (off; post-dial delay) | 500 | |
min_mos | MOS | 4.0 | 4.0 | 4.0 | 4.0 | |
min_tester_mos | MOS | 4.0 | 4.0 | 4.0 | ||
max_tester_loss_pct | % | 1 | 1 | 1 | ||
max_tester_rtt_p95_ms | ms | 300 | 300 | 300 | ||
min_success_rate | % | 99 | 99 | 95 | 99 | |
max_response_p95_ms | ms | 500 | ||||
max_storm_recovery_s | s | 30 (web clients) | ||||
max_ws_drops | count | (off; web clients) | ||||
min_window_answer_rate | % | 95 | ||||
max_window_setup_p95_ms | ms | 1000 | ||||
max_mos_drop | MOS | 0.3 | 0.3 | |||
max_busy_pct | % | (off) | ||||
min_call_success_rate | % | 95 | ||||
min_window_call_success_rate | % | 90 | ||||
max_dropped_pct | % | 1 | ||||
max_reg_failures_per_min | count | 10 | ||||
min_idle_cpu | % | 20 | ||||
min_coverage_pct | % | 95 | ||||
max_internal_legs | count | (off) | ||||
max_kamailio_restarts | count | (off, any type) | ||||
max_kamailio_shm_pct | % | (off, any type) | ||||
max_kamailio_ws_failed_pct | % | (off, any type) | ||||
max_rtpengine_restarts | count | (off, any type) | ||||
max_rtpengine_error_pct | % | (off, any type) | ||||
max_rtpengine_timeouts | count | (off, any type) | ||||
max_rtpengine_ports_pct | % | (off, any type) | ||||
max_suspect_calls | count | (off, any type) | ||||
min_limit_cps | CPS | (off; run verdict) | ||||
max_setup_p95_increase_pct | % | (off) | (off) | |||
max_answer_rate_drop | points | (off) | (off) | |||
max_limit_cps_drop_pct | % | (off; run verdict) | ||||
min_dtmf_ok_pct | % | 99 |
criteria.ivr (IVR / voicemail check) has its own section: min_ivr_pass_pct 100, min_answer_rate 100, max_setup_p95_ms 500 (the others off; min_dtmf_ok_pct can be switched on). Profiles saved before it existed get these defaults when they are loaded.
What each key measures:
| Key | Meaning |
|---|---|
min_answer_rate | answered calls, % of calls placed |
max_setup_p95_ms | 95th percentile of INVITE → 200 OK at the tester; in a watch: post-dial delay inside FreeSWITCH (channel created → ringing) |
min_mos | FreeSWITCH's MOS of the audio it received (needs ESL and audio) |
min_tester_mos | MOS estimated by the tester: round trip (echo) or per direction (test extensions) |
max_tester_loss_pct | packet loss at the tester (round trip, or per direction) |
max_tester_rtt_p95_ms | p95 round-trip latency (test extensions: sum of both one-way p95 delays) |
min_success_rate | REGISTERs answered 200 OK (registration test; the virtual phones' REGISTERs in busy hour and limit; all REGISTERs in a watch) |
max_response_p95_ms | p95 of first REGISTER → 200 OK, including the challenge round trip |
max_storm_recovery_s | web-client registration runs: the worst storm's time until all clients were registered again (not all back = failed) |
max_ws_drops | web-client registration runs: WebSocket connections lost that the tester didn't close, outside detected storms |
min_window_answer_rate, max_window_setup_p95_ms | the worst trend window |
max_mos_drop | MOS of the first trend window minus the last (worse direction) |
max_busy_pct | 486 from a callee already in a call, % of calls (counted as busy, not failed) |
min_call_success_rate, min_window_call_success_rate | watch: calls not failed by the PBX (caller cancels excluded; busy and no answer count as OK), whole run / worst window |
max_dropped_pct | watch: answered calls that ended abnormally (e.g. MEDIA_TIMEOUT) |
max_reg_failures_per_min | watch: registration failures per minute in the worst window |
min_idle_cpu | watch: FreeSWITCH's lowest idle CPU in any second (skipped if the version doesn't report it) |
min_coverage_pct | watch: seconds with ESL data |
max_internal_legs | watch: loopback / other non-SIP channels open at once (dialplan loops) |
max_kamailio_restarts, max_kamailio_shm_pct | Kamailio restarts during the run; highest shared-memory use of any Kamailio |
max_kamailio_ws_failed_pct | failed WebSocket handshakes + connections, % of the attempts (Kamailio websocket module; skipped below 10 attempts) |
max_rtpengine_restarts, max_rtpengine_error_pct, max_rtpengine_timeouts, max_rtpengine_ports_pct | rtpengine restarts; packet errors as % of relayed packets; sessions closed by timeout; fullest port range |
max_suspect_calls | distinct legs flagged by the stuck-call check |
min_limit_cps | find the limit: passed if the highest passing step reaches this rate |
max_setup_p95_increase_pct | call, busy hour: setup p95 may rise at most this % above the test's baseline (≥ 0; skipped without a baseline) |
max_answer_rate_drop | call, busy hour: the answer rate may fall at most this many percentage points below the baseline's (0–100) |
max_limit_cps_drop_pct | find the limit (run verdict): the limit may fall at most this % below the baseline's (0–100) |
min_dtmf_ok_pct | call tests with Send DTMF, IVR checks: calls whose digits all arrived as sent, %; checked only when verified (callee phone, or FreeSWITCH's DTMF events via ESL) |
min_ivr_pass_pct | IVR check: answered calls that passed every step of the script, % |
Example: a TLS + SRTP target
Only the keys that differ from the defaults. On a fresh database this becomes profile default.
yaml
server:
listen: "0.0.0.0:8080"
allowed_hosts: ["pbxsight.example.com"]
tls:
enabled: true
cert_file: "/etc/pbxsight/pbxsight.crt"
key_file: "/etc/pbxsight/pbxsight.key.pem"
pbx:
sip_host: "sip.example.com"
sip_port: 5061
transport: "tls"
default_domain: "loadtest.example.com"
esl:
host: "10.0.0.10"
password: "use-a-real-secret" # or PBXSIGHT_ESL_PASSWORD
webrtc:
ws_urls: ["wss://sip.example.com:7443/ws"] # optional: web clients
tester:
media: "srtp"
safety:
allowed_destinations: ["*9196"]
criteria:
call:
max_setup_p95_ms: 800
min_mos: null # don't check FreeSWITCH's MOSCommand line: pbxsight
text
pbxsight [-config FILE] run the app
pbxsight [-config FILE] reset-admin NAME make NAME an admin with a new password
pbxsight -version print the version and exit
pbxsight [-config FILE] -print-url print the local URL of the UI (http or https) and exit| Option | Default | Meaning |
|---|---|---|
-config FILE | config.yaml | Config file. Missing is fine for the default path; an explicit file must exist. |
-version | Print the version. | |
-print-url | Print how this machine reaches the UI for this config, e.g. https://localhost:8080. | |
reset-admin NAME | For a locked-out install: NAME becomes an enabled admin (created if needed) with a new random 20-character password, printed once; its sessions end. Recorded in the activity log as (command line). Run it as the app's user with the same config, e.g. sudo -u pbxsight pbxsight -config /etc/pbxsight/config.yaml reset-admin admin. |
The app binds the web port before it opens the database, so a second instance with the same listen fails with listen …: address already in use without touching the first one's data.
pbxsight-agent
The agent's config is a separate YAML file (default /etc/pbxsight-agent/config.yaml, installed from the example by the package; mode 0640, group pbxsight-agent). Unknown keys are rejected. There are no environment overrides.
| Key | Type | Default | Meaning |
|---|---|---|---|
listen | host:port | — (required; example 10.0.0.10:9310) | Address the agent serves on: the host's private IP and a free port. Avoid 0.0.0.0 on a host with a public interface. |
token | string | — | Bearer token clients must send (Authorization: Bearer …). At least 32 characters (openssl rand -hex 32). |
token_file | path | — (example /etc/pbxsight-agent/token) | Read the token from this file (one line) when token is empty. The package generates it on first install. |
allow | list of CIDRs / IPs | — (required) | Client networks allowed to connect; everything else gets 403 before the token is checked. |
rtpengine.http | host:port | "" = off (example localhost:2225) | rtpengine's listen-http, for its /metrics. |
rtpengine.ng | host:port | "" = off (example 127.0.0.1:2223) | rtpengine's listen-ng (UDP). Only ping, statistics, list and query are ever sent. At least one of http / ng is required. |
rtpengine.list_limit | int | 500 | Most calls returned by /v1/rtpengine/calls (a list reply must fit one UDP datagram). |
rtpengine.process | string | rtpengine | rtpengine's process name in /proc, for its CPU in /v1/host. |
max_concurrent | int | 4 | Requests handled at once; more get 503. |
request_timeout | duration | 5s | Bound for every request including the rtpengine calls. At least 2s. |
Agent command line: pbxsight-agent -config FILE (default /etc/pbxsight-agent/config.yaml), -check (validate the config and exit: prints config ok), -log-level debug|info|warn|error (default info), -version. At start it logs whether rtpengine is reachable over ng and http and keeps running either way.