Skip to content

Calls to a number ​

A call load test places calls at a set rate (calls per second, CPS) from test extensions to one number the PBX answers itself — typically the echo test (9196 in the vanilla FreeSWITCH dialplan, *9196 on some platforms). Each call is held for a fixed time with audio, then hung up.

It answers: does the PBX set up and carry this many calls per second, how long does call setup take, and how good is the audio? Use it as the first call test after the registration test, to measure a baseline before and after a change (codec, PBX version, Kamailio or rtpengine config), and to compare transports or media modes. When you want to know how far the PBX goes, use Find the limit instead; for calls that ring a second extension, see Calls between test extensions.

First step: place one call to the echo test and check its Media path card.

New test form with Call load selected and the echo test as destination
New test → Call load, destination *9196: the plan shows rate, expected calls, concurrency and media.

Run it ​

  1. New test → Call load; pick the extension set.
  2. Destination: the echo test (e.g. 9196). Callers 5, Target CPS 1, Hold (s) 10, Run for a number of calls, Total calls 1 the first time, then 20.
  3. Check the Plan card, then Start call test.
  4. On the run page read Pass / fail, the Media path card (does audio flow, which crypto) and What to look at — see Read the result.

Why the echo test ​

The echo destination answers immediately and sends every audio packet back. That gives:

  • one PBX leg per call (no second extension to ring), so the result is about the PBX's call setup and media path, not about a callee;
  • round-trip audio: the tester sends a known signal and gets it back, so it measures loss, jitter, round-trip time and a MOS estimate itself — see Audio quality and MOS.

Any number in the profile's safety.allowed_destinations can be dialled (default *9196 and 9196), for example an IVR or a conference you set up for testing. Numbers that aren't on that list are refused: a call test must not ring real people by accident.

What happens on the wire ​

Before the first call: the callers register ​

The callers behave like real desk phones. Before any call, every caller extension registers as a virtual phone (REGISTER with digest auth, Expires: 3600, CRLF keepalive every 25 s on TCP/TLS, re-REGISTER at a random 60–90 % of the granted expiry). Each call then goes over its caller's registration connection, as a call dialled on a phone that is already connected.

  • Phones register at up to 10 per second (or safety.max_registration_rate when that is lower). Meanwhile the Dashboard and New test show a Test starting card with the progress and a Stop button.
  • In total mode with fewer calls than callers, only as many callers register as there are calls (20 echo calls register 20 extensions, not the whole set).
  • A caller whose phone didn't register places no calls. If none registers, the start is refused (422) with the most common reason (e.g. REGISTER: 403 Forbidden).
  • Caller phones take no incoming calls (they answer 480).
  • After the run, all phones un-register (50 at a time, all within 2 minutes).

One call ​

INVITE (SDP offer)                 ─▶
                                   ◀─ 100 Trying
                                   ◀─ 407 Proxy Authentication Required
ACK                                ─▶
INVITE + credentials               ─▶                 ← ring timer (30 s) starts here
                                   ◀─ 100 / 180 / 183
                                   ◀─ 200 OK (SDP answer)   ← setup time = first INVITE → this 200
ACK                                ─▶
… audio both ways for the hold time (media mode rtp or srtp) …
BYE                                ─▶
                                   ◀─ 200 OK
  • Tags. Every INVITE carries User-Agent: pbxsight/<run id>, X-PBXsight-Run: <run id> and X-PBXsight-Call: <Call-ID>. FreeSWITCH's events for these calls are recognised as test traffic, and the per-call header lets PBXsight join the tester's setup time with FreeSWITCH's own timestamps (see Setup time and its breakdown).
  • Offer. One codec (G.722 by default, PCMA or PCMU) plus telephone-event, ptime 20. With media mode srtp the offer is RTP/SAVP with an SDES a=crypto key (AES_CM_128_HMAC_SHA1_80); with rtp or none it is RTP/AVP. Only one codec is offered so the audio sent always matches what was negotiated.
  • Timers. Until the authenticated INVITE is sent (or ringing starts when there is no challenge), each response must arrive within 8 s, otherwise the call fails as timeout. From then on the PBX has 30 s to answer; after that the tester sends CANCEL and counts no_answer.
  • During the hold. A BYE from the PBX is answered 200 OK and the call counts as Hung up by PBX. A re-INVITE inside the call (session timer, hold) is answered with the original SDP; the call goes on.
  • After the hold the tester sends BYE. A BYE that gets no 200 counts as BYE failed.
  • Failures are counted by their final response code (486, 503, 404, …; a second 401/407 after sending credentials means rejected credentials), or as timeout, no_answer, connect_error (no connection), transport_error, aborted (the run was stopped while the call was ringing).

