[arm-allstar] Link to Net

Doug Crompton wa3dsp at gmail.com
Mon Nov 19 18:10:00 EST 2018


Chris,

 This could all be done in a cron or in a combination of a cron and a
script which would be better. Here is an example. These scripts assume a
permanent connect until disconnected.

#!/bin/bash
# Connect script   -  node_connect.sh <node> [source_node]
If [ -z $2 ]
 then
    node=$NODE1
 else
    node=$2
fi
/usr/sbin/asterisk -rx "rpt fun $node *73$1"
# END connect script

#!/bin/bash
#Disconnect script   -  node_disconnect.sh <node> [source_node]
If [ -z $2 ]
 then
    node=$NODE1
 else
    node=$2
fi
/usr/sbin/asterisk -rx "rpt fun $node *71$1"

# END disconnect script

cron examples using above scripts - assuming scripts are in
/etc/asterisk/local
scripts have to be executable -  chmod 750

# At 12 noon on Wednesdays connect node 40000 to first node ($NODE1)
00 12 * * 3 /etc/asterisk/local/connect_node.sh 40000

# At 2 PM  on Wednesdays disconnect node 40000 from first node ($NODE1)
00 14 * * 3 /etc/asterisk/local/disconnect_node.sh 40000

# At 6AM everyday connect node 40000 to local node 40001
00 06 * * * /etc/asterisk/local/connect_node.sh 40000 40001

# At 10PM everyday disconnect node 40000 from local node 40001
00 22 * * * /etc/asterisk/local/disconnect_node.sh 40000 40001

Google cron to see more timing options.

In most cases you are dealing with the first node so you can leave off the
source node number as shown in the first example.
To check that  do -   echo $NODE1  - to see that it is set to the first
node. If that is the intended node you can leave the source_node off.


*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*

On Mon, Nov 19, 2018 at 4:59 PM "Chris Viningre via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> What is the best way to auto connect my node to a daily net. I want it to
> connect and disconnect automatically. I'm guessing with a cron job or
> something in rpt.conf. If it can be done in a cron, then what command would
> I use?
>
> Chris Viningre WS5B
> 70 W. Roadrunner
> Salt Flat, Texas 79847
> C:(915) 504-1510
> chrisviningre at gmail.com
> _______________________________________________
>
> 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 web page - http://hamvoip.org
>


More information about the ARM-allstar mailing list