diff --git a/trunk-recorder/main.cc b/trunk-recorder/main.cc index e40f5f169..6c7da8329 100644 --- a/trunk-recorder/main.cc +++ b/trunk-recorder/main.cc @@ -727,6 +727,16 @@ void handle_message(std::vector messages, System *sys) { unit_answer_request(sys, message.source, message.talkgroup); break; + case TDU: + { + //Control Channel may have retuned to an active data channel. Do not count the message. + int msg_count = sys->get_message_count(); + if(msg_count > 1){ + sys->set_message_count(msg_count - 1); + } + } + break; + case UNKNOWN: break; } diff --git a/trunk-recorder/systems/p25_parser.cc b/trunk-recorder/systems/p25_parser.cc index 11e330cb9..e2fa2c5fb 100644 --- a/trunk-recorder/systems/p25_parser.cc +++ b/trunk-recorder/systems/p25_parser.cc @@ -1006,6 +1006,11 @@ std::vector P25Parser::parse_message(gr::message::sptr msg, System */ } + if (type == 3 || type == 15) + { + message.message_type = TDU; + } + if (type == 7) { // # trunk: TSBK boost::dynamic_bitset<> b((s.length() + 2) * 8); diff --git a/trunk-recorder/systems/parser.h b/trunk-recorder/systems/parser.h index dbae447e8..3a2d9b0ca 100644 --- a/trunk-recorder/systems/parser.h +++ b/trunk-recorder/systems/parser.h @@ -20,6 +20,7 @@ enum MessageType { UU_ANS_REQ = 13, UU_V_GRANT = 14, UU_V_UPDATE = 15, + TDU = 16, UNKNOWN = 99 };