Skip to content

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 ​

  1. Built-in defaults.
  2. The YAML file: config.yaml in the current directory, or the file given with -config FILE. The default path may be missing (then defaults + environment only); a file named with -config must exist. The packages and the Docker image start with -config /etc/pbxsight/config.yaml.
  3. Environment variables PBXSIGHT_<SECTION>_<KEY> override single keys.
  4. 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_dirpbx, 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:

YAMLEnvironment variable
server.listenPBXSIGHT_SERVER_LISTEN
server.tls.enabledPBXSIGHT_SERVER_TLS_ENABLED
esl.passwordPBXSIGHT_ESL_PASSWORD
criteria.call.min_answer_ratePBXSIGHT_CRITERIA_CALL_MIN_ANSWER_RATE
storage.secret_keyPBXSIGHT_STORAGE_SECRET_KEY
storage.retention_daysPBXSIGHT_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 (also 1/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: the environment: 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.

KeyTypeDefaultMeaning
listenstring host:port127.0.0.1:8080Address 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_hostslist 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_leveldebug | info | warn | errorinfoLog level (log goes to stderr / the journal).
log_formattext | jsontextLog format.
tls.enabledboolfalseServe HTTPS (on the same port).
tls.cert_filepath""PEM certificate (with the chain). Set both files or neither.
tls.key_filepath""Its PEM private key. Without both files a self-signed certificate tls-selfsigned.crt/.key is created next to the database.
session_idle_timeoutduration168h (7 days)Logged out after this long without a request. At least 1m.
session_max_ageduration720h (30 days)Logged out after this long in any case. At least 1m.
trusted_proxieslist 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.

KeyTypeDefaultScopeMeaning
media_portint16000appFirst 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_socketsint, 1–324appUDP 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.
rtcpbooltrueappAlso send RTCP sender/receiver reports from each RTP port + 1. Relays such as rtpengine compute their per-call MOS from RTCP.
work_dirpath./runsappRun files (runs/<id>/: caller log, phones log, watch log, media log). Packaged: /var/lib/pbxsight/runs. Required.
medianone | rtp | srtpnoneseedWhat 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_ipIP""seedSIP 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_ipIP""seedAddress 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.

KeyTypeDefaultMeaning
db_pathpath./pbxsight.dbSQLite database. Packaged: /var/lib/pbxsight/pbxsight.db. Required.
secret_key_filepath""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_keystring""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_daysint14A 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.

KeyTypeDefaultMeaning
server_urlURLhttps://licence.pbxsight.comThe 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.

KeyTypeDefaultMeaning
sip_hosthost 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_portint5060Its port (5061 is usual for TLS).
transportudp | tcp | tlsudpSIP transport. TCP/TLS: one connection per test extension. The TLS certificate is not verified.
default_domainstring""SIP domain (realm) for extension CSV rows with an empty domain column.
sofia_profilestringinternalFreeSWITCH 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).

KeyTypeDefaultMeaning
ws_urlslist 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).
stunlist 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).

KeyTypeDefaultMeaning
enabledbooltruefalse = run without PBX-side metrics (no FreeSWITCH counts, MOS, setup breakdown, stuck calls, hints that need them).
hosthost name or IP""FreeSWITCH's address. Required when enabled.
portint8021listen-port of event_socket.conf.xml.
passwordstringClueConESL password. Never returned by the API. Change it on FreeSWITCH.
poll_intervalduration1sPolling of show calls/channels/registrations count and status while a test runs. At least 100ms.
idle_poll_intervalduration5sThe same when no test runs (Dashboard). At least poll_interval.

kamailio ​

Profile seed. Optional source: Kamailio's counters over JSON-RPC (read-only).

KeyTypeDefaultMeaning
enabledboolfalseTurn the source on.
urlslist 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_intervalduration5sWhile a test or watch runs. At least 1s.
idle_poll_intervalduration30sOtherwise (Dashboard). At least poll_interval.
timeoutduration3sPer request. More than 0, at most 30s.

rtpengine ​

Profile seed. Optional source: rtpengine statistics through pbxsight-agent.

KeyTypeDefaultMeaning
enabledboolfalseTurn the source on.
urlslist 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.
tokenstring""The agents' bearer token (used for URLs without their own). Never returned by the API.
token_filepath""Read the token from this file (one line) when token is empty.
poll_intervalduration5sWhile a test or watch runs. At least 1s.
idle_poll_intervalduration30sOtherwise. At least poll_interval.
timeoutduration8sPer request; keep it above the agent's request_timeout (5 s). More than 0, at most 60s.
callsbooltrueAlso 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.

