Appearance
PBX watch
A PBX watch places no calls and no registrations. For a set time (minutes to a day) it records what FreeSWITCH reports over ESL — all traffic, real phones and real calls included — and then evaluates it like a test: trend windows, a worst window, pass/fail criteria, a report.
It answers: how is the PBX doing with its real traffic — are calls failing or dropping, is the audio good, do registrations fail (and from where), is the CPU running low, which tenant has problems? Use it during business hours to get a baseline, after a change to see that real traffic is fine, overnight to catch problems nobody reports, and as a scheduled daily check.
First step: connect ESL (setup), then run a 10-minute watch — or switch on the always-on watch and skip the end date.

Run it
- Check the Dashboard: FreeSWITCH (ESL) must be connected.
- New test → PBX watch; Watch for e.g.
1h, Trend window e.g.5m. - Start PBX watch. Nothing is sent to the PBX; the run page fills as real calls happen.
- Read the Trends card and the outcome / hangup-cause tables — see Read the result. To watch all the time instead, switch the always-on watch on in the profile.
Check what it needs
- The profile's ESL connection enabled and connected at the start (see ESL access). Without it the start is refused with the reason (e.g. "ESL is not connected to FreeSWITCH (…)").
- No extension set, no media mode: nothing is sent to the PBX.
- A licence and no other run active — a watch is a run like any other, so no load test can start while a watch runs (and the reverse). For monitoring around the clock beside tests use the always-on watch.
What happens
- The test-traffic filter is switched off: every event counts, not only PBXsight's own calls.
- ESL polling switches to its fast interval (
esl.poll_interval, default 1 s) for per-second values; Kamailio and rtpengine sources, when on, poll at their active interval too. With the stuck-call check on, FreeSWITCH's channel list is read as well. - Every second a sample is stored; every trend window closes into a row of the Trends table.
- Failures are written to the run's
watch.log(failed and dropped calls, register failures with user, source IP and user agent; ESL / Kamailio / rtpengine connection changes and restarts). At most 2000 failure lines are written; after that they are only counted. - The watch ends after its duration, or at once on Stop (recorded as stopped, with everything up to that second evaluated). If ESL drops meanwhile, the seconds without data are gaps; the collector reconnects by itself and the ESL data coverage shows how much is missing.
What counts as a call, and how it ends
A call is an inbound SIP leg (a sofia/… channel with direction inbound): the leg from the caller into FreeSWITCH. B legs, loopback and other internal channels are counted separately by type (they reveal dialplan loops). When a call ends, its hangup cause classifies it:
| Outcome | Hangup causes | Counts as |
|---|---|---|
| answered | the call was answered | success |
| user (busy / no answer / declined) | USER_BUSY, NO_ANSWER, NO_USER_RESPONSE, CALL_REJECTED, USER_NOT_REGISTERED, SUBSCRIBER_ABSENT, NORMAL_CLEARING, transfers, pickups, … before answer | success — a person's choice, not a PBX failure |
| cancelled | ORIGINATOR_CANCEL | excluded (the caller hung up while it rang) |
| failed | everything else (e.g. NORMAL_TEMPORARY_FAILURE, RECOVERY_ON_TIMER_EXPIRE, DESTINATION_OUT_OF_ORDER) | failure |
| dropped | an answered call ended abnormally (e.g. MEDIA_TIMEOUT) | counted against answered calls |
call success = (answered + user) ÷ (answered + user + failed)
dropped = dropped ÷ answered
Worked example
In a 2-hour watch FreeSWITCH reports 1,240 inbound calls: 910 answered, 260 busy / no answer, 45 cancelled by the caller, 25 failed. Call success = (910 + 260) ÷ (910 + 260 + 25) = 97.9 % (passes ≥ 95 %). 4 answered calls ended with MEDIA_TIMEOUT: dropped = 4 ÷ 910 = 0.44 % (passes ≤ 1 %).
Choose the settings
| Field (UI) | API field (watch.*) | Default (form) | Allowed | What it changes |
|---|---|---|---|---|
| Watch for | duration | 2h | ≥ 1 min, ≤ safety.max_watch_duration (default 24 h) | How long to record. You can stop earlier. |
| Trend window | window | 5m | 10 s … 1 h, ≤ the duration; empty = 5 min (a quarter of the duration for watches under 20 min, at least 10 s) | Size of the trend windows. |
safety.max_duration does not apply to a watch — it generates no traffic; safety.max_watch_duration does.
Fix a refused start
| Rule | Status |
|---|---|
| ESL enabled in the profile, and connected right now | 422 |
Duration ≥ 1 min and ≤ safety.max_watch_duration | 422 |
| Window 10 s … 1 h and not longer than the duration | 422 |
| Valid criteria | 422 |
| A valid licence | 402 |
| No other run active | 409 |
Read the result
Per second: calls and channels up, new calls per second, sessions per second, registrations (all), idle CPU (when FreeSWITCH reports it). When calls end: outcomes by hangup cause and SIP code, audio quality of each SIP leg as FreeSWITCH received it (rtp_audio_in_*: MOS, loss), the codec. Registrations ok / failed / un-registered / expired, failures by user, source IP and user agent. Per tenant (SIP domain, up to 500). Post-dial delay inside FreeSWITCH: created → first ringing (180/183).
| Where | What |
|---|---|
| Tiles | Elapsed, Calls, Dropped, MOS (FreeSWITCH), Registered, Idle CPU, ESL coverage. |
| Charts | Calls, Active calls, Registrations, Audio quality (FreeSWITCH, all legs), Post-dial delay (ms), Idle CPU. |
| Trends | One row per window: calls, success, dropped, audio, registrations, failures per minute, idle CPU — see Trend windows. |
| Call outcomes, SIP codes of unanswered calls | The outcome table by cause and SIP code. |
| Tenants | Per domain: calls, ended, failed, dropped, success, legs with audio / poor (MOS < 3.6), MOS, REGISTERs ok / failed, expired. |
| Failed registrations | Top users, source IPs and user agents — bursts point at a misconfigured phone or password guessing. |
| Details | Calls (ended, answer rate, average CPS, peak channels, other channels), Audio (FreeSWITCH inbound) (legs with audio, MOS, loss), PBX & data (registrations, un-registered, peak sessions/s, ESL data). |
| Kamailio, rtpengine, Stuck calls | When those sources are on: Kamailio, rtpengine, stuck calls. |
The busiest window's average call rate is the peak real load that the Capacity card compares with the newest find-the-limit result (headroom, weekly trend); the watch's report has a Capacity section as of its end.


