This might take a bit of explanation, but I'm seeking a solution to the issue of large networks being connected to a node (which itself is part of a large network). I've looked at scripting - using the connect event script to fire off a script that interrogates the node, and while I can obtain useful information from 'asterisk -r -x "rpt showvars "' and 'asterisk -r -x "rpt stats <mynode"', I don't seem to have the information I need.
I can see all nodes that are connected directly and indirectly to mine, but what I also need is which indirectly nodes are linked via which directly connected node, so I can disconnect the node that potentially could cause an issue. I already have a friendly "please don't bridge in any large networks" policy to cover the user side.
The script I'm wanting to write is intended as a "rapid intervention" to prevent/stop issues, before any more intensive manual administrative tasks (e.g. contacting users, banning nodes, etc).
How can I determine what node a large network is connected in via reliably? Using the last DTMF command is unlikely to help, as all or almost all previous incidents have been incoming connections, and comparing number of linked nodes before and after connecting doesn't cover the case where someone connects to me before connecting to a large network.
I'm looking for solutions for both ASL 1.x and 3.x (the 3.x is currently the more urgent case). Any scripting gurus able to help? Once I can obtain the information I need from AllStar, I should be able to write a Bash script to make it work. I've done similar for Echolink conferences using thebridge years ago, but Echolink has a handy "in conference" flag that I can look for, and disconnect stations which have that flag set.