Connection
WS
/api/ws
Connect to receive real-time events. All messages are JSON with this envelope:
{
"event": "call_start",
"timestamp": 1706450400,
"data": { ... }
}
Subscription filtering: Send a JSON message to subscribe to specific events or systems.
By default, all events are received.
Live Tester
Disconnected
Events
call_start
call
Emitted when a new call begins on a talkgroup.
call_idint64Database call ID
tr_call_idstringTrunk-recorder call ID
talkgroupintTalkgroup ID (TGID)
talkgroup_alpha_tagstringTalkgroup name
systemstringSystem short name
freqint64Frequency in Hz
unitint64Initiating unit radio ID
unit_alpha_tagstringUnit name
encryptedboolCall is encrypted
emergencyboolEmergency flag set
call_end
call
Emitted when a call ends. Contains final call statistics.
call_idint64Database call ID
tr_call_idstringTrunk-recorder call ID
talkgroupintTalkgroup ID
talkgroup_alpha_tagstringTalkgroup name
systemstringSystem short name
durationfloat32Call duration in seconds
encryptedboolCall was encrypted
emergencyboolEmergency flag
error_countintDecode errors
spike_countintSignal spikes
audio_available
call
Emitted when audio recording is ready for playback.
call_idint64Database call ID
tr_call_idstringTrunk-recorder call ID
talkgroupintTalkgroup ID
talkgroup_alpha_tagstringTalkgroup name
systemstringSystem short name
audio_sizeintAudio file size in bytes
durationfloat32Audio duration in seconds
transmissionsintNumber of unit transmissions
frequenciesintNumber of frequency entries
unit_event
unit
Emitted for unit radio activity (registration, calls, affiliations).
unitint64Unit radio ID
unit_tagstringUnit alpha tag
event_typestringon, off, call, end, join, ackresp, location, data, ans_req
talkgroupintAssociated talkgroup ID
systemstringSystem short name
rate_update
system
Emitted periodically with system decode rate statistics.
systemstringSystem short name
decode_ratefloat32Current decode rate (0-100%)
control_channelint64Current control channel frequency
system_update
system
Emitted when system configuration or status changes.
systemstringSystem short name
system_typestringSystem type (P25, SmartNet, etc.)
sysidstringSystem ID
recorder_update
recorder
Emitted when recorder state changes (idle, recording, etc.).
recorder_idintDatabase recorder ID
rec_numintRecorder number
src_numintSource number
rec_typestringRecorder type
stateintState code (0=available, 1=recording, etc.)
rec_state_typestringState name
freqint64Current frequency
squelchedboolSquelch state
tgidintActive talkgroup (if recording)
tg_alpha_tagstringTalkgroup name
unit_idint64Active unit (if recording)
unit_alpha_tagstringUnit name
Subscription Messages
Important: Clients must subscribe to receive events. By default, new connections receive nothing until a subscription is sent.
Subscribe to all events on all systems:
{
"action": "subscribe",
"channels": ["*"]
}
Subscribe to specific channels (calls, units, rates, recorders):
{
"action": "subscribe",
"channels": ["calls", "units"],
"systems": ["county"]
}
Filter by talkgroup or unit:
{
"action": "subscribe",
"channels": ["calls"],
"talkgroups": [12345, 12346],
"units": [1001]
}
Channel Mapping
callscall_start, call_end, audio_available
unitsunit_event
ratesrate_update
recordersrecorder_update
*all events