DavidLiu před 3 měsíci
rodič
revize
d60c8a9804

+ 1 - 1
src/core/callcenter/acd.py

@@ -36,7 +36,6 @@ class AcdService:
         if not call_info:
             return
         call_info.answer_flag = AnswerFlag.TRANSFER_TO_AGENT.code
-        self.cache.add_call_info(call_info)
         # 1. hold住并且播放等待音
         self.call_service.hold(call_info, device_id)
         self.wait_timeout(call_id)
@@ -55,6 +54,7 @@ class AcdService:
             self.logger.info("AcdService transferToAgent agentNumber not empty %s, serviceId:%s,called:%s,callId:%s"%(
                              agent_number, service_id, call_info.called, call_info.call_id))
             self.call_service.transfer(call_info, agent_number, service_id)
+        self.cache.add_call_info(call_info)
 
     def try_transfer_agent(self):
         # self.logger.info("AcdService tryTransferAgent start")

+ 2 - 1
src/core/callcenter/call.py

@@ -79,7 +79,8 @@ class CallService:
         custom_device_id = device_id
         self.logger.info('hold, custom_device_id=%s'%custom_device_id)
         self.client.bridge_break(call_info.call_id, custom_device_id)
-        self.cache.set_need_play_hold_music(call_info.call_id)
+        self.client.hold_play(device_id, HOLD_MUSIC_PATH)
+        # self.cache.set_need_play_hold_music(call_info.call_id)
         self.logger.info('hold success custom_device_id=%s'%custom_device_id)
 
     def cancel_hold(self, call_info: CallInfo, device_id):

+ 1 - 1
src/core/callcenter/esl/client.py

@@ -535,7 +535,7 @@ class OutboundClient:
                     service_category = 0
                     bucket = self.server.get_bucket(call_id)
                     whitelist = self.server.get_whitelist()
-                    self.server.logger.info('call incoming call_id=%s, bucket=%s', call_id, bucket.name)
+                    self.server.logger.info('call incoming call_id=%s, device_id=%s, bucket=%s', call_id, device_id, bucket.name)
                     self.server.logger.info('call incoming caller_number=%s, whitelist=%s', caller_number, json.dumps(whitelist))
                     if caller_number in whitelist:
                         # 检查白名单