浏览代码

mixmonitor

svetlana 3 年之前
父节点
当前提交
2b5962c18c
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      app/app.py

+ 8 - 2
app/app.py

@@ -564,11 +564,17 @@ async def amiStartMixMonitor(channel,filename):
   Returns:
     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',
                                      'Channel': channel,
                                      '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 reply.success:
       return None