Trunk message rate reporting by system
topic/rates
{
"type": "rates",
"rates": [
{
"sys_num": 2,
"sys_name": "p25trunk",
"decoderate": 39.67,
"decoderate_interval": 3,
"control_channel": 774581250
},
{
"sys_num": 3,
"sys_name": "p25trunk2",
"decoderate": 35.00,
"decoderate_interval": 3,
"control_channel": 853750000
}
],
"timestamp": 1686699024,
"instance_id": "east-antenna"
}Changes:
rates
id -> sys_num
+ sys_name
+ decoderate_interval
+ control_channel
Conventional systems are omitted from rate reporting by the plugin.
Trunk-recorder source and system config information. The message is retained on the MQTT broker.
topic/config
{
"type": "config",
"config": {
"sources": [
{
"source_num": 0,
"rate": 2400000,
"center": 772906250,
"min_hz": 771756250,
"max_hz": 774056250,
"error": 0,
"driver": "osmosdr",
"device": "rtl=03",
"antenna": "",
"gain": 32,
"analog_recorders": 0,
"digital_recorders": 5,
"debug_recorders": 0,
"sigmf_recorders": 0,
"silence_frames": 0
},
{
...
}
],
"systems": [
{
"sys_num": 0,
"sys_name": "p25con",
"system_type": "conventionalP25",
"talkgroups_file": "",
"qpsk": true,
"squelch_db": -55,
"analog_levels": 8,
"digital_levels": 1,
"audio_archive": false,
"upload_script": "",
"record_unkown": true,
"call_log": false,
"channels": ""
},
{
"sys_num": 1,
"sys_name": "con",
"system_type": "conventional",
"talkgroups_file": "",
"qpsk": true,
"squelch_db": -45,
"analog_levels": 16,
"digital_levels": 1,
"audio_archive": false,
"upload_script": "",
"record_unkown": true,
"call_log": false,
"channels": ""
},
{
"sys_num": 2,
"sys_name": "p25trunk",
"system_type": "p25",
"talkgroups_file": "p25/trunk.csv",
"qpsk": true,
"squelch_db": -160,
"analog_levels": 8,
"digital_levels": 1,
"audio_archive": false,
"upload_script": "",
"record_unkown": true,
"call_log": false,
"control_channel": 774581250,
"channels": [
774581250,
772431250,
773456250,
774031250
]
},
{
...
}
],
"capture_dir": "/dev/shm/trunk-recorder",
"upload_server": "https://api.openmhz.com",
"call_timeout": 3,
"log_file": false,
"instance_id": "east-antenna",
"instance_key": ""
},
"timestamp": 1686400353,
"instance_id": "east-antenna"
}Changes:
config
systems
audioArchive -> audio_archive
systemType -> system_type
shortName -> sys_name
sysNum -> sys_num
uploadScript -> upload_script
recordUnknown -> record_unknown
callLog -> call_log
talkgroupsFile -> talkgroups_file
captureDir -> capture_dir
uploadServer -> upload_server
callTimeout -> call_timeout
logFile -> log_file
instanceId -> instance_id
instanceKey -> instance_key
Configured systems are sent during startup. The message is retained on the MQTT broker.
topic/systems
{
"type": "systems",
"systems": [
{
"sys_num": 0,
"sys_name": "p25con",
"type": "conventionalP25",
"sysid": "0",
"wacn": "0",
"nac": "0",
"rfss": 0,
"site_id": 0
},
{
"sys_num": 1,
"sys_name": "con",
"type": "conventional",
"sysid": "0",
"wacn": "0",
"nac": "0",
"rfss": 0,
"site_id": 0
},
{
"sys_num": 2,
"sys_name": "p25trunk",
"type": "p25",
"sysid": "555",
"wacn": "BBBBB",
"nac": "BCC",
"rfss": 1,
"site_id": 7
}
],
"timestamp": 1686400355,
"instance_id": "east-antenna"
}Changes:
systems
id -> sys_num
name -> sys_name
+ rfss
+ site_id
Sent after a system is configured during trunk-recorder startup.
topic/system
{
"type": "system",
"system": {
"sys_num": 3,
"sys_name": "p25trunk",
"type": "p25",
"sysid": "555",
"wacn": "BBBBB",
"nac": "BCC",
"rfss": 1,
"site_id": 7
},
"timestamp": 1686146741,
"instance_id": "east-antenna"
}Changes:
system
id -> sys_num
name -> sys_name
List of active calls, updated every second.
topic/calls_active
{
"type": "calls_active",
"calls": [
{
"id": "2_4011_1686699318",
"call_num": 51442,
"freq": 771356250,
"sys_num": 2,
"sys_name": "p25trunk",
"talkgroup": 4011,
"talkgroup_alpha_tag": "Bus 1",
"talkgroup_description": "Bus Dispatch 1",
"talkgroup_group": "State Transit",
"talkgroup_tag": "Transit",
"unit": 899003,
"unit_alpha_tag": "Trans 9003",
"elapsed": 12,
"length": 7.48,
"call_state": 1,
"call_state_type": "RECORDING",
"mon_state": 0,
"mon_state_type": "UNSPECIFIED",
"phase2": true,
"analog": false,
"rec_num": 0,
"src_num": 1,
"rec_state": 4,
"rec_state_type": "IDLE",
"conventional": false,
"encrypted": false,
"emergency": false,
"stop_time": 1686699318
},
{
...
}
],
"timestamp": 1686699330,
"instance_id": "east-antenna"
}Changes:
calls
callNum -> call_num
sysNum -> sys_num
shortName -> sys_name
talkgrouptag -> talkgroup_alpha_tag
+ talkgroup_description
+ talkgroup_group
+ talkgroup_tag
srcId -> unit
+ unit_alpha_tag
state -> call_state
+ call_state_type
monState -> mon_state
+ mon_state_type
recNum -> rec_num
srcNum -> src_num
recState -> rec_state
+ rec_state_type
stopTime -> stop_time
List of all recorders, updated every 3 seconds.
topic/recorder
{
"type": "recorders",
"recorders": [
{
"id": "0_19",
"src_num": 0,
"rec_num": 19,
"type": "P25C",
"duration": 706.50,
"freq": 457750000,
"count": 73,
"rec_state": 4,
"rec_state_type": "IDLE",
"squelched": false
},
{
...
}
],
"timestamp": 1686699405,
"instance_id": "east-antenna"
}Changes:
recorders
srcNum -> src_num
recNum -> rec_num
state -> rec_state
+ rec_state_type
+ squelched
Recorder status updates.
topic/recorder
{
"type": "recorder",
"recorder": {
"id": "4_16",
"src_num": 4,
"rec_num": 16,
"type": "P25",
"freq": 852200000,
"duration": 21182.10,
"count": 3563,
"rec_state": 4,
"rec_state_type": "IDLE",
"squelched": false
},
"timestamp": 1686700173,
"instance_id": "east-antenna"
}Changes:
recorder
srcNum -> src_num
recNum -> rec_num
state -> rec_state
+ rec_state_type
+ squelched
Sent when a new trunked call starts, or when a conventional recorder is reset after a call.
topic/call_start
{
"type": "call_start",
"call": {
"id": "2_3029_1686700194",
"call_num": 51684,
"sys_num": 2,
"sys_name": "p25trunk",
"freq": 770331250,
"unit": 849183,
"unit_alpha_tag": "Metro Dispatch",
"talkgroup": 3029,
"talkgroup_alpha_tag": "Metro Police N",
"talkgroup_description": "Metro Dispatch North",
"talkgroup_group": "Metro Police",
"talkgroup_tag": "Law Dispatch",
"talkgroup_patches": "",
"elapsed": 0,
"length": 0,
"call_state": 0,
"call_state_type": "MONITORING",
"mon_state": 6,
"mon_state_type": "DUPLICATE",
"audio_type": "digital",
"phase2_tdma": false,
"tdma_slot": 0,
"analog": false,
"rec_num": -1,
"src_num": -1,
"rec_state": -1,
"rec_state_type": "",
"conventional": false,
"encrypted": false,
"emergency": false,
"start_time": 1686700194,
"stop_time": 1686700194
},
"timestamp": 1686700194,
"instance_id": "east-antenna"
}Changes:
call
callNum -> call_num
sysNum -> sys_num
shortName -> sys_name
talkgrouptag -> talkgroup_alpha_tag
+ talkgroup_description
+ talkgroup_group
+ talkgroup_tag
+ talkgroup_patches
srcId -> unit
+ unit_alpha_tag
state -> call_state
+ call_state_type
monState -> mon_state
+ mon_state_type
+ audio_type
phase2 -> phase2_tdma
+ tdma_slot
recNum -> rec_num
srcNum -> src_num
recState -> rec_state
+ rec_state_type
+ start_time
stopTime -> stop_time
Sent after trunk-recorder completes recording a call.
topic/call_end
{
"type": "call_end",
"call": {
"id": "3_401_1701185024",
"call_num": 482,
"sys_num": 3,
"sys_name": "p25trunk",
"freq": 859200000,
"unit": 1849262,
"unit_alpha_tag": "Dispatch",
"talkgroup": 401,
"talkgroup_alpha_tag": "DISP 1",
"talkgroup_description": "Dispatch 1",
"talkgroup_group": "State Police",
"talkgroup_tag": "Law Dispatch",
"talkgroup_patches": "",
"elapsed": 0,
"length": 0.36,
"call_state": -1,
"call_state_type": "COMPLETED",
"mon_state": 0,
"mon_state_type": "UNSPECIFIED",
"audio_type": "digital tdma",
"phase2_tdma": true,
"tdma_slot": 1,
"analog": false,
"rec_num": -1,
"src_num": -1,
"rec_state": 6,
"rec_state_type": "STOPPED",
"conventional": false,
"encrypted": false,
"emergency": false,
"start_time": 1701185024,
"stop_time": 1701185024,
"process_call_time": 1701185029,
"error_count": 0,
"spike_count": 0,
"retry_attempt": 0,
"freq_error": -40,
"signal": 999,
"noise": 999,
"call_filename": "/data/trunk-recorder/p25trunk/2023/12/28/401-1701185024_859200000.1-call_106.m4a"
},
"timestamp": 1701185029,
"instance_id": "east-antenna"
}Changes:
call
+ id
short_name -> sys_name
+ sys_num
callNum -> call_num
+ elapsed
+ call_state
+ call_state_type
+ mon_state
+ mon_state_type
+ rec_num
+ src_num
+ rec_state
+ rec_state_type
+ conventional
+ call_filename
Sent after trunk-recorder completes recording a call. Includes selected audio as base64 encoded blob and call metadata from trunk-recorder.
Base64 encoding of audio generates large MQTT packets. The broker must be able to process messages significantly larger than the source audio recordings.
topic/audio
{
"type": "audio",
"call": {
"audio_wav_base64": "ABgAwP9AAM...=",
"audio_m4a_base64": "",
"metadata": {
"call_filename": "300-1713207802_154875000.0-call_12.wav",
"freq": 154875000,
"freq_error": -342,
"signal": -23,
"noise": -50,
"source_num": 0,
"recorder_num": 14,
"tdma_slot": 0,
"phase2_tdma": 0,
"start_time": 1713207802,
"stop_time": 1713207845,
"emergency": 0,
"priority": 0,
"mode": 0,
"duplex": 0,
"encrypted": 0,
"call_length": 33,
"talkgroup": 300,
"talkgroup_tag": "Chem Law Disp",
"talkgroup_description": "Chemung CW Police Dispatch",
"talkgroup_group_tag": "Law Dispatch",
"talkgroup_group": "Law",
"audio_type": "digital",
"short_name": "chemung-ny",
"freqList": [
{
"freq": 154875000,
"time": 1713207802,
"pos": 0.0,
"len": 3.24,
"error_count": 50,
"spike_count": 3
},
{
"freq": 154875000,
"time": 1713207806,
"pos": 3.24,
"len": 0.9,
"error_count": 0,
"spike_count": 0
}
],
"srcList": [
{
"src": 104,
"time": 1713207802,
"pos": 0.0,
"emergency": 0,
"signal_system": "",
"tag": ""
},
{
"src": 139,
"time": 1713207806,
"pos": 3.24,
"emergency": 0,
"signal_system": "",
"tag": ""
}
]
}
},
"timestamp":1713208679,
"instance_id":"trunk-recorder"
}Plugin status message, sent on startup or when the broker loses connection. The message is retained on the MQTT broker.
topic/trunk_recorder/status
{
"client_id": "tr-status",
"instance_id": "east-antenna",
"status": "connected"
}Channel grants. Sent when a call starts.
unit_topic/shortname/call
{
"type": "call",
"call": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 804329,
"unit_alpha_tag": "State Port. 329",
"talkgroup": 301,
"talkgroup_alpha_tag": "State Disp 1",
"talkgroup_description": "State Police Dispatch 1",
"talkgroup_group": "State PD",
"talkgroup_tag": "Law",
"talkgroup_patches": "",
"call_num": 51869,
"start_time": 1686700982,
"freq": 770581250,
"encrypted": false
},
"timestamp": "1686700985",
"instance_id": "east-antenna"
}Changes:
call
+ sys_num
system -> sys_name
callNum -> call_num
unit_alpha -> unit_alpha_tag
+ talkgroup_description
+ talkgroup_group
+ talkgroup_tag
Call end information by transmission. Reports information for conventional units.
unit_topic/shortname/end
{
"type": "end",
"end": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 129262,
"unit_alpha_tag": "Dispatch",
"talkgroup": 401,
"talkgroup_alpha_tag": "DISP 1",
"talkgroup_description": "Dispatch 1",
"talkgroup_group": "State Police",
"talkgroup_tag": "Law Dispatch",
"talkgroup_patches": "",
"call_num": 482,
"freq": 850000000,
"position": 0,
"length": 0.36,
"emergency": false,
"encrypted": false,
"start_time": 1701185024,
"stop_time": 1701185024,
"error_count": 0,
"spike_count": 0,
"sample_count": 2880,
"transmission_filename": "/dev/shm/p25trunk/401-1701185024_850000000.1.wav"
},
"timestamp": 1701185029,
"instance_id": "east-antenna"
}Changes:
call
callNum -> call_num
+ sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
+ talkgroup_tag
+ transmission_filename
- call_filename
- signal_system
Unit registration (radio turned on)
unit_topic/shortname/on
{
"type": "on",
"on": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 806308,
"unit_alpha_tag": "State Port. 308"
},
"timestamp": 1686711527,
"instance_id": "east-antenna"
}Changes:
on
+ sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
Unit de-registration (radio turned off)
unit_topic/shortname/off
{
"type": "off",
"off": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 804422,
"unit_alpha_tag": "State Port. 422"
},
"timestamp": 1686711529,
"instance_id": "east-antenna"
}Changes:
off
+ sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
Unit acknowledge response.
unit_topic/shortname/ackresp
{
"type": "ackresp",
"ackresp": {
"sys_num": 2,
"sys_name": "p25trunk",
"unit": 52001,
"unit_alpha_tag": "FD Mobile 001"
},
"timestamp": 1686711630,
"instance_id": "east-antenna"
}Changes:
ackresp
+ sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
Unit group affiliation
unit_topic/shortname/join
{
"type": "join",
"join": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 806109,
"unit_alpha_tag": "State Port. 109",
"talkgroup": 401,
"talkgroup_alpha_tag": "State Disp 1",
"talkgroup_description": "State Police Dispatch 1",
"talkgroup_group": "State PD",
"talkgroup_tag": "Law",
"talkgroup_patches": ""
},
"timestamp": 1686711676,
"instance_id": "east-antenna"
}Changes:
join
sysNum -> sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
+ talkgroup_description
+ talkgroup_group
+ talkgroup_tag
Unit data grant
unit_topic/shortname/data
{
"type": "data",
"data": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 849006,
"unit_alpha_tag": ""
},
"timestamp": 1686712418,
"instance_id": "east-antenna"
}Changes:
data
+ sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
Unit answer request
unit_topic/shortname/ans_req
{
"type": "ans_req",
"ans_req": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 2048,
"unit_alpha_tag": "",
"talkgroup": 12582912,
"talkgroup_alpha_tag": "",
"talkgroup_description": "",
"talkgroup_group": "",
"talkgroup_tag": "",
"talkgroup_patches": ""
},
"timestamp": 1686712433,
"instance_id": "east-antenna"
}Changes:
ans_req
+ sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
+ talkgroup_description
+ talkgroup_group
+ talkgroup_tag
Unit location update
unit_topic/shortname/location
{
"type": "location",
"location": {
"sys_num": 3,
"sys_name": "p25trunk",
"unit": 54126,
"unit_alpha_tag": "FD Port. 126",
"talkgroup": 23507,
"talkgroup_alpha_tag": "FD",
"talkgroup_description": "Fire Dispatch 4",
"talkgroup_group": "City Fire",
"talkgroup_tag": "Fire",
"talkgroup_patches": ""
},
"timestamp": 1686712458,
"instance_id": "east-antenna"
}Changes:
location
sysNum -> sys_num
system -> sys_name
unit_alpha -> unit_alpha_tag
+ talkgroup_description
+ talkgroup_group
+ talkgroup_tag
Overview of trunking messages that have been decoded.
message_topic/shortname/messages
{
"type": "message",
"message": {
"sys_num": 3,
"sys_name": "p25trunk",
"trunk_msg": 3,
"trunk_msg_type": "CONTROL_CHANNEL",
"opcode": "39",
"opcode_type": "SCCB",
"opcode_desc": "Secondary Control Channel Broadcast",
"meta": "tsbk39 secondary cc: rfid .... "
},
"timestamp": 1686712507,
"instance_id": "east-antenna"
}Console log messages forwarded over MQTT.
topic/trunk_recorder/console
{
"type": "console",
"console": {
"time": "2023-08-07T12:07:06.327966",
"severity": "info",
"log_msg": "[sname] 143C TG: 12300 ( Eastport FD Disp) Freq: 771.581250 MHz Rdio Scanner Upload Success - file size: 18175"
},
"timestamp": 1691424426,
"instance_id": "east-antenna"
}