|
@@ -564,11 +564,17 @@ async def amiStartMixMonitor(channel,filename):
|
|
|
Returns:
|
|
Returns:
|
|
|
string: None if SetVar was successfull, error message overwise
|
|
string: None if SetVar was successfull, error message overwise
|
|
|
'''
|
|
'''
|
|
|
|
|
+ d = date.today()
|
|
|
|
|
+ year = d.strftime("%Y")
|
|
|
|
|
+ month = d.strftime("%m")
|
|
|
|
|
+ day = d.strftime("%d")
|
|
|
|
|
+ fullname = "{}/{}/{}/{}".format(year,month,day,filename)
|
|
|
reply = await manager.send_action({'Action': 'MixMonitor',
|
|
reply = await manager.send_action({'Action': 'MixMonitor',
|
|
|
'Channel': channel,
|
|
'Channel': channel,
|
|
|
'options': 'ai(LOCAL_MIXMON_ID)',
|
|
'options': 'ai(LOCAL_MIXMON_ID)',
|
|
|
- 'File': filename})
|
|
|
|
|
- app.logger.warning('MixMonitor({}, {})'.format(channel, filename))
|
|
|
|
|
|
|
+ 'Command': "/etc/asterisk/scripts/wav2mp3.sh {} {} {} {}".format(year,month,day,filename),
|
|
|
|
|
+ 'File': fullname})
|
|
|
|
|
+ app.logger.warning('MixMonitor({}, {})'.format(channel, fullname))
|
|
|
if isinstance(reply, Message):
|
|
if isinstance(reply, Message):
|
|
|
if reply.success:
|
|
if reply.success:
|
|
|
return None
|
|
return None
|