Skip to content

PBX profiles ​

A PBX profile is one system under test — dev, qa, staging, a customer's PBX. One PBXsight install can hold many: each has its own SIP entry point, media settings, metric sources, safety limits, default pass/fail criteria and extension sets, and every run and schedule belongs to one. This page explains what lives in a profile versus config.yaml, how profiles behave, and every field of the editor.

First step: open Profiles → New profile, fill in the SIP entry point and press Test connection (Fill in the profile editor).

The Profiles page listing two PBX profiles with their SIP host and ESL state
Profiles: one row per system under test. Admins create and edit them; everyone can select one.

Decide what goes in a profile and what in config.yaml ​

The split follows one rule: anything that describes the PBX you test is in the profile (database, edited in the UI); anything about this PBXsight install is in config.yaml.

In the profile (UI, database)In config.yaml (app-wide)
SIP entry point: host, port, transport, default domain, sofia profile; the web clients' WebSocket URLserver: listen address, HTTPS, allowed hosts, sessions, proxies, logging
media mode, SIP from / Media from addressestester.media_port, media_sockets, rtcp, work_dir
ESL connection, stuck-call thresholdsstorage: database path, secret key
Kamailio and rtpengine sources
safety limits, allowed destinations
default pass/fail criteria per test type

The media ports are app-wide because they are this machine's ports: two profiles can't use different ones, since only one run goes at a time anyway (the always-on watch, which runs beside it, opens no media ports).

Start from config.yaml (the first profile) ​

config.yaml (and the PBXSIGHT_* environment variables) still has the per-target sections pbx, webrtc, esl, kamailio, rtpengine, stuck_calls, safety, criteria and tester.media / local_ip / media_ip. They are used once: on a start where the database has no profile and pbx.sip_host is set, they become a profile named default. That lets an automated install (Docker, configuration management) come up with a working target.

After that they are ignored, and the app logs a warning at every start if they are still set. Without pbx.sip_host nothing is imported, and the log says no PBX profile yet: create one on the Profiles page before running tests. The packaged config.yaml has no target sections on purpose: create the first profile in the UI.