Pacing, ramp-up and concurrency ​

Calls are placed round-robin over the callers, 1 ÷ rate seconds apart. Once a second the runner sets the rate: with a ramp-up it rises linearly from Ramp start CPS to Target CPS over Ramp-up seconds.

Max concurrent calls caps the calls in progress at the tester. When the cap is reached, the next call waits for a free slot; there is no catch-up burst afterwards (a call more than 200 ms late starts at once instead of bunching up). The calls in progress at a steady rate are about:

concurrent ≈ CPS × (setup time + hold) ≈ CPS × hold

so a cap below CPS × hold limits the achieved CPS, and the form warns.

Media ​

The profile's media mode decides what flows during the hold:

Media modeSentMeasured by the tester
nonenothing (SDP only)nothing; FreeSWITCH may end long holds with MEDIA_TIMEOUT
rtpplain RTP from the built-in media engineloss, jitter, round trip, MOS estimate of the echo
srtpSRTP (SDES) from the built-in media enginethe same, decrypted

The test signal is a 400.5 Hz tone, 1 s on / 1 s off, in 20 ms frames (50 packets/s per call), encoded in the chosen codec. The engine listens on tester.media_sockets UDP ports (default 4: 16000, 16002, 16004, 16006; RTCP on each port + 1); each call uses one of them, chosen from its Call-ID. Ports and firewall rules are listed on Ports and firewall.

