Ver código fonte

Merge branch 'master' of https://gogs.halsbox.ru/RRT/pbx

svetlana 3 anos atrás
pai
commit
b965353797
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      app/app.py

+ 3 - 3
app/app.py

@@ -229,9 +229,9 @@ async def celCallback(mngr: Manager, msg: Message):
       if (True or msg.CallerIDrdnis == '78124254209'):
         res = await amiStopMixMonitor(firstname);
         app.logger.warning('{}'.format(res))
-        filename = "transfer-{}-{}-{}.wav".format(msg.Exten, msg.CallerIDnum, msg.LinkedID);
+        filename = "transfer-{}-{}-{}".format(msg.Exten, msg.CallerIDnum, msg.LinkedID);
         res = await amiStartMixMonitor(firstname,filename);#2022/03/11/external-2534-1934-20220311-122726-1647001646.56557.wav
-        res = await amiChannelSetVar(firstname,"CDR(recordingfile)",filename)
+        res = await amiChannelSetVar(firstname,"CDR(recordingfile)","{}.wav".format(filename))
         app.logger.warning('{}'.format(res));
         #await amiStopMixMonitor(secondname);
       app.cache['cel_calls'][lid]['transfers'].append((first,second)) #no cdr in db here
@@ -568,7 +568,7 @@ async def amiStartMixMonitor(channel,filename):
   year = d.strftime("%Y")
   month = d.strftime("%m")
   day = d.strftime("%d")
-  fullname = "{}/{}/{}/{}".format(year,month,day,filename)
+  fullname = "{}/{}/{}/{}.wav".format(year,month,day,filename)
   reply = await manager.send_action({'Action': 'MixMonitor',
                                      'Channel': channel,
                                      'options': 'ai(LOCAL_MIXMON_ID)',