Set the pass / fail criteria
From the profile's criteria.watch. Real traffic may be sparse, so checks without data are skipped, not failed:
| Check | Default | Value |
|---|---|---|
| ESL data coverage | ≥ 95 % | seconds with ESL data ÷ seconds watched |
| Call success | ≥ 95 % | (answered + user) ÷ (answered + user + failed) |
| Call success, worst window | ≥ 90 % | windows with 10+ ended calls |
| Dropped calls | ≤ 1 % | dropped ÷ answered |
| Post-dial delay p95 | off (form suggests 2000 ms) | created → ringing inside FreeSWITCH |
| MOS (FreeSWITCH, all legs) | ≥ 4.0 | average over legs with audio |
| MOS drop over time | ≤ 0.3 | first → last window with 3+ legs with audio |
| Registration success | ≥ 95 % | REGISTERs ok ÷ (ok + failed) |
| Registration failures/min, worst window | ≤ 10 | |
| Idle CPU, lowest | ≥ 20 % | the lowest second, not a window average (a short overload hides in an average); skipped if FreeSWITCH doesn't report it |
| Internal legs, peak | off (form suggests 20) | loopback/other channels open at once — catches dialplan loops |
Optional Kamailio, rtpengine and stuck-call checks appear when those sources are on. See Pass / fail verdict.
Limits of what a watch sees
- Only what FreeSWITCH sees. Calls rejected by Kamailio or an SBC before they reach FreeSWITCH are invisible here — turn on the Kamailio source for those counters.
- Audio quality is FreeSWITCH's inbound view: what it received on each SIP leg, not what the phones heard.
- Post-dial delay is inside FreeSWITCH (channel created → ringing); network and proxy time before it are not included.
- Statistics depend on FreeSWITCH filling the event headers (
Caller-Channel-*-Time,variable_domain_name,rtp_audio_in_*); a value it doesn't send stays empty.
Avoid common mistakes
- Watch once without criteria changes to learn your normal levels (idle CPU, registration failures, internal legs), then tighten the criteria and schedule it.
- A low idle CPU second during a watch is worth a look even if averages are fine: that is when calls set up slowly.
- Registration failure bursts from one IP with many users are typically password guessing; from one user, a phone with a wrong password.
- One run at a time: a scheduled load test due during a long (hand-started or scheduled) watch is skipped (and logged). The always-on watch doesn't have that problem: it runs beside load tests.
- Coverage below 100 % means ESL disconnects; results for those seconds are missing, not zero.
Keep watching all the time (always-on watch)
Instead of starting watches by hand or scheduling a daily one, switch on the profile's always-on watch (profile page → Always-on watch card). It is the same recording without an end:
- one watch run per profile per local day (marked Always-on in Results), each with its summary, verdict, report and export;
- every trend window (1–60 min, default 5 min, on clock boundaries) gets its own verdict against the watch criteria, and a failed window sends one e-mail (plus one when it recovers);
- it runs beside load tests and never blocks one; a load test's own calls on the same profile are left out (the PBX-wide CPU and counters can't be split, so those windows are marked and their CPU check skipped);
- the Monitor page shows it live and compares the days.
The scheduled daily watch (e.g. cron 0 8 * * 1-5, 8 h) still works, but blocks load tests while it runs.