[arm-allstar] Help programming ASL on Hamvoip to connect & disconnect at particular times
Rachid Karroo
rkarroo at gmail.com
Sun Jun 16 06:27:26 EDT 2019
Doug, thank you very much for all the infos.
It is clear now because I was not understanding the series of numbers &
symbols for setting the day and time.
<thumb up>
73's
Rachid
3B8FP
On Sat, Jun 15, 2019 at 10:05 PM "Doug Crompton via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Rachid,
>
> This is very easy. You could do it in rpt.conf but If you want to do it in
> a cron (that is the way I do it here) you need to understand cron. There
> are many sites that detail how to use it. Here is one -
>
> https://www.adminschoice.com/crontab-quick-reference
>
> So that shows you how to setup times days etc.
>
> So lets say you want to connect a specific node at a certain time and day.
> You use crontab -e and you are in the editor. Here is an example. There
> are spaces between the parameters! -
>
> # Connect to a node
> 30 20 * * 1 /etc/asterisk/local/connect.sh 40000
>
> Using the script below this would connect node 40000 to your node at 8:30
> PM on Monday night. Remember the first parameter is minutes and the second
> is hour in 24 hour time. The week starts on Sunday which is 0 so the 1 is
> monday.
>
> Script the cron calls -
>
> #!/bin/bash
> asterisk -rx "rpt fun $NODE1 *73$1"
>
> $NODE1 is your first node. If it is a different node on that server replace
> with the node number. The $1 is the node parameter passed from the cron.
>
> Save this in /etc/asterisk/local/connect.sh and make it executable - chmod
> 755 connect.sh
>
> Now at the prescribed time it will connect to the requested node. You
> could make another script called disconnect.sh. The lines would just be -
>
> #!/bin/bash
> asterisk -rx "rpt fun $NODE1 *71$1"
>
> I show permanent connects here but it could be *3 and *1 if you did not
> want that. Usually you want permanent connects though.
>
> The flexibility of using a script would allow you to add things if you like
> for instance you could connect to multiple nodes and do other commands
> within the script.
>
>
> *73 Doug*
>
> *WA3DSP*
>
> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
>
> On Sat, Jun 15, 2019 at 12:39 PM "Rachid Karroo via ARM-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
> > Good day to all
> > I need to have my node to connect and disconnect to a particular Node(s)
> > during week days.
> >
> > I understand that I will have to define it in Cron jobs.
> > Is there any documentation available that I could read and experiment
> > please ?
> >
> > Thank you
> > 73's
> >
> > Rachid
> > 3B8FP
> > Node 40248
> > _______________________________________________
> >
> > 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
> >
> _______________________________________________
>
> 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