Small shell scripts for managing AllStarLink / app_rpt node connections via the Asterisk CLI. Written for use on AllStarLink (ASL3) and HamVoIP nodes.
- Asterisk with
app_rptinstalled (/usr/sbin/asterisk) /usr/local/etc/allstar.envdefiningNODE1(your local node number), where required by a script
Connects the local node to the specified remote node (rpt cmd ilink 3).
Disconnects all links from a hardcoded node (rpt cmd ilink 6). Edit the node number in the script to match your setup.
Disconnects any current link(s), then connects to the specified node — useful for switching ("QSY") between nodes in one step.
Creates /usr/local/etc/allstar.env with a detected NODE1 value on AllStarLink 3 (ASL3) systems, using the same node-discovery logic as node-auto-reconnect.sh (checks rpt nodes, then falls back to parsing rpt.conf).
- Exits without changes if the system is detected as HamVoIP (which already ships
allstar.env) - Exits without changes if
allstar.envalready exists, unless-f/--forceis passed - Requires permission to write to
/usr/local/etc(typically root)
Intended to run periodically (e.g. via cron) to keep a node connected to a preferred hub node.
primary_node- node to connect to first (default:53573)fallback_node- node to connect to if the primary connection fails (default:47977)- Auto-detects
NODE1fromallstar.env,rpt nodes, orrpt.confif not already set - Auto-detects system flavor (HamVoIP vs AllStarLink) and picks the correct
rpt showvars/rpt show variablessyntax accordingly - Skips reconnect if a
NO_RECONNECT_SCRIPT=1variable is set on the node, or if links are already active - Connects to the primary node, falling back to the fallback node if the primary connection fails
Add a line like the following via crontab -e (or /etc/crontab) to run at boot and every 15 minutes thereafter:
@reboot /root/node-auto-reconnect.sh > /dev/null 2>&1
*/15 * * * * /root/node-auto-reconnect.sh > /dev/null 2>&1
Check installed cron jobs with crontab -l. To use non-default primary/fallback nodes, pass them as arguments, e.g. /root/node-auto-reconnect.sh 53573 47977.
- These scripts assume passwordless execution of
asterisk -rx(i.e. run as a user with permission to talk to the Asterisk CLI, typically root or via sudo). - Node numbers hardcoded in scripts (e.g. NWAG node numbers,
node-disconnect-all.sh) should be reviewed/updated for your own setup before use.
These scripts are provided "as is", without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement. Use them entirely at your own risk.
You are solely responsible for reviewing, testing, and adapting these scripts before use, and for ensuring your use of them complies with your Asterisk/AllStarLink/HamVoIP node configuration, your amateur radio license conditions, and any applicable local regulations. In no event shall the authors or contributors be liable for any claim, damages, service disruption, or other liability arising from the use of these scripts.