[arm-allstar] Email on connection?

David McGough kb4fxc at inttek.net
Mon May 7 11:01:59 EST 2018


Hi Dave,

You can't have more than one connpgm= or discpgm= listed for a single node
stanza. So, one solution would be to have connpgm= call an intermediate
script. Then, the intermediate script would call other scripts, run 
commands, etc. Something like:

...File: /etc/asterisk/rpt.conf

[1998]  ;;; Replace with my node nymber
connpgm=/usr/local/bin/my_connect_script
discpgm=/usr/local/bin/my_disconnect_script


...Then, the file: /usr/local/bin/my_connect_script
#/bin/bash

/usr/local/sbin/supermon/smlogger 1 $1 $2
echo "Node $2 connected to node $1 | mail -s "Node connect" myemail at myprovider.com


...Now, the file: /usr/local/bin/my_disconnect_script
#/bin/bash

/usr/local/sbin/supermon/smlogger 0 $1 $2
echo "Node $2 disconnected to node $1 | mail -s "Node disconnect" myemail at myprovider.com



Make sure to make any new scripts executable, like:
chmod 755 /usr/local/bin/my_connect_script
chmod 755 /usr/local/bin/my_disconnect_script


73, David KB4FXC



On Mon, 7 May 2018, "David Andreatta via arm-allstar" wrote:

>  David, All;

Expanding on Russell's question below, is there proper syntax for using multiple connpgms, for the same node, from within the rpt.conf file? For example, it would be interesting to use both smlogger, i.e. /usr/local/sbin/supermon smlogger 1 AND /usr/local/bin/msg_on_connect as connpgms. I did some very brief research but did NOT find appropriate syntax for multiple connpgms. I expect it may take an additional script which includes the desired connpgms within but I thought I would ask before I went too far down that path.

Thanks in advance.

Dave
WD0HXN
Erie, CO

    On Sunday, May 6, 2018, 10:56:36 AM MDT, David McGough via arm-allstar <arm-allstar at hamvoip.org> wrote:  
 
 
Hi Russell,

Glad to hear it's working!


73, David KB4FXC


On Sun, 6 May 2018, Russell Thomas wrote:

> chmod was the missing link!!
> 
> Thank you David!
> 
> Now, I might also like it to play a connection sound like when I link
> to a node. any tips on that? :)
> 
> On Sun, May 6, 2018 at 10:38 AM, David McGough <kb4fxc at inttek.net> wrote:
> >
> > No
> >
> >
> > On Sun, 6 May 2018, Russell Thomas wrote:
> >
> >> Do I need an ".sh" extension?
> >>
> >> On Sun, May 6, 2018, 10:32 AM Russell Thomas <russell at kv4s.com> wrote:
> >>
> >> > No, didn't know about that
> >> >
> >> > On Sun, May 6, 2018, 10:27 AM David McGough <kb4fxc at inttek.net> wrote:
> >> >
> >> >>
> >> >>
> >> >> Did you make the connect script executable??  Like:
> >> >>

  
_______________________________________________

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 web page - http://hamvoip.org



More information about the arm-allstar mailing list