Changes

Jump to navigation Jump to search
Line 1: Line 1: −
The chan/voter channel driver is the interface between Asterisk and the [[RTCM/VOTER Interfaces | RTCM/VOTER]] radio/repeater hardware interface. It allows receiver voting, simulcast transmitters, or just a plain repeater interface when used with the appropriate hardware.
+
The chan_voter channel driver is the interface between Asterisk and the [[RTCM/VOTER Interfaces | RTCM/VOTER]] radio/repeater hardware interface. It allows receiver voting, simulcast transmitters, or just a plain repeater interface when used with the appropriate hardware.
      Line 5: Line 5:       −
=Basic Information On How chan/voter Works=
+
=Basic Information On How chan_voter Works=
 
Each node has a number of potential "clients" associated with it. In the voter.conf file, each stanza (category) is named by the node number that the clients specified within the stanza are to be associated with. Each entry consists of an arbitrary (relatively meaningless, just included for easy identification purposes within this channel driver, and has nothing to do with its operation) identifier equated to a unique password. This password is programmed into the client. '''All clients must have unique passwords, as that is what is used by this channel driver to identify them.'''
 
Each node has a number of potential "clients" associated with it. In the voter.conf file, each stanza (category) is named by the node number that the clients specified within the stanza are to be associated with. Each entry consists of an arbitrary (relatively meaningless, just included for easy identification purposes within this channel driver, and has nothing to do with its operation) identifier equated to a unique password. This password is programmed into the client. '''All clients must have unique passwords, as that is what is used by this channel driver to identify them.'''
   Line 25: Line 25:     
During the processing of an audio frame to be presented to Asterisk, all client's buffers that are associated with a channel instance (node) are examined by taking an average of the RSSI value for each sample in the associated time period (the first 160 samples of the abstracted buffer (which is the physical buffer from drainindex to drainindex + 159) and whichever one, if any that has the largest RSSI average greater then zero is selected as the audio source for that frame. The corresponding audio buffer's contents (in the corresponding offsets) are presented to Asterisk, then ALL the clients corresponding RSSI data is set to 0, ALL the clients corresponding audio is set to quiet (0x7f). The overwriting of the buffers after their use/examination is done so that the next time those positions in the physical buffer are examined, they will not contain any data that was not actually put there, since all client's buffers are significant regardless of whether they were populated or not. This allows for the true 'connectionless-ness' of this protocol implementation.
 
During the processing of an audio frame to be presented to Asterisk, all client's buffers that are associated with a channel instance (node) are examined by taking an average of the RSSI value for each sample in the associated time period (the first 160 samples of the abstracted buffer (which is the physical buffer from drainindex to drainindex + 159) and whichever one, if any that has the largest RSSI average greater then zero is selected as the audio source for that frame. The corresponding audio buffer's contents (in the corresponding offsets) are presented to Asterisk, then ALL the clients corresponding RSSI data is set to 0, ALL the clients corresponding audio is set to quiet (0x7f). The overwriting of the buffers after their use/examination is done so that the next time those positions in the physical buffer are examined, they will not contain any data that was not actually put there, since all client's buffers are significant regardless of whether they were populated or not. This allows for the true 'connectionless-ness' of this protocol implementation.
 +
 +
 +
=Asterisk CLI Commands=
 +
These are the CLI commands that Asterisk and chan/voter supports:
 +
*voter debug level {0-7}
 +
**Prints debug information from the channel driver at increasing verbosity
 +
 +
*voter test instance_id [test value]
 +
**Specifies/Queries test mode for voter instance
 +
**Test Value can be:
 +
***0 - Normal voting operation
 +
***1 - Randomly pick which client of all that are receiving at the max RSSI value to use
 +
***>1 - Cycle thru all the clients that are receiving at the max RSSI value with a cycle time of (test mode - 1) frames. In other words, if you set it to 2, it will change every single time. If you set it to 11, it will change every 10 times. This is serious torture test.
 +
 +
*voter prio instance_id [client_id] [priority value]
 +
**Specifies/Queries priority value for voter client
 +
*** *CLI> <code>voter prio 1999</code>  ''will query node 1999. Not overridden = the value from voter.conf is being used''
 +
*** *CLI> <code>voter prio 1999 North</code> ''will query node 1999 site North''
 +
*** *CLI> <code>voter prio 1999 North 10</code> ''Highest priority will always vote (value 0 - 100)''
 +
*** *CLI> <code>voter prio 1999 North -1</code> ''will stop node 1999 site North from voting. Shuts off receiver.''
 +
*** *CLI> <code>voter prio 1999 North -2</code> ''Returns site to normal. ie "prio: 0 (not overridden)". Can also use off or disable in place of -2."''
 +
 +
*voter record instance_id [record filename]
 +
**Enables/Specifies (or disables) recording file for chan/voter
 +
 +
*voter tone instance_id [new_tone_level(0-250)]
 +
**Sets/Queries Tx CTCSS level for specified chan/voter instance
 +
 +
*voter reload
 +
**Reload chan/voter parameters
 +
 +
*voter display [instance]
 +
**Display voter instance clients
 +
 +
*voter txlockout [instance] <client_list>
 +
**Set Tx Lockout for voter instance clients
 +