How profiles behave ​

  • All profiles are connected at once. Each profile has its own ESL, Kamailio and rtpengine connections, running whether or not it is selected. Switching profiles is instant, the Dashboard shows live data straight away, and a schedule can start a run on any profile.
  • Selecting. The PBX picker in the top bar chooses the profile that Dashboard, New test, Extensions, Results and Schedules show. The choice is per browser. Results can also list the runs of all profiles.
  • One run at a time across all profiles: the runner is shared. The always-on watch is the exception: switched on per profile (its own card on the profile page, not part of the profile's settings), it runs beside any test and never blocks one.
  • Saving restarts the profile's connections with the new settings (the page says Saved. Its connections (ESL, Kamailio, rtpengine) restart with the new settings.). The editor header shows the ESL state, refreshed every 2 s, so you see right away whether the new settings connect.
  • A profile with a run going is locked: it can't be changed or deleted until the run ends (the form is greyed out; the API answers 409). The always-on watch doesn't lock it: saving the profile ends the day's segment and starts a new one with the new settings; deleting it ends the segment.
  • Extension sets belong to one profile. Different PBXes have different tenants and passwords, so a test can only use its own profile's sets.
  • Runs keep their own record. Each run stores its test parameters, the criteria it was judged by and its results, so editing a profile later (e.g. a stricter criterion) doesn't change old verdicts.

Delete a profile ​

Delete (admins; click twice to confirm) removes the profile with its extension sets and schedules. Its runs stay in Results under the profile's name. Before the second click the page says how many sets, schedules and runs are affected.

Change a secret (they are write-only) ​

The ESL password and the rtpengine token are never returned by the API: the editor shows unchanged (set) (or none) instead, and leaving the field untouched keeps the stored value. Tokens inside agent URLs (http://TOKEN@host:port) are hidden in the form too; saving the URL unchanged keeps its token. The activity log records which sections of a profile changed, never secret values. In the database the whole profile is stored encrypted (Secrets at rest).

Only admins can create, change or delete profiles; operators and viewers can open the editor read-only.

Fill in the profile editor ​

Profile editor with all sections
Profile editor: name, SIP entry point, media, ESL with the stuck-call check, Kamailio, rtpengine, safety limits, default criteria.

Name ​

Profile name: up to 60 characters, unique (e.g. dev, qa, staging).

SIP entry point ​

FieldDefaultMeaning
Host— (required)the proxy / SBC in front of FreeSWITCH, or FreeSWITCH itself. A host name with several addresses: one is picked per run, see Kamailio → HA
Port50605061 for TLS as a rule
TransportUDPUDP, TCP or TLS. TCP/TLS: one connection per test extension; the server certificate is not verified
Default domain—SIP domain for CSV rows without one (the tenant)
Registrar (sofia profile)internalFreeSWITCH's SIP profile the extensions register on

Web clients (WebRTC) ​

Optional. Where web clients — virtual sip.js-like browser clients — connect. The SIP entry point above stays the SIP phones' target, so one profile can run calls between both kinds.

FieldDefaultMeaning
WebSocket URL of each entry point (webrtc.ws_urls)— (off)ws:// or wss:// URLs with host, optional port and path, as your web app connects, e.g. wss://sip.example.com:7443/ws (Kamailio's websocket listener); + Add URL for each further entry point (e.g. each Kamailio): a run spreads its web clients over them round-robin. None = no web clients for this profile
STUN servers (webrtc.stun)noneoptional, comma separated stun:host:port: server-reflexive ICE candidates when the tester is behind NAT. No TURN

Web clients need media mode SRTP (they use DTLS-SRTP; the page warns otherwise). With a URL set, the block has its own Test connection: resolve, connect (TLS for wss), the WebSocket upgrade with subprotocol sip (clear messages for a wrong path / 404, no upgrade, TLS errors, refused), OPTIONS over the WebSocket and, with an extension set picked, one test REGISTER + un-REGISTER.

Media ​

FieldDefaultMeaning
ModeNoneSRTP (SDES) or RTP from the built-in media engine, or None (SDP only, no audio). Some relays require SRTP from TLS clients; plain RTP suits FreeSWITCH reached directly
SIP from (local IP)autoaddress put in Via/Contact/SDP. Empty: the interface that routes to the SIP host
Media from (IP)same as SIPaddress for RTP; set it when RTP must leave through another interface (e.g. a VPN)

With mode None, calls longer than FreeSWITCH's media timeout end with MEDIA_TIMEOUT, and there's no audio quality to measure; use RTP or SRTP for any call test you want audio results from.

FreeSWITCH event socket (ESL) ​

collect PBX-side metrics turns ESL on (default on). Then Host, Port (8021), Password (write-only), Poll interval (during runs) (1s, at least 100ms) and Poll interval (idle) (5s, not shorter than the run interval). Setup on the FreeSWITCH side: ESL access.

stuck / zombie call check during runs (default on, needs ESL) with its thresholds:

FieldDefaultMinimumFlags a leg when
Ringing longer than3m10snot answered this long
Answered longer than4h1manswered this long
No media for30s10srtpengine saw a side send nothing while FreeSWITCH still has the call (rtpengine only)
Orphan rtpengine session after2m40srtpengine has a session no FreeSWITCH channel has (watch; rtpengine only)

What the check does: Stuck calls.

Kamailio ​

optional source (off by default); JSON-RPC URL of each Kamailio (one input per node, + Add Kamailio), Poll (runs) 5s, Poll (idle) 30s (both at least 1s, idle not shorter than runs), Timeout 3s (up to 30s). Setup: Kamailio.

rtpengine ​

optional source (off by default); pbxsight-agent URL of each rtpengine host, Token or token file, Poll (runs) 5s, Poll (idle) 30s, Timeout 8s (up to 60s), per-call data during runs (on). Every URL needs a token from one of the three places. Setup: rtpengine and the agent.

Safety limits ​

Enforced by the server for every run on this profile, whatever the form or API request says:

FieldDefaultWhat it caps
Allowed call destinations*9196, 9196numbers a call test may dial (comma or space separated). Calls between test extensions don't need this
Max calls per second50call rate of any test
Max concurrent calls500calls up at once
Max registrations per second50registration rate
Max virtual phones100callees / busy-hour phones the tester registers; 0 turns calls between test extensions off
Max test duration2hload tests
Max PBX watch duration24hwatches (they place no traffic)

A request above a limit is refused with the reason (422) — nothing is sent to the PBX. Durations are written like 90s, 30m, 2h.

Default pass/fail criteria ​

One tab per test type (call, registration, busy hour, find the limit, PBX watch). The values are pre-filled on New test for this profile, and each run can still override them. Criteria for Kamailio, rtpengine and stuck calls appear only when that source is on. Every criterion and its default: Pass / fail verdict.

Fix validation errors ​

Saving checks the whole profile and lists every problem at once (e.g. pbx.sip_host is required (the SIP entry point: a proxy/SBC or FreeSWITCH itself), esl.host is required (FreeSWITCH address), rtpengine: HOST has no token …). Nothing is saved until all are fixed.

Manage profiles over the API ​

GET|POST /api/profiles, GET|PUT|DELETE /api/profiles/{id}, GET /api/profiles/defaults. The body is {"name", "config": {pbx, media, esl, kamailio, rtpengine, stuck_calls, safety, criteria}, "secrets": {"esl_password", "rtpengine_token"}}; a field left out keeps the stored value (on create: the default), a secret left out keeps the stored one. Changes need the admin role. See API.

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