Add P25 Call Alert (TSBK 0x1F) decoding with plugin hook#1143
Merged
Conversation
Decodes Call Alert messages from the P25 control channel: - Extracts source unit ID (bits 16-39) and target unit ID (bits 40-63) - Sets message_type = CALL_ALERT and populates source/talkgroup fields - Logs at info level: tsbk1f\tCall Alert\tSource Unit: X\tTarget Unit: Y - Adds CALL_ALERT case to monitor_systems.cc message dispatch switch Includes Dockerfile and patch script for building against a pinned upstream commit to maintain plugin ABI compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The original PR added CALL_ALERT decoding and a switch case, but left
the case as an empty break so plugins never saw the event. This adds
the missing plugin-manager hooks the patch notes described:
- Plugin_Api::unit_call_alert(...) no-op default in plugin_api.h
- plugman_unit_call_alert(...) in plugin_manager.{h,cc}, matching the
unit_answer_request pattern
- unit_call_alert() helper in monitor_systems.cc, and the CALL_ALERT
case now actually calls it
Also drops files that don't belong in the tree:
- CALL-ALERT-PATCH.md (developer patch notes, not user docs)
- Dockerfile.call-alert (builder-specific Dockerfile)
- patches/simplestream-dangling-pointer.patch (already merged in #1107)
Collaborator
Author
|
Let's do this! |
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.
Picks up #1126 from @hoosierscanner and finishes the wiring that was
described in the original patch notes but not actually included.
What the original PR did
CALL_ALERT = 18toMessageType(parser.h)p25_parser.cc— extracts source unit (bits16–39) and target unit (bits 40–63), sets
message.message_type,message.source,message.talkgroup, logs at info levelcase CALL_ALERT:to the dispatch switch inmonitor_systems.cc(emptybreak)What this PR adds on top
The
CALL-ALERT-PATCH.mdin the original PR claimed it added aunit_call_alertplugin hook, but those changes weren't actually inthe diff — the switch case was a no-op so plugins never saw the
event. Fixed here:
Plugin_Api::unit_call_alert(System*, long source_id, long talkgroup)no-op default in
plugin_api.h— backward-compatible with existingplugins
plugman_unit_call_alert(...)declared inplugin_manager.handimplemented in
plugin_manager.cc, matching theplugman_unit_answer_requestpatternunit_call_alert()helper inmonitor_systems.cc, and theCALL_ALERTcase now calls it so plugins actually receive the eventAlso drops three files from the original PR that don't belong in the
tree:
CALL-ALERT-PATCH.md— developer-facing patch notes, not user docsDockerfile.call-alert— builder-specific image, not a project assetpatches/simplestream-dangling-pointer.patch— that fix alreadylanded in fix(simplestream): dangling pointer in sendJSON length prefix #1107
Test plan
cmake .. && make trunk-recorderbuilds cleanlytsbk1f Call Alertlinesappear with correct source/target unit IDs
unit_call_alertreceives theevent
Credits: original decoding work by @hoosierscanner in #1126.