Repository navigation
Conversation
The decoder reports encryption from each superframe's ESS as a JSON message with no "type" field, which check_message_queue() ignored. A call whose grant did not set the encrypted service option was therefore marked unencrypted even though every voice frame was muted for lack of a key, producing silent recordings labelled encrypted: 0. Log the algid/keyid once per call and set the call's encrypted flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hey @jfgreco, I don't maintain this repo, but I maintain a fork, so take this as feedback, not a block. The parsing change looks fine: it handles a message that's currently dropped, and clear calls are unaffected. One thing I think needs fixing before merge is the description. It says setting the flag mid-call "only affects the call metadata", but on current Once
So the whole call is dropped, not just relabeled. That includes any clear transmissions earlier in the same call. If one unit keys up encrypted partway through a call on a normally clear talkgroup, the clear audio from everyone else in that call is discarded too. Dropping silent ESS-encrypted calls may be the right result, but it should be deliberate and documented. Two options:
As the testing section notes, we haven't exercised the encrypted path yet. It would be good to see at least one real ESS-encrypted call go through before merge, to confirm the log line fires once and the call is handled as expected. Thanks! |
Flag P25 Phase 2 calls as encrypted when the voice channel ESS says so
p25p2_tdmareports the encryption state from each superframe's ESS as anM_P25_JSON_DATAmessage ({"encrypted": 0|1, "algid": …, "keyid": …}). That message has no"type"field, sop25_recorder_decode::check_message_queue()drops it.The result: when a talkgroup's grant doesn't set the encrypted service option but the voice is encrypted, the decoder mutes every frame for lack of a key, and the call is uploaded as a silent recording labelled
"encrypted": 0. There's nothing in the log to tell that apart from a decoding problem.Change
In
check_message_queue(), handle the ESS message. The first time a call's ESS reports encryption, log the algid/keyid atinfoand set the call'sencryptedflag:Setting the flag mid-call only affects the call metadata (
encryptedin the call JSON). The start-of-call decision to skip encrypted talkgroups inmonitor_systems.ccis unchanged.Testing
🤖 Generated with Claude Code