Take callsign for voice ident from callsign sent in connection
rather than from system name. Now it will work with proxy setups too!
This commit is contained in:
parent
668d52c2ba
commit
638e585a46
@ -487,9 +487,15 @@ def ident():
|
|||||||
if CONFIG['SYSTEMS'][system]['MODE'] != 'MASTER':
|
if CONFIG['SYSTEMS'][system]['MODE'] != 'MASTER':
|
||||||
continue
|
continue
|
||||||
if CONFIG['SYSTEMS'][system]['VOICE_IDENT'] == True:
|
if CONFIG['SYSTEMS'][system]['VOICE_IDENT'] == True:
|
||||||
# if CONFIG['SYSTEMS'][system]['PEERS'] == False:
|
if CONFIG['SYSTEMS'][system]['MAX_PEERS'] > 1:
|
||||||
# logger.debug('(%s) System has no peers, not sending ident',system)
|
logger.debug("(%s) System has MAX_PEERS > 1, skipping",system)
|
||||||
#We only care about slot 2 - idents go out on slot 2
|
continue
|
||||||
|
_callsign = False
|
||||||
|
for _peerid in CONFIG['SYSTEMS'][system]['PEERS']:
|
||||||
|
_callsign = CONFIG['SYSTEMS'][system]['PEERS'][_peerid]['CALLSIGN'].decode()
|
||||||
|
if not _callsign:
|
||||||
|
logger.debug("(%s) System has no peers or no recorded callsign (%s), skipping",system,_callsign)
|
||||||
|
continue
|
||||||
_slot = systems[system].STATUS[2]
|
_slot = systems[system].STATUS[2]
|
||||||
#If slot is idle for RX and TX
|
#If slot is idle for RX and TX
|
||||||
#print("RX:"+str(_slot['RX_TYPE'])+" TX:"+str(_slot['TX_TYPE'])+" TIME:"+str(time() - _slot['TX_TIME']))
|
#print("RX:"+str(_slot['RX_TYPE'])+" TX:"+str(_slot['TX_TYPE'])+" TIME:"+str(time() - _slot['TX_TIME']))
|
||||||
@ -498,7 +504,7 @@ def ident():
|
|||||||
logger.info('(%s) Repeater idle. Sending voice ident',system)
|
logger.info('(%s) Repeater idle. Sending voice ident',system)
|
||||||
_say = [words['silence']]
|
_say = [words['silence']]
|
||||||
_say.append(words['silence'])
|
_say.append(words['silence'])
|
||||||
_systemcs = re.sub(r'\W+', '', system)
|
_systemcs = re.sub(r'\W+', '', _callsign)
|
||||||
_systemcs.upper()
|
_systemcs.upper()
|
||||||
for character in _systemcs:
|
for character in _systemcs:
|
||||||
_say.append(words[character])
|
_say.append(words[character])
|
||||||
|
@ -153,8 +153,8 @@ if __name__ == '__main__':
|
|||||||
DestportStart = 54100
|
DestportStart = 54100
|
||||||
DestPortEnd = 54200
|
DestPortEnd = 54200
|
||||||
Timeout = 30
|
Timeout = 30
|
||||||
Stats = False
|
Stats = True
|
||||||
Debug = False
|
Debug = True
|
||||||
BlackList = [1234567]
|
BlackList = [1234567]
|
||||||
|
|
||||||
#*******************
|
#*******************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user