I placed the following in my rpt.conf

and restarted asterisk. But it doesn’t play the message (the command works from the command line) when RX goes active

[events]
/usr/sbin/asterisk -rx “rpt playback 1100 /etc/asterisk/audio/newsfiles/newsline_10” = s|e|${RPT_RXKEYED}

I also tried this but COS isn’t set as a global variable either

COS = g|e|${RPT_RXKEYED}

What duplex mode are you using for this node ? (rpt.conf) duplex= ?

Duplex =0 with linktolink = yes

I think I see what the (my) problem is - I expected a global variable to be accessible by the shell, but apparently it is only accessible by the Asterisk AMI or AGI. But I can see it in the Asterisk CLI

Maybe Event Management isn’t what I want but I am after a way to have a bash script I’m running know if RX is active or not

Take a look at https://www.qsl.net/k0kn/swissarmy there might be some hints in there to do what you want to do.

Thanks for the link. However, as a test I tried one other thing

Under the node stanza:

events = events1234

Then the new stanza:

[events1234]
COS = g|e|${RPT_RXKEYED}
touch /home/test/test = s|t|COS

/home/test is writable to the world

This does not create a file “text” in said directory, though the CLI shows:

Setting global variable ‘COS’ to ‘1’

I found the solution.

This does NOT work:

[events1234]
COS = g|e|${RPT_RXKEYED}
touch /home/test/test = s|t|COS

THIS does work:

[events1234]
touch /home/test/test = s|t|RPT_RXKEYED

This doesn’t seem to be in line with the Wiki

I see your text of what works for you, but as far as I can see, you are creating a file ‘test’ on RPT_RXUNKEYED

But to know why or how that worked, I would need to see the rest of the judgement you are making when the statement is not true, for the file still exists from 'touch’ing it.
You are not removing it as well when the statement is untrue.