svetlana 3 سال پیش
والد
کامیت
a670ca3e30
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