[arm-allstar] Limiting Node connects - update

Doug Crompton wa3dsp at gmail.com
Sun Apr 19 09:37:25 EDT 2020


It works fine the way it was written here -

#!/bin/bash
Links=$(asterisk -rx "rpt xnode $1" | grep NUMALINKS | cut -d "=" -f2)
if [ "$Links" == "" ] ; then Links=0 ; fi
echo "SET VARIABLE result $Links"
echo $Links

The object is to return the number of direct connects. You need to provide
a node if running it manually.

*73 Doug, WA3DSP*
*http://wa3dsp.org <http://wa3dsp.org>*

On Sun, Apr 19, 2020 at 2:45 AM "Bryan St Clair via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> I changed the script to this, and I am working now.  Thanks
>
> #!/bin/bash
> #
> Links=$(asterisk -rx "rpt xnode $1" | grep 'NUMALINKS' | cut -d "=" -f2)
> if [ -z "$Links" ] ;
> then Links=0 ;
> fi
>
> echo "SET VARIABLE result $Links"
> echo $Links
> #
>
>
> On Sat, Apr 18, 2020 at 11:09 PM Bryan St Clair <bryan at k6cbr.us> wrote:
>
> > Anyone getting errors on the count_connects.sh?
> >
> > I am getting 2 line errors.
> >
> > I added quotes on the grep field and removed a quote from the IF
> statement.
> >
> > Was:  if [ "$Links*"* == "” ] ; then Links=0 ; fi
> >
> > Now: if [ "$Links == "” ] ; then Links=0 ; fi
> >
> > No more errors, but always returns 0 nodes connected.  Manually ran the
> > asterisk command and it returns the correct value.
> >
> > What did I do wrong here?
> >
> > Bryan
> >
> > On Sat, Apr 18, 2020 at 8:24 PM "Doug Crompton via ARM-allstar" <
> > arm-allstar at hamvoip.org> wrote:
> >
> >> If anyone is trying the limit node howto I put out yesterday I have
> made a
> >> couple of changes in the scripts so you might want to take a look at it
> >> again. It also now shows an example of Asterisks "early media" or "early
> >> audio" which allows you to play audio to a connecting station BEFORE the
> >> connect takes place. It is a VERY small window of about 5 seconds but in
> >> the case of connection limits it is enough time to say "Queue Full Use
> >> Node
> >> xxxxx" to tell user an alternative mode to use or perhaps "Queue Full
> Not
> >> Accepting connections." Do a page refresh of the PDF to see the updated
> >> page.
> >>
> >>
> >>
> https://www2.hamvoip.org/hamradio/arm-allstar/documents/howtos/limiting_connections.pdf
> >>
> >> *73 Doug, WA3DSPhttp://wa3dsp.org <http://wa3dsp.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
> >>
> >
> >
> > --
> > Bryan
> > K6CBR
> > bryan at k6cbr.us
> > 43918,439910
> >
> >
>
> --
> Bryan
> K6CBR
> bryan at k6cbr.us
> 43918,439910
> _______________________________________________
>
> 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


More information about the ARM-allstar mailing list