|
@@ -21,6 +21,8 @@ from src.core.callcenter.api import BotChatRequest,ChatMessage
|
|
|
from src.core import singleton_keys
|
|
|
from src.core.callcenter.snowflake import Snowflake
|
|
|
|
|
|
+from src.core.callcenter.data_handler import *
|
|
|
+
|
|
|
calls = {}
|
|
|
# recording_file = '/code/src/core/voip/incoming_call.wav'
|
|
|
# player_file1 = '/code/src/core/voip/test111.wav'
|
|
@@ -211,6 +213,8 @@ class MyCall(pj.Call):
|
|
|
self.txtLock = False
|
|
|
self.inputLongStart = time.time() #长按键开始时间
|
|
|
|
|
|
+
|
|
|
+
|
|
|
def wait_time_check(self, current_time, wait_time):
|
|
|
try:
|
|
|
# 确保 wait_time 是整数类型
|
|
@@ -363,7 +367,7 @@ class MyCall(pj.Call):
|
|
|
print('todo 转人工')
|
|
|
self.agent.transfer(user_part=self.user_part, call_id=self.session_id, device_id=self.device_id)
|
|
|
#更新通话记录机器人意图
|
|
|
- self.dataHandleServer.update_call_record_bussiness_type(self.session_id)
|
|
|
+ self.agent.dataHandleServer.update_call_record_bussiness_type(self.session_id)
|
|
|
|
|
|
class ToTextBotAgent:
|
|
|
def __init__(self, user_asr_text, call_agent):
|
|
@@ -492,6 +496,7 @@ class BotAgent:
|
|
|
self.is_stopping = False
|
|
|
self.acd_service = None
|
|
|
self.cache = Cache(app)
|
|
|
+ self.dataHandleServer = DataHandleServer(app)
|
|
|
threading.Thread(target=self.create_pjsua2, daemon=True).start()
|
|
|
|
|
|
def create_pjsua2(self):
|