[App_rpt-users] Scheduler / COP

Buddy Brannan buddy at brannan.name
Thu Mar 24 00:59:36 UTC 2016


OK, so as promised...

First, you'll set up two files in /etc/asterisk:
/etc/asterisk/rpt.conf.day
and
/etc/asterisk/rpt.conf.night
for example.

In each file, set up your tones, hang times, ID's, etc. the way you want them. 

All you need is two quick and dirty shell scripts. I have a similar thing set up for "net mode" and "normal mode". Put these in /etc/asterisk/scripts

Seriously, when I say "quick and dirty", mine really are. No error handling, no nothing except commands to make the changes I want.

For example, here's my "regmode" script, which puts the repeater into normal operation:

#!/bin/bash
asterisk -rx "rpt localplay 2331 regmode"
sleep 3
asterisk -rx "rpt fun 2331 *11500*901093*11500"
sleep 1
cp -fs /etc/asterisk/rpt.conf.use /etc/asterisk/rpt.conf
sleep 1
asterisk -rx "rpt reload"
exit 0

The -fs switch on the cp command forces the copy (so it will copy without prompting), and creates a symbolic link instead of an actual copy. 

The script to change to netmode is similar, except of course the net repeater configuration is copied/linked. 

Be sure to set these as executable with chmod.

Call them from crontab in the usual fashion (if you need help with the syntax, happy to help)

In each rpt.conf file, you'll set up a command that will execute the script. If this is meant to be a toggle, you can use the same command in both scripts. For example,

9123=cmd,/etc/asterisk/scripts/daymode
in your rpt.conf.night file and
9123=cmd,/etc/asterisk/scripts/nightmode
in /etc/asterisk/rpt.conf.day

This way, you can change these either manually or automatically, as you like. Changing execution times or parameters is then just a matter of modifying a couple files. 

Clear as mud? 




--
Buddy Brannan, KB5ELV - Erie, PA
Phone: 814-860-3194 
Mobile: 814-431-0962
Email: buddy at brannan.name




> On Mar 22, 2016, at 10:18 PM, Kevin Babich <kevin.babich at gmail.com> wrote:
> 
> All,
> 
> I am endeavoring to create a schedule which performs the following functions:
> 
> 1. Change courtesy tone
> 2. Send 2-Tone Sequence (2x)
> 3. Shorten hang time
> 4. Change recorded voice announcement
> 5. Change ID to Morse
> 
> I would like to call this either manually by DTMF or via Scheduler… has anyone successfully done this?  This is a pretty standard feature in most modern repeater controllers, however, since the configuration file needs to be changed in order to accomplish the same, I am uncertain how to make this happen…
> 
> Thoughts anyone?? 
> 
> 
> Kindest Regards,
> 
> Kevin Babich | N9IAA
> Valparaiso, IN 46383
> 
> Mobile: 219.406.9707
> 
> Cessna 421
> Cesssna Conquest I/II
> Beechcraft King Air 90/200
> 
> “…It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat...”  -Theodore Roosevelt
> 
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at ohnosec.org
> http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
> 
> To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"
> You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.




More information about the App_rpt-users mailing list