shanghui 2 months ago
parent
commit
26b2c8e86a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/core/callcenter/esl/handler/channel_hangup_handler.py

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

@@ -182,8 +182,7 @@ class ChannelHangupHandler(EslEventHandler):
             merge_record = self.merge_audio_files(records) if len(records) > 1 else records[0]
             # 计算录音时长
             duration = self.get_audio_duration(merge_record)
-
-            self.dataHandleServer.update_record(call_id, 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.dataHandleServer.update_record(call_id, times=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:
             self.logger.error("更新录音记录失败: call_id=%s, error=%s", call_id, str(e))