KeyTypeDefaultMinimumFlags a leg when
enabledbooltrue
ring_afterduration3m10snot answered this long
long_afterduration4h1manswered this long
no_media_afterduration30s10sa side sent nothing in rtpengine this long while FreeSWITCH still has the call
orphan_afterduration2m40s(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.

KeyTypeDefaultMeaning
allowed_destinationslist 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_cpsnumber50Highest call rate (calls per second), also the highest busy-hour rate and limit step. > 0.
max_registration_ratenumber50Highest registration rate (new extensions per second). Virtual phones register at min(10, this) per second. > 0.
max_concurrent_callsint500Highest number of calls up at once. > 0.
max_durationduration2hLongest estimated test duration. > 0.
max_watch_durationduration24hLongest PBX watch. > 0.
max_virtual_phonesint100Most 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.

KeyUnitcallregistrationbusy_hourwatchlimit (per step)
min_answer_rate%999999
max_setup_p95_msms500500(off; post-dial delay)500
min_mosMOS4.04.04.04.0
min_tester_mosMOS4.04.04.0
max_tester_loss_pct%111
max_tester_rtt_p95_msms300300300
min_success_rate%99999599
max_response_p95_msms500
max_storm_recovery_ss30 (web clients)
max_ws_dropscount(off; web clients)
min_window_answer_rate%95
max_window_setup_p95_msms1000
max_mos_dropMOS0.30.3
max_busy_pct%(off)
min_call_success_rate%95
min_window_call_success_rate%90
max_dropped_pct%1
max_reg_failures_per_mincount10
min_idle_cpu%20
min_coverage_pct%95
max_internal_legscount(off)
max_kamailio_restartscount(off, any type)
max_kamailio_shm_pct%(off, any type)
max_kamailio_ws_failed_pct%(off, any type)
max_rtpengine_restartscount(off, any type)
max_rtpengine_error_pct%(off, any type)
max_rtpengine_timeoutscount(off, any type)
max_rtpengine_ports_pct%(off, any type)
max_suspect_callscount(off, any type)
min_limit_cpsCPS(off; run verdict)
max_setup_p95_increase_pct%(off)(off)
max_answer_rate_droppoints(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:

KeyMeaning
min_answer_rateanswered calls, % of calls placed
max_setup_p95_ms95th percentile of INVITE → 200 OK at the tester; in a watch: post-dial delay inside FreeSWITCH (channel created → ringing)
min_mosFreeSWITCH's MOS of the audio it received (needs ESL and audio)
min_tester_mosMOS estimated by the tester: round trip (echo) or per direction (test extensions)
max_tester_loss_pctpacket loss at the tester (round trip, or per direction)
max_tester_rtt_p95_msp95 round-trip latency (test extensions: sum of both one-way p95 delays)
min_success_rateREGISTERs answered 200 OK (registration test; the virtual phones' REGISTERs in busy hour and limit; all REGISTERs in a watch)
max_response_p95_msp95 of first REGISTER → 200 OK, including the challenge round trip
max_storm_recovery_sweb-client registration runs: the worst storm's time until all clients were registered again (not all back = failed)
max_ws_dropsweb-client registration runs: WebSocket connections lost that the tester didn't close, outside detected storms
min_window_answer_rate, max_window_setup_p95_msthe worst trend window
max_mos_dropMOS of the first trend window minus the last (worse direction)
max_busy_pct486 from a callee already in a call, % of calls (counted as busy, not failed)
min_call_success_rate, min_window_call_success_ratewatch: calls not failed by the PBX (caller cancels excluded; busy and no answer count as OK), whole run / worst window
max_dropped_pctwatch: answered calls that ended abnormally (e.g. MEDIA_TIMEOUT)
max_reg_failures_per_minwatch: registration failures per minute in the worst window
min_idle_cpuwatch: FreeSWITCH's lowest idle CPU in any second (skipped if the version doesn't report it)
min_coverage_pctwatch: seconds with ESL data
max_internal_legswatch: loopback / other non-SIP channels open at once (dialplan loops)
max_kamailio_restarts, max_kamailio_shm_pctKamailio restarts during the run; highest shared-memory use of any Kamailio
max_kamailio_ws_failed_pctfailed 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_pctrtpengine restarts; packet errors as % of relayed packets; sessions closed by timeout; fullest port range
max_suspect_callsdistinct legs flagged by the stuck-call check
min_limit_cpsfind the limit: passed if the highest passing step reaches this rate
max_setup_p95_increase_pctcall, busy hour: setup p95 may rise at most this % above the test's baseline (≥ 0; skipped without a baseline)
max_answer_rate_dropcall, busy hour: the answer rate may fall at most this many percentage points below the baseline's (0–100)
max_limit_cps_drop_pctfind the limit (run verdict): the limit may fall at most this % below the baseline's (0–100)
min_dtmf_ok_pctcall 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_pctIVR 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 MOS

Command 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
OptionDefaultMeaning
-config FILEconfig.yamlConfig file. Missing is fine for the default path; an explicit file must exist.
-versionPrint the version.
-print-urlPrint how this machine reaches the UI for this config, e.g. https://localhost:8080.
reset-admin NAMEFor 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.

KeyTypeDefaultMeaning
listenhost: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.
tokenstring—Bearer token clients must send (Authorization: Bearer …). At least 32 characters (openssl rand -hex 32).
token_filepath— (example /etc/pbxsight-agent/token)Read the token from this file (one line) when token is empty. The package generates it on first install.
allowlist of CIDRs / IPs— (required)Client networks allowed to connect; everything else gets 403 before the token is checked.
rtpengine.httphost:port"" = off (example localhost:2225)rtpengine's listen-http, for its /metrics.
rtpengine.nghost: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_limitint500Most calls returned by /v1/rtpengine/calls (a list reply must fit one UDP datagram).
rtpengine.processstringrtpenginertpengine's process name in /proc, for its CPU in /v1/host.
max_concurrentint4Requests handled at once; more get 503.
request_timeoutduration5sBound 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.

PBXsight — load testing and monitoring for FreeSWITCH PBXes. Only test systems you own or may test.