[arm-allstar] Connection Scripts

Doug Crompton wa3dsp at gmail.com
Mon Nov 7 12:32:28 EST 2016


Matt,

 You certainly can both within Allstar and in Linux. I prefer the Linux
route. You can make scripts to execute any Allstar (or Asterisk) command
and then use cron to execute the script at a specific time. I will repeat
here but this example script is shown in the /etc/asterisk/local
directory on your system.

A script to connect to a node to the Alaska morning net time would look
like this -

# Example Script showing connect to Alaska Morning Net
# Change the 'your_node' to your node
# and the 'connect_to_node' to where you want to connect
# *omit the < and >*
# Run from a cron job that specifies the connect time
#
# This cron example shows how to enter into cron
# type crontab -e  and add the line, change as needed
#
# The example shows at 12:44 (times are 24 hour) on
# Monday through Saturday run the alaska_connect
# script in the /etc/asterisk/local directory
#
# Modify this script to your needs
#
# 44 12 * * 1-6 /etc/asterisk/local/alaska_connect.sh
#

/usr/sbin/asterisk -rx "rpt fun <your_node> *73<connect_to_node>"

# End of script

I call this script alaska_connect.sh and it is in the /etc/asterisk/local
directory.
The script needs to be made executable -

chmod 750 alaska_connect.sh

Then you need to enter a cron job for it.

crontab -e

Then add the parameters for the start time

50 12 * * 1-6 /etc/asterisk/local/alaska_connect.sh

This says do the connect by executing the script at 12:55 on Monday through
Saturday

Then create another script to disconnect and likewise ad a cron entry for
the disconnect time.

cron entries are 24 hours -  hour, min, day, month, weekday

Test the script manually to make sure it works.

Specify the entire path to execute -  /etc/asterisk/local/alaska_connect.sh

Of course use  file names and values for what you want to do.

It is also a good habit to use *76 before connecting to disconnect all
other nodes and make sure you are not connecting things together that
should not be. You would add a line in the script -

 /usr/sbin/asterisk -rx "rpt fun <your_node> *76

Before your connect line.



*73 Doug*

*WA3DSP*

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

On Mon, Nov 7, 2016 at 4:24 AM, Matt Benteman via arm-allstar <
arm-allstar at hamvoip.org> wrote:

> Hello Group!
>
> Newbie here. I've got my node (43940) up and running and would like to set
> up some rules or scripts within it to connect to (and eventually disconnect
> from) specific nodes at different times of day.
>
> An example would be to connect to the WIN system during the Insomniac Net,
> etc.
>
> Is this possible?
>
> Thanks in advance,
>
> Matt
> KF5WPV
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2 web page - http://hamvoip.org
>
>


More information about the arm-allstar mailing list