Worked example: 20 echo calls (the form's defaults)

Settings: destination *9196, callers 0 (all), Target CPS 2, hold 30 s, no ramp, a number of calls: 20, codec G.722, media srtp.

  • Callers registered: 20 (the first 20 of the set; total calls < set size).
  • Placing: 20 calls at 2 CPS → one every 0.5 s, done after 10 s.
  • Concurrent: 2 × 30 = 60 at a steady rate, but only 20 calls exist, so 20 are up at the peak.
  • Estimated: 10 s placing + 30 s hold + 10 s (a third of the ring timeout) + 5 s = 55 s, plus the phones' registration before the first call (~2 s here).
Worked example: 5 minutes with a ramp

Settings: Target CPS 5, ramp from 1 CPS over 60 s, hold 30 s, a duration of 5 min.

  • Calls during the ramp: (1 + 5) ÷ 2 × 60 = 180; after it: 5 × 240 = 1200; about 1380 in all.
  • Steady concurrency: 5 × 30 = 150 calls up (below the default cap of 500).
  • The calling period ends after 300 s; calls in progress finish their hold. Estimated: 300 + 30 + 15 = 345 s.

Choose the settings ​

Field (UI)API field (call.*)Default (form)AllowedWhat it changes
Extension setextension_set_id (top level)first seta set of this profileThe accounts that place the calls.
Destinationdestination (+ destination_mode: "number")the first allowed numberone of safety.allowed_destinationsThe number dialled. The other choice, Test extensions, is described on its own page.
Callerscallers00 … set size; 0 = allExtensions from the top of the set, used round-robin. Each registers as a phone first.
Codec offeredcodecG722G722, PCMA, PCMUThe only codec in the SDP offer.
Callers arecaller_clientsipsip, webrtc, mixedSIP phones, web clients (SIP over WebSocket, ICE + DTLS-SRTP; needs the profile's WebSocket URL and media SRTP; G.722 or PCMA), or mixed: a share of web clients, SIP phones for the rest.
Web clients %web_pct301 … 99; only with a mixed sideThe share of web clients on every mixed side (at least one of each kind; spread evenly over the callers).
Target CPScps2> 0, ≤ safety.max_cps (default 50)New calls per second (after the ramp).
Hold (s)hold_seconds301 … 3600How long an answered call stays up before the tester sends BYE.
Ramp-up (s)ramp_seconds0≥ 0; 0 = no rampLinear rise from the ramp start to the target.
Ramp start CPSramp_start_cps1> 0, ≤ Target CPSThe first rate of the ramp (ignored without a ramp).
Max concurrent callsmax_concurrent00, or 1 … safety.max_concurrent_calls (default 500); 0 = the safety limitCalls in progress at most.
Run formodetotaltotal or durationPlace a number of calls, or place calls for a time.
Total callstotal_calls20≥ 1Total mode: stop after this many calls.
Place calls forduration5m> 0Duration mode: no new calls after this; calls in progress finish their hold.

The media mode, transport and SIP entry point come from the PBX profile, not from the form; the plan on the right shows them.

Safety limits that apply ​

LimitDefaultEffect
safety.allowed_destinations*9196, 9196The only numbers a call test may dial.
safety.max_cps50Upper bound of Target CPS.
safety.max_concurrent_calls500Upper bound (and the default) of Max concurrent calls.
safety.max_registration_rate50The callers register at min(10, this) per second.
safety.max_duration2 hThe estimated duration must fit.

Fix a refused start ​

Problems come back together as 422 (shown under the Start button):

RuleWhy
Destination given and in safety.allowed_destinationsOnly numbers the PBX owner approved.
Callers between 1 and the set sizeAccounts must exist.
CPS > 0 and ≤ safety.max_cpsProtects the PBX from a typo.
Ramp start > 0 and ≤ CPS (with a ramp); ramp ≥ 0A ramp goes up to the target.
Hold 1 … 3600 sA call must last a moment, and not hours.
Max concurrent 1 … safety.max_concurrent_callsBounds the load and the tester's resources.
Codec one of G722, PCMA, PCMUThe media engine encodes only these.
Total calls ≥ 1, or a duration > 0Nothing to do otherwise.
Estimated duration ≤ safety.max_durationestimated = placing time + hold + 10 s + 5 s; with a ramp the placing time counts the ramp at its average rate.
At start: at least one caller registeredWithout a registered caller no call can be placed.

Also: 402 without a valid licence, 409 while another run is active.

Stop a run early ​

  • Duration mode ends by itself: no new calls after the calling period, calls in progress finish their hold and BYE.
  • Stop does the same (soft stop). Calls still up hold + 15 s later are hung up: CANCEL while ringing, BYE when answered. Then the phones un-register. The run is recorded as stopped.
  • While starting (phones still registering) Stop sends no more REGISTERs, un-registers the phones registered so far and records the run as stopped, with no results.
  • The runner stops a run itself at its deadline: estimated duration + hold + 15 s + 30 s (capped at safety.max_duration). Shutting PBXsight down hangs up all calls at once.

Send DTMF ​

A call test can send DTMF on every answered call (New test › Call load › Send DTMF; API: call.dtmf). It answers: do digits survive the PBX, the media relay and SRTP under load — all of them, by which method, how late? Not available in busy hour and find-the-limit tests.

SettingDefault
Digits—0-9 * # A-D, 1 to 32
MethodRFC 2833RFC 2833 (RFC 4733 telephone-event packets) or in-band (the two tones in the call's codec)
After2 sfrom the answer
Digit / gap100 / 100 ms40–500 / 40–1000 ms

The hold must last at least 1 s longer than after + digits × (digit + gap); the profile's media mode must be rtp or srtp.

  • RFC 2833: event packets in the call's RTP stream on the telephone-event payload type the PBX answered with (not a fixed 101), same SSRC and sequence; the first packet carries the marker bit, the last three the end bit. Over SRTP they are encrypted like the audio. They replace audio frames and don't count as loss. If the answer has no telephone-event, nothing is sent and the call counts under the reason "no telephone-event in answer".
  • In-band: the digit's dual tone encoded in G.722 / PCMA / PCMU in place of the test signal, silence in the gaps, then the test signal again.

Who checks the digits:

DestinationVerified by
Test extensionsthe callee phonedecodes the events and runs a tone detector on the audio: every digit, the method it arrived as and its latency (send start → detection start, same clock)
A number, ESL connectedFreeSWITCHits DTMF events on the run's test channels count as "FreeSWITCH heard"
A number, no ESL (or no DTMF event seen)nobody"not verified": the DTMF criterion is not checked, never failed

Digits detected in the returning stream (an echo destination may send them back) are shown as came back — information only.

Results (the DTMF card, the report, JSON): calls with all digits right (%), digits sent / received / missing / extra / wrong, the method the digits arrived as (sent as RFC 2833 but arrived in-band: the PBX converted them), latency avg / p95, FreeSWITCH heard, came back, and the first 100 calls whose digits didn't match (sent, received, reason). Criterion: DTMF ok (min_dtmf_ok_pct, default ≥ 99 %), checked only when the digits were verified.

In-band into FreeSWITCH

FreeSWITCH only detects in-band digits when its dialplan starts detection (start_dtmf). Prefer RFC 2833 unless you want to test in-band on purpose.

Read the result ​

Run page of a finished call test to the echo test
A call run to the echo test: tiles, Pass / fail, What to look at, then the cards and charts.
WhereWhat
TilesCalls (attempts), Answered, Failed, Answer rate, Active calls (peak), Setup time (p95), MOS.
Pass / failEach criterion with its value, see Pass / fail verdict.
What to look atRules that point at the likely bottleneck, see hints.
Where the setup time goesTester setup time split into before FreeSWITCH / in FreeSWITCH, slowest calls with Call-IDs — see Setup time and its breakdown. Needs ESL.
ChartsCall rate (target vs placed), Active calls (tester vs FreeSWITCH), Failures, Setup time, CPU: FreeSWITCH and the tester, Audio quality, Round trip latency & jitter (tester), SIP responses, Hangup causes (PBX).
Media pathWhat the PBX answered in SDP, where it wants the audio, warnings (SRTP mismatch, ICE, routing), late frames.
Kamailio, rtpengine, Stuck callsWhen those sources are on: Kamailio, rtpengine, stuck calls.
SummaryAttempts, answered, failed, answer rate, hung up by us / by the PBX, target vs peak CPS, peak concurrent (tester and PBX), setup min / avg / p95 / max, media, tester and FreeSWITCH audio, top failures.

Answer rate = answered ÷ (answered + failed). Setup time runs from the first INVITE to the 200 OK, the digest round included. The FreeSWITCH MOS is what FreeSWITCH measured on the audio it received from the tester (rtp_audio_in_mos at hangup); the tester MOS is the round trip of the echo. Both are explained on Audio quality and MOS.

Set the pass / fail criteria ​

From the profile's criteria.call:

CheckDefaultNotes
Answer rate (min_answer_rate)≥ 99 %answered ÷ (answered + failed)
Setup time p95 (max_setup_p95_ms)≤ 500 msfirst INVITE → 200 OK
MOS (FreeSWITCH) (min_mos)≥ 4.0needs ESL and media rtp/srtp; skipped otherwise
MOS (tester, round trip) (min_tester_mos)≥ 4.0needs media rtp/srtp
Packet loss (round trip) (max_tester_loss_pct)≤ 1 %
Round trip p95 (max_tester_rtt_p95_ms)≤ 300 msneeds an echo: skipped when echoed frames can't be matched
DTMF ok (min_dtmf_ok_pct)≥ 99 %with Send DTMF; only when verified (callee phone or ESL)

When audio was sent but nothing came back on any call, the tester checks fail instead of being skipped: silence is a real problem. Optional checks for Kamailio, rtpengine and stuck calls appear when those sources are on.

Avoid common mistakes ​

  • Media mode must fit the path. If the SIP entry point forces SRTP (e.g. rtpengine converting for TLS clients), media rtp produces calls without audio; the Media path card says so. Use srtp.
  • none is for signaling only. Without audio, FreeSWITCH may hang up long holds with MEDIA_TIMEOUT, and there is no MOS.
  • Max concurrent below CPS × hold silently lowers the achieved rate: the Call rate chart shows placed below target, and the form warns before you start.
  • Setup time includes the challenge. A 407 round trip is part of every call; a PBX far away doubles that part. The breakdown card shows it as before FreeSWITCH.
  • Many callers take time to register (1000 callers ≈ 100 s at 10/s) and hold one connection each on the SIP entry point for the whole run. For an echo test a few dozen callers are usually plenty.
  • Compare like with like: same destination, codec, media mode and hold. A changed hold changes the concurrency and thus the load.

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