774056846 6 月之前
父节点
当前提交
acc114b8f2
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 3
      src/core/callcenter/esl/client.py
  2. 1 0
      src/core/voip/bot.py

+ 2 - 3
src/core/callcenter/esl/client.py

@@ -260,9 +260,8 @@ class InboundClient:
             _con = ESL.ESLconnection(self.host, self.port, self.password)
             if _con.connected():
                 arg = ''.join([EslEventUtil.SIP_H_P_LIBRA_HANGUP_CAUSE, "=", case_enum.description])
-                # self.send_args(device_id, SET, arg, con=_con)
-                # e = _con.sendEvent(msg)
-                e = _con.api(UUID_KILL, device_id)
+                self.send_args(device_id, SET, arg, con=_con)
+                e = _con.sendEvent(msg)
                 self.logger.info("hangup_call挂机 hangup call: %s, device: %s, arg: %s, res:%s" % (call_id, device_id, arg, e.serialize('json')))
         except:
             traceback.print_exc()

+ 1 - 0
src/core/voip/bot.py

@@ -550,6 +550,7 @@ class BotAgent:
         if self.acd_service:
             self.acd_service.transfer_to_agent(call_id, device_id, service_id)
         # sip_headers = {'P-LIBRA-HangUpReason': 'transferToAgent', 'P-LIBRA-ServiceId': service_id}
+        time.sleep(10)
         self.hangup(user_part)
 
     def hangup(self, user_part, reason="NORMAL_CLEARING", **sip_headers):