testing
This commit is contained in:
parent
a70b48a275
commit
47bbfad702
|
@ -53,7 +53,7 @@ trigger = True
|
|||
# groups that we want to trigger playback of this file (ts1 and ts2)
|
||||
# Note this is a python list type, even if there's just one value
|
||||
trigger_groups_1 = ['\x00\x00\x01', '\x00\x00\x0D', '\x00\x00\x64']
|
||||
trigger_groups_2 = ['\x00\xC0\x30',]
|
||||
trigger_groups_2 = ['\x00\x0C\x30',]
|
||||
|
||||
class playIPSC(IPSC):
|
||||
|
||||
|
@ -68,25 +68,12 @@ class playIPSC(IPSC):
|
|||
#
|
||||
def group_voice(self, _network, _src_sub, _dst_group, _ts, _end, _peerid, _data):
|
||||
if _end:
|
||||
'''
|
||||
if trigger == False:
|
||||
if trigger == True:
|
||||
if (_ts == 0 and _dst_group not in trigger_groups_1) or (_ts == 1 and _dst_group not in trigger_groups_2):
|
||||
return
|
||||
else:
|
||||
if (_ts == 0 and _dst_group in trigger_groups_1) or (_ts == 1 and _dst_group in trigger_groups_2):
|
||||
return
|
||||
'''
|
||||
print('on air:', h(_dst_group))
|
||||
print('TS1')
|
||||
for group in trigger_groups_1:
|
||||
print(h(group))
|
||||
print('TS2')
|
||||
for group in trigger_groups_2:
|
||||
print(h(group))
|
||||
if (_ts == 0 and _dst_group in trigger_groups_1):
|
||||
return
|
||||
if (_ts == 1 and _dst_group in trigger_groups_2):
|
||||
return
|
||||
|
||||
logger.info('(Event ID: %s) Playback triggered from TS %s, TGID %s', self.event_id, (_ts +1), int_id(_dst_group))
|
||||
|
||||
|
|
Loading…
Reference in New Issue