Add unit_call_alert for P25 Call Alert (TSBK 0x1F) messages#8
Open
hoosierscanner wants to merge 1 commit into
Open
Add unit_call_alert for P25 Call Alert (TSBK 0x1F) messages#8hoosierscanner wants to merge 1 commit into
hoosierscanner wants to merge 1 commit into
Conversation
Publishes directed unit-to-unit page events to MQTT when trunk-recorder
decodes a Call Alert (TSBK opcode 0x1F). Call Alerts contain only source
and target unit IDs — no audio, no talkgroup.
Topic: topic_unit/<shortname>/call_alert
Payload:
{
"sys_num": 1,
"sys_name": "pscsite4",
"unit": 4810011,
"unit_alpha_tag": "",
"target_unit": 4811289,
"target_unit_alpha_tag": ""
}
Requires the CALL_ALERT message type added to trunk-recorder core:
TrunkRecorder/trunk-recorder#1126
Verified on a live P25 system — call_alert events fire correctly and
are received by downstream consumers (tr-engine).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hoosierscanner
added a commit
to hoosierscanner/tr-engine
that referenced
this pull request
Apr 11, 2026
⚠️ 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>
8 tasks
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.
Summary
Adds
unit_call_alert()to the mqtt_status plugin to publish P25 Call Alert events (TSBK opcode 0x1F) to MQTT.Call Alerts are directed unit-to-unit pages — one radio paging another with no audio. Previously these were silently discarded.
Topic
topic_unit/<shortname>/call_alertPayload
{ "sys_num": 1, "sys_name": "pscsite4", "unit": 4810011, "unit_alpha_tag": "", "target_unit": 4811289, "target_unit_alpha_tag": "" }Depends on
Requires
CALL_ALERTmessage type andunit_call_alertplugin API added to trunk-recorder core:Verified
Tested on a live P25 system. Call Alert events decode correctly, publish to MQTT, and are received by downstream consumers.
🤖 Generated with Claude Code