Alternate Subscriber ID for repeat transmission
Added a feature whereby a user can configure an alternate subscriber ID in the config file that will be used for all group traffic repeated.
This commit is contained in:
parent
11bf48a03f
commit
bf33f3893e
11
playback.py
11
playback.py
|
@ -30,9 +30,12 @@ try:
|
|||
except ImportError:
|
||||
sys.exit('Configuration file not found or invalid')
|
||||
|
||||
HEX_TGID = hex_str_3(TGID)
|
||||
HEX_SUB = hex_str_3(SUB)
|
||||
BOGUS_SUB = '\xFF\xFF\xFF'
|
||||
HEX_TGID = hex_str_3(TGID)
|
||||
HEX_SUB = hex_str_3(SUB)
|
||||
BOGUS_SUB = '\xFF\xFF\xFF'
|
||||
if GROUP_SRC_SUB:
|
||||
logger.info('Playback: USING SUBSCRIBER ID: %s FOR GROUP REPEAT', GROUP_SRC_SUB)
|
||||
HEX_GRP_SUB = hex_str_3(GROUP_SRC_SUB)
|
||||
|
||||
class playbackIPSC(IPSC):
|
||||
|
||||
|
@ -61,6 +64,8 @@ class playbackIPSC(IPSC):
|
|||
for i in self.CALL_DATA:
|
||||
_tmp_data = i
|
||||
_tmp_data = _tmp_data.replace(_peerid, NETWORK[_network]['LOCAL']['RADIO_ID'])
|
||||
if GROUP_SRC_SUB:
|
||||
_tmp_data = _tmp_data.replace(_src_sub, HEX_GRP_SUB)
|
||||
_tmp_data = self.hashed_packet(NETWORK[_network]['LOCAL']['AUTH_KEY'], _tmp_data)
|
||||
# Send the packet to all peers in the target IPSC
|
||||
self.send_to_ipsc(_tmp_data)
|
||||
|
|
|
@ -13,6 +13,13 @@ TGID = 12345
|
|||
# one, you still have to use the parenthesis and comma. Just
|
||||
# deal with it, or make it better. TS1 = 0, TS2 = 1.
|
||||
GROUP_TS = (1,)
|
||||
# ALTERNATE SOURCE SUBSCRIBER ID FOR REPEATED TRANSMISSION
|
||||
# Some folks have radios that don't respond to their own subscriber
|
||||
# IDs. Some just don't want to have the playback come from the same
|
||||
# subscriber ID. If this variable is set to something, it will
|
||||
# be used as the source subscriber for playback.
|
||||
# SET TO 0 TO NOT USE THIS FEATURE!!!
|
||||
GROUP_SRC_SUB = 0
|
||||
|
||||
|
||||
# ENABLE PRIVATE VOICE PLAYBACK?
|
||||
|
|
Loading…
Reference in New Issue