*** *CLI> <code>voter txlockout 1999</code>  ''will show a list of locked-out and able to transmit sites''
 +
*** *CLI> <code>voter txlockout 1999 +North</code>  ''will add lock-out the North site. Transmit disabled.''
 +
*** *CLI> <code>voter txlockout 1999 -North</code>  ''will remove lock-out of the North site. Transmit enabled.''
 +
 +
*voter ping [client] <# pings, 0 to abort>
 +
**Ping (check connectivity) to client
 +
 +
=voter.conf Variables=
 +
This is a dump of variables found in the source... they'll need to be fleshed out with some descriptions and applications:
 +
 +
<pre>
 +
linger (uses default if not specified)
 +
plfilter <--this doesn't seem to work?
 +
hostdeemp
 +
duplex (defaults to 1)
 +
mixminus (defaults to 0)
 +
streams
 +
txctcss
 +
txctcssfreq
 +
txctcsslevel (defaults to 62)
 +
txtoctype (defaults to none?, options phase and notone)
 +
primary
 +
isprimary
 +
thresholds
 +
gtxgain (defaults to default_gtxgain)
 +
 +
password
 +
sanity
 +
puckit
 +
dyntime
 +
buflen
 +
utos
 +
port
 +
bindaddr
 +
 +
These are options allowed for each site:
 +
transmit
 +
master
 +
adpcm
 +
nulaw
 +
dynamic
 +
gpsid
 +
buflen
 +
nodeemp <-- this works, bypasses the deemp filter (sets the switch H)
 +
hostdeemp
 +
noplfilter <-- this works, toggles the pl filter in the rtcm (sets the switch L, default seems to be H so the filter is in)
 +
prio
 +
</pre>
      Line 122: Line 206:     
Also, if non-GPS-based operation is all that is needed, just the use of redundancy within the clients is sufficient, and does not require any use of the server redundancy features.
 
Also, if non-GPS-based operation is all that is needed, just the use of redundancy within the clients is sufficient, and does not require any use of the server redundancy features.
 +
 +
=Voter Recording and Playback=
 +
chan_voter has the ability to record VOTER streams by the channel driver live on the air (using the 'voter record' command in Asterisk). This also records time-stamped data and the voted receiver at that particular time along with RSSI readings. This can then be played back using the VoterPal GUI JAVA applet.
 +
 +
==How to setup playback==
 +
# Download the [https://allstarlink.org/voterpal/VoterPal.jar VoterPal application]. 
 +
# Download the [https://allstarlink.org/voterpal/lib/appframework-1.0.3.jar appframework-1.0.3.jar] and [https://allstarlink.org/voterpal/lib/swing-worker-1.1.jar swing-worker-1.1.jar] files. Place these in a folder called lib in the same directory as the VoterPal application
 +
# Run VoterPal.jar. You may come across issues with running Java such as security permissions. Most of these can be allowed.
 +
# Once running, you will see the applications GUI. File > Open to select your voter data files. A bunch of test files have been made already to test [https://allstarlink.org/voterpal/datafiles/ here]
 +
[[File:Voterpal.png|left|thumb|549x549px]]
 +
 +
'''Reset'''
 +
 +
Resets the file back to start
 +
 +
'''Play'''
 +
 +
Plays the recorded file
 +
 +
'''Stop'''
 +
 +
Stops the current playing file in it's current position
 +
 +
'''CTCSS Filter Enable'''
 +
 +
Removes CTCSS hum from any recorded audio stream
 +
 +
'''File Play Position'''
 +
 +
Drag this slider to skip
 +
 +
'''Activity'''
 +
 +
This will show time-stamped information including RSSI of the selected VOTER client within the recorded data stream
 +
 +
'''Voter Clients'''
 +
 +
This will show the real time voted client. This is also dependent of the Mode setting
 +
 +
'''Mode'''
 +
 +
Various modes can be selected in VoterPal
 +
 +
0 - Normal Voting Mode 
 +
 +
1 - Randomly pick which client of all that are receiving at the max RSSI value to use
 +
 +
> 1 - Cycle thru all the clients that are receiving at the max RSSI value with a cycle time of (test mode - 1) frames. In other words, if you set it to 2, it will change every single frame. If you set it to 11, it will change every 10 frames. This is a serious torture test.
 +
 +
< 0 - Any value less than zero will force select the Voter Client (i.e. -1 is the first client, -2 is the 2nd client)     
 +
 +
==Node Configuration==
 +
As mentioned above the Asterisk CLI is as follows -
 +
* voter record instance_id [record filename]  - Enables/Specifies (or disables) recording file for chan/voter
 +
Where
 +
 +
- instance_id = voter number instance
 +
 +
- record filename is the filename of the recording to be stored
 +
 +
A script can be made and placed in cron.hourly which will run every hour. Every time the above command is run in Asterisk, it creates a new file. An example of such a script is below
 +
#!/bin/sh asterisk -r -x "voter record instance_id /tmp/voter-record"`date +%F-%H-%M` >> /var/log/voterrecordlog
 +
the /tmp/ directory can be substituted for mounted USB HDD.
 +
 +
[[Category:How to]]
 +
[[Category:Node Configuration]]
896

edits

Navigation menu