shanghui 3 月之前
父節點
當前提交
8bce238e06
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/callcenter/esl/handler/channel_hangup_handler.py

+ 1 - 1
src/core/callcenter/esl/handler/channel_hangup_handler.py

@@ -197,7 +197,7 @@ class ChannelHangupHandler(EslEventHandler):
                 return
             merge_record = self.merge_audio_files(records) if len(records) > 1 else records[0]
             # 计算录音时长
-            duration = self.get_audio_duration(merge_record)
+            duration = self.get_audio_duration(merge_record) or 0
             self.dataHandleServer.update_record(call_id, times=int(duration), time_end=datetime.now(), url=merge_record, sip_status=sip_status, sip_hangup_cause=hangup_cause,user_id=agent.user_id if agent else None, user_name=agent.agent_name if agent else None)
             self.logger.info("更新录音记录完成: call_id=%s, duration=%s", call_id, int(duration))
         except Exception as e: