<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="" color="#000000" face="Tahoma,sans-serif">Although this could be done within Allstar I often prefer to use bash scripts to control things. Anything you can do manually in Allsar or anywhere else in Linux you can do in a script.<br><br>The script would look like this. Store all your scripts in one place,  like /etc/asterisk/local  where they would be backed up with your Allstar configuration when you did that. You could call this script "whatever_disconnect" or any name of your liking. Once you create it make it executable -   chmod 750 whatever_disconnect<br><br>#! /bin/bash<br># Example Script to control things in Allstar<br># Replace node with the node you are controlling from<br><br>/usr/sbin/asterisk -rx "rpt fun <node> *127086"<br># you can add more commands here if desired.<br><br>#end of script<br><br>Repeated for other commands.<br>Then in rpt.conf under the functions stanza -<br> <br>[functions]<br><br>Other stuff already there.....<br><br>821=cmd,/etc/asterisk/local/whatever_disconnect<br id="FontBreak"></font><br><font style="" face="Tahoma,sans-serif">A DTMF of *821 will then execute the script.</font><br><font style="" face="Tahoma,sans-serif"><br></font><font style="" face="Tahoma,sans-serif">You also have the option of creating a cron that executes the script at a specific time.<br><br>crontab -e     then enter the command.  crontab -l to view cron's<br><br> 30 12 * * * /etc/asterisk/local/whatever_disconnect<br><br>This would execute the script everyday at 12:30 PM.<br><br>When creating DTMF sequences make sure they are unique. Your example would not work as *1 or *3  are already used as single digit commands. You are generally safe in the *8xx range but check your functions stanza to see what is being used. Also any A, B, C, D prefix is usable as long as you have that capability on your handheld. <br></font><br><font style="" face="Tahoma,sans-serif">You can execute the script you create manually from the Linux prompt to test it. You must reload rpt or restart Asterisk when you change anything in that file - rpt reload or astres.sh.</font><br><br><b><font style="font-size:16pt;" size="4">73 Doug</font><font style="font-size:16pt;" size="4"><br></font><font style="font-size:16pt;" size="4">WA3DSP</font><font style="font-size:16pt;" size="4"><br></font><font style="font-size:16pt;" size="4">http://www.crompton.com/hamradio</font></b><font style="font-size:16pt;" size="4"><br></font><br><br><div><hr id="stopSpelling">Date: Thu, 3 Sep 2015 09:04:42 -0400<br>From: N1XBM@amsat.org<br>To: app_rpt-users@ohnosec.org<br>Subject: [App_rpt-users] DTMF help<br><br><p dir="ltr">I use a single repeater in my group of repeaters as a hub. I Then use that "RF hub" as my conduit to the "outside of Maine" connection. </p>
<p dir="ltr">What I'd like to do is enable on all of my repeaters that would disconnect or reconnect to my RF hub. Something simple like *12 / *13. That in turn would exucute *127086 and *327086. In my head I'm pretty sure in my head how to do it but unsure where to look to see an example of it.</p>
<p dir="ltr">Any suggestions? </p>
<p dir="ltr">N1XBM<br>
Apparare Scientor<br>
Paratus Communicare<br>
Allstar Node # 27086, 41540, 41812, 42086<br>
    </p>
<br>_______________________________________________
App_rpt-users mailing list
App_rpt-users@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.</div>                                          </div></body>
</html>