AllstarLink Disable and Enable incoming connections

Disable and Enable incoming connections during certain hours and with DTMF

Edit the rpt.conf file and in the [Function] Stanza add the following 2 lines (980 and 981 can be any available numbers)
980=cop,49 ; Disable Incoming Connections (Control State noice) *980 981=cop,50 ; Enable Incomming Connections (Control State noicd) *981

save the changes then create a cron

To set a cron Log into the node using PUTTY

Select option 9 - Start Bash Shell Interface

type crontab -e

add the following lines Change XXXXX to your Node Number

#Disable all incoming connections at 11 pm every day on XXXXX 00 23 * * * /usr/sbin/asterisk -rx "rpt fun XXXXX *980"
#Enable all incoming connections at 7 am every day on XXXXX 00 07 * * * /usr/sbin/asterisk -rx "rpt fun XXXXX *981"

Then hit Control O Select Y then Control X

(Write out, Accecpt,Exit) Change the times as needed

If you are using SuperMon you can log in and hit the button marked <CONTROL> Then from the drop down menu select Disable or Enable Incoming connections and then press Execute.

Don't forget to run from the main login screen the Option 1 Perform a System Update option. There are bug fixes and updates that you can do.


After all changes are made either Restart Asterisk Option 13

or Reboot the system Option 15 and exit.

This should be all you need to disable and enable connections between certain hours but still have the ability to enable/disable as needed via DTMF

This is one way to do it, I found another also that requires change the Control States Stanza, but this is fairly straight forward and should do the job.

To learn more detailed information about Cop Commands and Control States see

http://wiki.allstarlink.org/wiki/Rpt.conf#COP_Commands


https://allstarlinknetwork.blogspot.com/2021/01/allstarlink-all-available-cop-commands.html

1/2021
ve3wzw


No comments:

Post a Comment


.
Allstar // AllstarLink -
https://groups.io/g/Allstar
.