Appearance
What to look at (hints)
A failed step tells you that the PBX ran out of something, not what. The What to look at card applies fixed rules to the run's numbers and names the component that most likely ran out first, with the evidence and a short list of what to check there. Hints are not proof: each one shows the numbers it is based on, so you can judge it.
First step: open a finished run and read its What to look at card, top to bottom: the most important hint comes first.

When hints are made
- Run types: call tests, find the limit, busy hour and IVR checks (runs with setup times), and registration tests with web clients (storms, drops). SIP registration tests and PBX watches get none.
- Computed on read: whenever a finished run is opened (and in its HTML report), from the stored numbers — so older runs get new rules too.
- Stages: the rules compare stages of the run:
- find the limit → each step that finished (passed, failed, no data or stopped);
- busy hour with at least two trend windows → each window;
- otherwise → the run as a whole. Many rules compare the first stage with the worst one, e.g. idle CPU at the lowest load against the highest load.
- Data sources: FreeSWITCH's idle CPU needs ESL (from
status, if the FreeSWITCH version reports it); Kamailio and rtpengine rules need those sources in the profile. A rule without its data doesn't fire. - Order and cap: critical first, then warnings, then info; at most 8 hints.
Severity badges: critical (red — very likely the limit), warn (yellow), info (blue).
FreeSWITCH
FreeSWITCH ran out of CPU / FreeSWITCH's CPU is getting tight
| Trigger | FreeSWITCH's lowest idle CPU of any stage < 30 % → getting tight (warn); < 15 % → ran out of CPU (critical) |
| Evidence | idle CPU per stage (e.g. 64 → 42 → 18 → 3 %), the stage with the lowest; setup p95 per stage; with steps: idle points per CPS = (first idle − lowest idle) ÷ (CPS of the lowest stage − CPS of the first) |
| Look at | the cores FreeSWITCH has (nproc — the rate it sustains scales roughly with them); which threads are busy during a heavy step (top -H -p $(pidof freeswitch): many media threads → RTP relaying is the cost, a few busy others → per-call work); whether FreeSWITCH must touch the audio at all (bypass/proxy media without recording, transcoding or tones); transcoding (read and write codec of both legs in show channels); per-call database work (CDR writes, dialplan lookups, the core database on disk instead of RAM) and a high log level |
Worked example
Limit run, steps 1–4 CPS, FreeSWITCH idle CPU 64 → 42 → 18 → 3 %. Lowest 3 % < 15 % → critical"FreeSWITCH ran out of CPU", evidence "… — lowest in step 4 (4 CPS); setup p95 310 → 380 → 470 → 1900 ms; ≈ 20 points of idle CPU per CPS" ((64 − 3) ÷ (4 − 1) = 20.3).
FreeSWITCH's idle CPU is dropping fast
| Trigger | not tight yet (lowest ≥ 30 %), but the lowest stage's idle CPU is ≥ 20 points below the first stage's (info) |
| Evidence | idle CPU up to the lowest stage; with CPS: points per CPS and a linear run-out estimate = CPS of the lowest stage + lowest idle ÷ points per CPS; the average setup at the first and lowest stage and, if one part explains it (≥ 10 ms and ≥ 40 % of the growth), the part of the setup that grew most; the checks that failed in that stage |
| Look at | re-run with a setup-time criterion comfortably above the lowest-load baseline so steps fail on load; top -H during the busiest step; per-call work (dialplan, database, CDRs, core database on disk, log level) |
Typical case: a limit run that stopped early on a setup criterion close to its baseline, while FreeSWITCH still had headroom — this names the likely next limit.
Worked example
Steps 1, 2, 3 CPS, idle 70 → 55 → 45 %. Drop 25 points ≥ 20, lowest 45 % ≥ 30 % → info. Points per CPS = (70 − 45) ÷ (3 − 1) = 12.5; run-out estimate = 3 + 45 ÷ 12.5 = 6.6 CPS. It's linear and rough: real PBXes often run out a little later.
Setup time grew — FreeSWITCH's CPU wasn't recorded
| Trigger | no idle CPU in any stage, at least two stages, and the worst setup p95 (in a later stage than the first) is ≥ 2 × the first and ≥ 1000 ms (info) |
| Look at | enable ESL in the profile so load tests record FreeSWITCH's idle CPU, and re-run; meanwhile top on the FreeSWITCH host during the step where setup time rises |
Setup time
Most of the extra setup time is …
| Trigger | at least two stages; the stage with the highest average setup is later than the first, at least 200 ms higher and ≥ 1.5 × the first; and one part of the setup grew by ≥ 40 % of that increase (warn) |
| Parts | before FreeSWITCH (network, Kamailio, rtpengine, the 407 round trip) · FreeSWITCH dialplan (A leg created → B leg created) · callee leg (B leg created → answered) · bridging the answer back (B answered → A answered) |
| Evidence | average setup first → worst stage, and that part's growth |
| Look at | before FreeSWITCH: Kamailio's open transactions and workers, rtpengine's offer time and CPU, the network path (VPN, TLS) · dialplan: dialplan and database work per call (lookups and caches of a management GUI, database load and slow queries, Lua scripts), the core database on disk, FreeSWITCH's CPU · callee leg: the way out to the callee (proxy and relay handle that leg too); the tester's phones answer at once, so growth here is the PBX side or the tester's CPU · back: FreeSWITCH's own work after the answer (media setup, SRTP keys, bridging) |
The parts come from FreeSWITCH's timestamps — see Setup time and its breakdown.
Setup takes time even at the lowest load
| Trigger | setup p95 of the first stage > 400 ms, while FreeSWITCH was > 50 % idle in it (or its CPU is unknown) (info) |
| Meaning | at the lowest load that is latency, not load |
| Look at | what adds up per call: TLS, the authentication round trip (407), DNS, the network path (VPN), the callee's leg; set the setup-time criterion above this baseline so steps fail on load, not on latency |
Kamailio
The rule reads Kamailio's open transactions (tmx.active_transactions, the peak per stage, summed over all Kamailios). A baseline is the lowest value before the peak stage.
| Trigger | the peak is in a later stage than the first with data, ≥ 20, and ≥ 5 × the baseline (at least 1) |
| If FreeSWITCH's CPU is tight (< 30 % idle) | Kamailio is waiting for FreeSWITCH (info): transactions stay open until FreeSWITCH answers — nothing to fix in Kamailio first; relieve FreeSWITCH, then re-test |
| Otherwise | Kamailio has many open transactions (warn), "while FreeSWITCH and rtpengine had headroom" (or "FreeSWITCH's CPU wasn't recorded") — check Kamailio's worker processes (children / tcp_children) and whether they block (DNS, database, HTTP calls in the routing script); TLS handshake cost, connection reuse, tls_max_connections, the host's CPU; shared memory and the tm/tmx statistics on its card |
Kamailio refused WebSocket connections
Read from the run's WebSocket totals (Kamailio's websocket module, all Kamailios; also on web-client registration runs).
| Trigger | ≥ 3 failed WebSocket handshakes + failed connections and ≥ 1 % of the attempts (warn) |
| Evidence | failed of attempts (%), failed handshakes, failed connections, opened |
| Look at | the TLS certificate and SNI on Kamailio's WSS listener; the xhttp route that upgrades to WebSocket (ws_handle_handshake, Origin / path checks); tcp_max_connections, the tls module's max_connections and tcp_children; for web-client registration runs, the Web clients card's storm failures |
rtpengine
| Hint | Severity | Trigger | Look at |
|---|---|---|---|
| rtpengine answers offers slowly | warn | average offer processing ≥ 20 ms in any stage, or rising to ≥ 5 ms and ≥ 3 × the first stage | rtpengine's CPU and busiest thread, num-threads; the kernel module (forwarding in the kernel frees CPU offers compete for). Kamailio waits for the offer before passing each INVITE on |
| An rtpengine thread is at its limit | critical | busiest rtpengine thread ≥ 85 % of one core (agent API 3) | load the kernel module; more threads (num-threads) or more rtpengine hosts |
| The rtpengine host is nearly out of CPU | warn | host CPU ≥ 85 % of all cores (shared with whatever else runs there, e.g. Kamailio) | more vCPUs, or spread calls over more hosts; the kernel module |
| rtpengine forwards in userspace | info | a stream reported "no kernel support" and no other rtpengine hint fired | not a limit yet; with more calls, the kernel module is the cheapest headroom |
| rtpengine is running out of media ports | warn | the fullest port range ≥ 80 % in use | port-min / port-max: each call side uses RTP + RTCP ports, and ended sessions keep them for the delete-delay |
Numbers come from the rtpengine source — see rtpengine metrics.
The tester
Before blaming the PBX, make sure the tester kept up.
| Hint | Severity | Trigger | Look at |
|---|---|---|---|
| The tester didn't reach the target rate | warn | a find-the-limit step placed < 90 % of its target CPS (the first such step is named; only steps have a placed rate) | the tester machine's CPU and this app's (chart CPU: FreeSWITCH and the tester); concurrency limits — max concurrent calls or safety limits capping the calls up, when slow or stuck calls pile up |
| The tester's machine is nearly out of CPU | warn | the tester machine's CPU ≥ 85 % of all cores in any stage | close other load on the machine (browsers, builds, video calls) and re-run |
| The tester's media engine fell behind | warn | ≥ 0.1 % of the audio frames went out 60 ms or more late, or not at all | more media sockets (tester.media_sockets; each carries roughly 1000 concurrent calls, more on Linux) or fewer concurrent calls with audio; the tester's CPU. The tester's audio numbers understate the real quality |
DTMF and IVR
- DTMF digits did not arrive as sent — calls with digits missing, wrong or extra (seen by the callee phone or FreeSWITCH). Look at telephone-event negotiation on every leg, FreeSWITCH's DTMF settings (
dtmf_type, in-band detection withstart_dtmf), the media relay's DTMF handling, and packet loss. - PBX converted DTMF (rfc2833 → inband) — information: digits arrived by another method than sent.
- IVR step N (…) failed on most calls — names the step and its top reason (no audio, no hangup, hung up).
Web clients (WebRTC)
- Web-client calls were answered but carried no audio — at least 1 % of the web-client call legs had no WebRTC media (critical from 10 %), split into ICE failed, DTLS failed and "no WebRTC in the SDP". ICE: the relay must do ICE towards web clients and reach the tester's candidates (UDP, firewall, NAT — add STUN behind NAT). DTLS: the relay's DTLS role and its certificate vs
a=fingerprint. No WebRTC in the SDP: the proxy must flag WebSocket clients for the relay (UDP/TLS/RTP/SAVPF, ICE, DTLS). - Web clients stayed unregistered after a storm — critical: in a web registration run some clients were not registered again within the recovery window; names the storm and the top REGISTER failures. 503 / timeouts point at a rate limit on the proxy (e.g. pike / ratelimit) or a registrar behind a burst, 401 / 403 at authentication; also check the WebSocket entry point's connection limits (TLS handshakes per second, open files).
- Web clients took long to register again after a storm — warning: all came back, but slower than
max_storm_recovery_s. - WebSocket connections dropped during the soak — connections closed that the tester didn't close (warning when
max_ws_dropsfailed, else information). Look at idle timeouts on the WebSocket path shorter than the clients' keepalive (proxy, load balancer, firewall), restarts of the proxy or TLS terminator at those times, and the per-second connections lost series (spread out = timeouts, at once = restarts or the network).
Reading hints well
- A critical hint in a limit run almost always names the limit; the idle points per CPS tells you roughly how much more one more CPS costs.
- Kamailio waiting and FreeSWITCH out of CPU together are one finding, not two: fix FreeSWITCH.
- What a component sustains scales with its cores: a small test PBX says little about a production-sized one. Use hints to compare configurations, not to size hardware from one run.
- No hint at all is normal for a run that stayed well within the PBX's capacity.