[arm-allstar] connpgm
Dave Petrie
wa2kjc at gmail.com
Thu Apr 14 08:44:31 EDT 2022
Here is what I am using and everytime smlogger runs I get a nice
ascending tone, Thank You Patric Perdue for that nice tone.
I was only doing ascending and descending tones but now
I am doing smlogger and it does the ascending tone.
You could put and command in place of the tone I would think.
"my comments are enclosed in quotes "comments"
"In rpt.conf add the connpgm and discpgm lines below"
/etc/asterisk/rpt.conf
connpgm=connpgm=/usr/local/sbin/supermon/smlogger 1
discpgm=/usr/local/sbin/supermon/smlogger 0
"Then in /usr/local/sbin/supermon"
"edit smlogger.sh and add your content you would like to happen"
"place it right after the KB4FXC as displayed below"
"i like a nice ascending tone, change 40039 to your node"
#!/bin/bash
#
# KB4FXC -- change operation 06/15/2020
#
#!/bin/bash
# play a tone on connect
asterisk -rx "rpt cmd 40039 cop 48 \!440/50,\!0/50,\!654/50,\!0/50,\!880/50"
/usr/bin/renice -n 15 $$
if [ -f /tmp/smlog ] ; then
J=$(date +%F-%H:%M:%S | awk '{printf("[%s]",$1)}')
echo "$J $*" >> /tmp/smlog
fi
PROG=/usr/local/sbin/supermon/sql_save.sh
if [ -x $PROG ] ; then
$PROG $* &>/dev/null &
fi
PROG=/usr/local/sbin/supermon/smlogger_background.sh
if [ -x $PROG ] ; then
$PROG $* &>/dev/null &
fi
exit 0
"restart asterisk, make some connections in and out"
"now you will hear the ascending tone every time smlogger runs"
"wa2kjc"
On Wed, Apr 13, 2022 at 11:30 PM "Rich Ball, WA2ZPX via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Ahha Well, that explains it.. Thanks for the help...
>
> Rich
>
>
> -----Original Message-----
> From: ARM-allstar [mailto:arm-allstar-bounces at hamvoip.org] On Behalf Of
> "Patrick Perdue via ARM-allstar"
> Sent: Wednesday, April 13, 2022 9:50 PM
> To: Rich Ball, WA2ZPX via ARM-allstar
> Cc: Patrick Perdue
> Subject: Re: [arm-allstar] connpgm
>
> You can only have one connpgn and one discpgn per node. So, if you want
> multiple things to happen, you need to script it, then call that script.
>
> So, for example, a single script that performs your "someone connected"
> function, then also the logging for Supermon.
>
>
> On 4/13/2022 8:54 PM, "Rich Ball, WA2ZPX via ARM-allstar" wrote:
> > I have 2 connpgm entries in my rpt.conf file. One is for the supermon
> logger
> > (connpgm=/usr/local/sbin/supermon/smlogger 1) and the other is to run a
> > script to let me know someone connected. There are two connpgm=
> entries.
> > If I put the logger entry first, it logs connections but the other script
> > does not run. If I reverse them, the connect script runs, but the logger
> > does not show the connection. Is there another way to do multiple
> connpgm
> > entries? Any insight would be welcomed?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Rich
> >
> >
> >
> > _______________________________________________
> >
> > 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/4 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/4 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/4 web page - http://hamvoip.org
>
-------------- next part --------------
"my comments are enclosed in quotes "comments"
"In rpt.conf add the connpgm and discpgm lines below"
/etc/asterisk/rpt.conf
connpgm=connpgm=/usr/local/sbin/supermon/smlogger 1
discpgm=/usr/local/sbin/supermon/smlogger 0
"Then in /usr/local/sbin/supermon"
"edit smlogger.sh and add your content you would like to happen"
"place it right after the KB4FXC as displayed below"
"i like a nice assending tone, change 40039 to your node"
#!/bin/bash
#
# KB4FXC -- change operation 06/15/2020
#
#!/bin/bash
# play a tone on connect
asterisk -rx "rpt cmd 40039 cop 48 \!440/50,\!0/50,\!654/50,\!0/50,\!880/50"
/usr/bin/renice -n 15 $$
if [ -f /tmp/smlog ] ; then
J=$(date +%F-%H:%M:%S | awk '{printf("[%s]",$1)}')
echo "$J $*" >> /tmp/smlog
fi
PROG=/usr/local/sbin/supermon/sql_save.sh
if [ -x $PROG ] ; then
$PROG $* &>/dev/null &
fi
PROG=/usr/local/sbin/supermon/smlogger_background.sh
if [ -x $PROG ] ; then
$PROG $* &>/dev/null &
fi
exit 0
"restart asterisk, make some connections in and out"
"now you will hear the ascending tone every time smlogger runs"
"wa2kjc"
More information about the ARM-allstar
mailing list