[arm-allstar] Script Question
Doug Crompton
wa3dsp at gmail.com
Wed Feb 19 20:19:44 EST 2020
What you ran into here is a big pet peave of Allstar which we are looking
into for a future version. The fact that telemetry queues can get very
mixed up. Even playing one sound and then another right after can jumble
rather than playing in the proper order. It was a real trial and error to
get something like playnews to work properly with exact timing of sequences
and delays (sleep) statements. If you want to exactly time a sound file you
can get its status like this -
sox ARNstart.ul -n stat
Samples read: 23552
Length (seconds): 2.944000
Scaled by: 2147483647.0
Maximum amplitude: 0.605347
Minimum amplitude: -0.488159
Midline amplitude: 0.058594
Mean norm: 0.053144
Mean amplitude: 0.012343
RMS amplitude: 0.097638
Maximum delta: 0.366943
Minimum delta: 0.000000
Mean delta: 0.023813
RMS delta: 0.045954
Rough frequency: 599
Volume adjustment: 1.652
The other option you have if you want to play two or more sounds from
different files is to combined them and play as one sound file. This is the
method used to play the weather in wx_condition.sh.
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
On Wed, Feb 19, 2020 at 7:08 PM "KY220GROUP--- via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Thanks David, didn’t know about that one
> Tim KK4WH
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Wednesday, February 19, 2020, 6:52 PM, David McGough <kb4fxc at inttek.net>
> wrote:
>
>
>
> Will just adding a sleep command work for you?? Something like:
>
> #! /bin/bash
> asterisk -rx "rpt fun 47293 *76"
> asterisk -rx "rpt localplay 47293 /etc/asterisk/local/net_connect"
> sleep 5 ## Sleep for 5 seconds. Adjust as needed.
> asterisk -rx "rpt fun 47293 *7349799"
>
>
>
> 73, David KB4FXC
>
>
>
>
>
> On Wed, 19 Feb 2020, "KY220GROUP--- via ARM-allstar" wrote:
>
> > I am calling a script via a cronjob for a net I connect with. The script
> is working great except I have a short announcement that localplays for the
> connection, after the announcement I have the standard asterisk fun to
> connect the reflector. My problem is the connection is taking place during
> the script and if there is activity on the reflector the mixed announcement
> and refl audio is a train wreck. Is there a way to delay the refl
> connection in my script a few seconds to allow the announcement to finish?
> I have experimented with different size silent .ul's but can't seem to get
> what I want. Below is a copy of the script I'm running.
> > #! /bin/bash
> > /usr/sbin/asterisk -rx "rpt fun 47293 *76"
> > asterisk -rx "rpt localplay 47293
> /etc/asterisk/local/net_connect"---->>> I need a delay here <<<----
> > asterisk -rx "rpt fun 47293 *7349799"
> >
> > # End of Script
> >
> > 73
> > Tim Webb - KK4WH(606)909-2094
> > https://www.qrz.com/db/KK4WHwww.facebook.com/kentucky220
> > _______________________________________________
> >
> > 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
More information about the ARM-allstar
mailing list