Simple Voter Courtesy Tones

Hi!

So I was playing with Simple Voter, got it up and running fairly quickly and it does what it is said to do. Works pretty well for what it is actually. However, I noticed something relating to courtesy tones- and it just might be me -but wanted to ask here since there isn't a lot of recent talk on this.

Set up a repeater using USBAudio like the instructions say. Levels set everything works including ID, courtesy tones, etc. Set all the voting prompts and stanzas as per instructions. That all works. Perfect.

Set up the remote node/receiver as per instructions. That all works. More perfect.

Main repeater links to remote receiver (private node) in monitor mode as shown on Allmon3. Voting works well and I can hear the difference between receivers when RF is adjusted to mimic input changes. Yay! We got us a winner.

However, once the remote monitor is connected to the main repeater, all local courtesy tones disappear. It still ID's AND if the repeater is hooked to a hub or whatever, the distant traffic still has courtesy tones. Just the local one after PTT is released disappears. Note, I am using Mason, N5LSN's SkywarnPlus and its associated courtesy tones for those courtesy tone sound files. Voice audio passes fine and there is a squelch tail like normal. Just no beep when PTT is released on a radio like normal.

If I go into Allmon3 and disconnect the remote voting receiver from the main repeater, the local courtesy tones start working again on that machine perfectly.

Its not a deal breaker and its a pretty nice thing to be able to use in some of these mountainy places as needed, but I thought the tone thing odd and figured I'd ask. I had assumed I had a stanza wrong somewhere after the voting change but that wouldn't explain why it works with every other normal combination. It definitely drops local courtesy tone and was wondering if it might be some sort of timing issue for asterisk to see COR drop locally vs remotely? I figured it might be timing or it's shut off becuase the system is now told to look for multiple receivers? Still, the main repeater should know "someone is done talking and there is no more audio" and generate the beep.

As another aside although thats probably not the issue, the main repeater controller is running on Debian 12 Bookworm Raspberry Pi and the new voting RX is on Debian 13 Trixie Raspberry Pi. They've both been updated/upgraded to the latest packages and greatest in their respective spheres. Ive not gone to the length to put them both on Deb13.

Again, for me, not a deal breaker but thought it was odd enough to tap a message.

OK tried playing with this again. Had a bear of a time with tones, actual operation, and all kinds of jazz. So, like most appliance operators, I plugged into the various AI's and made them compete with each other and, now, I have Simple Voter working with courtesy tones and seems like it tries to grab audio from the best place. I wanted to share this here if anyone cares but we did a bunch of stuff to get this to work. IM not a software guru but if anyone cares we can share some stuff if needed. Here's what the GPT's said at the end of my saga here today....

Subject: Simple Voter issues in app_rpt 3.10.8 — local patches and test results

We configured a two-receiver Simple Voter system following the ASL documentation:

  • Main repeater: Raspberry Pi ARM64, Debian 12.
  • Remote receiver: HP thin client AMD64, Debian 13.
  • Both running Asterisk 22.10.1 / app_rpt 3.10.8.
  • USBRadio at both sites, sendvoter=1.
  • Main: votertype=1, votermode=2, votermargin=10.
  • Remote: votertype=2, votermode=2.
  • Permanent monitor connection to the remote receiver, with VOTE node entries.

Ordinary monitor linking with voting disabled passed audio. With voting enabled, we encountered missing remote audio, absent RSSI processing, and inconsistent courtesy tones.

Changes made locally

Source location Finding and local change
apps/app_rpt.c — rxchannel_read() RSSI processing was conditional on rxchankeyed, but we found no assignments tracking radio KEY/UNKEY events. Added assignments setting it to 1 and 0 in those handlers.
apps/app_rpt.c — main processing loop The reset of voteremrx was inside GPS-related processing. Moved the reset immediately before the regular link scan that recalculates remote receiver activity.
apps/app_rpt.c — handle_link_data() Incoming R <RSSI> messages appeared in debug output, but no handler stored their values. Added a validated parser updating the sending link’s rssi under the node lock.
apps/app_rpt/rpt_link.c — FindBestRssi() Every comparison cleared remote votewinner flags, even when hysteresis retained the existing winner. Moved flag clearing into the branch that changes the selection. Added an actual-selected-receiver diagnostic.
apps/app_rpt/rpt_telemetry.c — LINKUNKEY Courtesy-tone suppression used cached voteremrx before the tone delay. Replaced that check with a locked examination of current local key state and voting links’ lastrealrx states.

Observed results

Before the changes, USBRadio logged RSSI updates, but app_rpt did not process or forward them. After the key-state change, the remote logged:

[1800] rxchannel rssi=941
[1800] rssi=941 to 472354

Before adding the incoming RSSI handler, the main repeater logged:

Received text over link: 'R 938'
best rssi=0 from rpt*

After the changes, remote audio passed and the actual-selection diagnostic showed:

selected receiver=1800 rssi=940

Local receiver selection also worked. Remote-only courtesy tones were initially inconsistent; after the live-state telemetry change, two consecutive remote-only transmissions passed voice and produced the expected link courtesy tone, with:

LINKUNKEY live voter active=0

Limitations and review requested

These are locally tested patches, not a comprehensive regression-tested fix. We would appreciate review of locking, link-object lifetime, winner-state handling, and courtesy-tone behavior during overlapping receiver activity.

Receiver calibration also remains under evaluation: the main receiver commonly reports approximately 990–996 while the nearby remote reports approximately 940. We have not established whether those scores fairly represent relative audible quality.

Only the locally built app_rpt.so was installed on each host. Matching ASL Asterisk packages are temporarily held to avoid overwriting the changes.

If you are proposing patches to app_rep, please raise a Pull Request - Pull requests · AllStarLink/app_rpt · GitHub. Developers will review and comment there.

This looks suspiciously like what I’m seeing in 3.10.9-1 when I started going through the code after being told to RTFM.

You could save me some time and send me your patches. I am a retired coder and could then do a pull, make the changes, and submit them for inclusion in an update.
Thanks,

Roy