[arm-allstar] Audio Files - Play only when there has not been any traffic
Patrick Perdue
borrisinabox at gmail.com
Sun Jan 28 16:16:59 EST 2024
No. You have to do it consecutively for each node if they are either not
connected together, or you only want to blast files across the nodes
locally regardless.
On 1/28/2024 3:48 PM, Josh Hatton via ARM-allstar wrote:
> Related but different inquiry:
>
> If *asterisk** -rx "rpt playback nnnn /etc/asterisk/audio/audiofile"* was
> used in some process, am I able to stack node numbers in that command?
>
> i.e
> * asterisk -rx "rpt playback 2001 2002 2003 2004
> /etc/asterisk/audio/audiofile" *
> These are all nodes that are connected to the hub at hand, so *just in
> case* an outside larger network was to connect in, I would (assume I could)
> make the audio file exclusive down to the node number. It wouldn't
> 'accidentally' get passed out to an "outsider" node or hub.
>
>
> Thanks for any input.
>
> On Sat, Jan 27, 2024 at 1:01 PM Danny K5CG via ARM-allstar <
> arm-allstar at hamvoip.org> wrote:
>
>> Or if you want to make sure that a certain amount of time has passed after
>> the last transmission;
>>
>> touch /tmp/tx = s|t|RPT_ETXKEYED
>>
>> Then, every minute check for the time the /tmp/tx file was touched and if
>> over x minutes, then do something.
>>
>> if test `find "tx" -mmin +10`
>> then
>> echo asterisk -rx .... play file
>> fi
>>
>> This isn't exact, just the idea.
>>
>> 73
>> Danny, K5CG
>> HH 550-000-0609
>> SKCC 14257
>>
>> ----- Original Message -----
>> From: "ARM Allstar" <arm-allstar at hamvoip.org>
>> To: "ARM Allstar" <arm-allstar at hamvoip.org>
>> Cc: "Patrick Perdue" <borrisinabox at gmail.com>
>> Sent: Friday, January 26, 2024 8:54:12 PM
>> Subject: Re: [arm-allstar] Audio Files - Play only when there has not been
>> any traffic
>>
>> This is pretty open-ended, really.
>>
>> Without actually writing anything (don't have time right now), I can
>> think of a few ways to do it.
>>
>> One way would be to attach a script or command to an event as defined in
>> the events stanza of your node, something like:
>>
>> [events<yournodenumber>
>>
>> touch /tmp/tx = s|t|RPT_ETXKEYED
>> rm /tmp/tx = s|f|RPT_ETXKEYED
>>
>> In this example, a file is created in /tmp when someone is transmitting
>> toward the node, and removed when the transmission stops.
>>
>> Now, you could write a simple script that plays a file only if /tmp/tx
>> doesn't exist, then call it with cron, drive it manually or whatever.
>>
>> /etc/asterisk/local/notx-announcement.sh
>>
>> #!/bin/bash
>> if [ -e /tmp/tx ]
>> then
>> echo "nothing to do. Exiting."
>> exit
>> else
>> asterisk -rx "rpt playback <yournode> /etc/asterisk/local/some_file
>> fi
>>
>>
>> NOTE! THIS IS UNTESTED!
>>
>>
>> You could do more sophisticated things, like using timers (sleep) such
>> that a file is automatically played after <x> seconds of inactivity
>> instead of using the temp file method.
>>
>> Come to think of it, you could probably also do something with
>> lnkacttime, lnkactmacro, and remote_inact_timeout, though I've never
>> tried using it that way, either.
>>
>>
>> 73
>>
>> N2DYI
>>
>>
>> On 1/26/2024 8:58 PM, Josh Hatton via ARM-allstar wrote:
>>> Evening!
>>>
>>> Interested in what the braintrusts think on how I could code some audio
>> to
>>> play (Messages, etc.) at times when there is no traffic on a node?
>>> Basically play only when there has been time without any key-ups or
>>> activity.
>>>
>>> Of course *asterisk** -rx "rpt playback nnnn
>> /etc/asterisk/audio/audiofile"*
>>> from within rpt.conf or a cron job if they had some sort of awareness of
>>> node activity.
>>>
>>> Any ideas from the braintrust of the group?
>>>
>>> Thanks a bunch for your time!
>>> Josh W4ZZK
>>> _______________________________________________
>>>
>>> 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
>>
> _______________________________________________
>
> 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