[arm-allstar] on connect script help
David McGough
kb4fxc at inttek.net
Fri Apr 15 12:07:28 EDT 2022
Russell,
You can pull data from the /var/log/asterisk/astdb.txt file for each node
number and use that data to give more info about the nodes.
Something to be aware of however, is that the astdb.txt file data
"quality" isn't fantastic, since users are allowed to basically enter
free-form data on the ASL portal site. Also, there are even cases where
the node Trustee's callsign is missing, which IMO is not good.
Here is a simple bash example to extract the callsign column from this
file for node 2286:
NODE=2286
ASTDB="/var/log/asterisk/astdb.txt"
CALL=$(awk '-F|' '$1 ~ /^'$NODE'$/ {print "callsign: "$2}' < $ASTDB)
echo $CALL
73, David KB4FXC
On Wed, 13 Apr 2022, "Russell Thomas via ARM-allstar" wrote:
> I've been running this bash script for a few years, and it's functioned
> flawlessly.
>
> echo "Node $2 connected to node $1 at $(date +%Y-%m-%d.%H:%M:%S):" | mail
> -s "My repeater" 6165551212 at vtext.com # verizon text message
>
> Are there variables I can use to get the callsign and/or the node
> information to "pretty up" my message?
>
> 47923 KV4S 432.200 Chelsea, Alabama
>
> 73,
> Russell Thomas, KV4S
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>
More information about the ARM-allstar
mailing list