Add P25 Call Alert (TSBK 0x1F) ingest and display#36
Merged
LumenPrima merged 1 commit intotrunk-reporter:masterfrom Apr 15, 2026
Merged
Add P25 Call Alert (TSBK 0x1F) ingest and display#36LumenPrima merged 1 commit intotrunk-reporter:masterfrom
LumenPrima merged 1 commit intotrunk-reporter:masterfrom
Conversation
⚠️ DEPENDS ON TWO UPSTREAM PRs — DO NOT MERGE UNTIL BOTH ARE IN: 1. TrunkRecorder/trunk-recorder#1126 — decodes TSBK 0x1F into CALL_ALERT message type and dispatches via plugin API 2. TrunkRecorder/tr-plugin-mqtt#8 — implements unit_call_alert() in mqtt_status plugin, publishes to tr/units/{sys}/call_alert Without those two PRs, trunk-recorder will never emit call_alert MQTT messages and this handler will never fire. --- Ingest (internal/ingest/): - router.go: routes tr/units/{sys}/call_alert → unit_event handler - messages.go: adds TargetUnit/TargetUnitAlphaTag fields to UnitEventData - handler_units.go: handles call_alert subtype — upserts both source and target units, stores target_unit in metadata_json, publishes SSE as unit_event:call_alert with target_unit/target_unit_alpha_tag fields - router_test.go, handler_units_test.go: full test coverage for routing, payload parsing, and round-trip API (openapi.yaml): - Adds call_alert to EventType enum - Documents target_unit/target_unit_alpha_tag SSE payload fields Web UI: - events.html: red bold CALL ALERT badge, Unit A → Unit B detail, dedicated filter checkbox - index.html (Event Horizon): call alert row in rate meter (red), red streak in background canvas - omnitrunker.html: red CALL ALERT badge, target unit in TG columns, Call Alert filter option - omnitrunker-classic.html: same as omnitrunker - irc-radio-live.html: 🚨 CALL ALERT: UnitA → UnitB posted to *status (no talkgroup affiliation, so it goes to the system status channel) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Code reviewFound 1 issue:
tr-engine/internal/ingest/handler_units.go Lines 84 to 94 in cc84324 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will not function without the following two PRs being merged first. There is no trunk-recorder code to emit call_alert MQTT messages until they land:
CALL_ALERTmessage type and dispatches it through the plugin APIunit_call_alert()in mqtt_status plugin — publishes payload totr/units/{sys_name}/call_alertIf either is missing, trunk-recorder silently drops all Call Alert TSBK messages and tr-engine receives nothing on this topic.
What is a P25 Call Alert?
A Call Alert (TSBK opcode 0x1F) is a directed unit-to-unit page — one radio paging another with no voice channel. Common use: CAD dispatcher silently paging an individual officer. No audio. The MQTT message carries source unit and target unit IDs only.
MQTT topic:
tr/units/{sys_name}/call_alertChanges
Ingest (
internal/ingest/)tr/units/{sys}/call_alertto theunit_eventhandler as subtypecall_alertTargetUnit/TargetUnitAlphaTagfields toUnitEventDatatarget_unitinmetadata_json, publishes SSE asunit_event:call_alertwithtarget_unitandtarget_unit_alpha_tagAPI (
openapi.yaml)call_alertto theEventTypeenumtarget_unit/target_unit_alpha_tagSSE payload fieldsWeb UI
Unit A → Unit Bdetail, dedicated filter checkboxTest plan
tr/units/{sys}/call_alertmessages arrive at MQTT brokerunit_eventswithmetadata_json.target_unit🤖 Generated with Claude Code