Auto disconnect TX node timeout

Greetings, all:

I run a parrot node on 55553. Today, there was an incident where someone issued a cop,4 to their node, then left it connected for at least 8 hours, transmitting a 1k tone, which prevented it’s use.
I want to implement one of a couple of measures to prevent this from happening in future, since I’m not always around to see what’s going on with the node.

Idea 1: automatically disconnect any node that has not transmitted to the system in X seconds, preferably with a whitelist.
Idea 2: Automatically disconnect a node that has transmitted for x seconds.
Maybe even both.

The parrot node isn’t typical in that there is no reason for long transmissions. I’d say, probably, anything longer than 30 seconds doesn’t need to happen at all, and most of the time when this does happen, it’s due to a bad configuration on someone’s node, or an accidental bridge.

Could this be done with app_rpt events and some scripting?
Has anyone done anything like this?

I rely heavily on events to make the parrot functions happen for this node, but I am only aware of the very basics of what can be done with them, and am no good with regexp, particularly.

Thanks and 73
N2DYI

Yes, you can do it with AMI similar to how Allmon3 works. In fact, if you know Python, a bunch of the code is already available for you.

I can see possible methods to use events. However, I’d prefer this kind of timeout be in rpt.conf. I have not played with link activity timer, but I wonder if it might be utilized. Some other VoIP systems have TX / RX timeouts that automatically disconnect offending connections. Muting might be a better alternative, but Allstar does not provide a mute feature either.
https://wiki.allstarlink.org/wiki/Link_Activity_Timer