|
@@ -531,11 +531,11 @@ class OutboundClient:
|
|
|
device_id = info.getHeader("unique-id")
|
|
|
caller_number = info.getHeader("Caller-Caller-ID-Number") # 获取来电号码
|
|
|
whitelist = self.server.load_whitelist()
|
|
|
- agents = self.server.load_agent_monitor()
|
|
|
- # 直接转接到人工坐席
|
|
|
|
|
|
# 检查白名单
|
|
|
if caller_number in whitelist:
|
|
|
+ # 直接转接到人工坐席
|
|
|
+ agents = self.server.load_agent_monitor()
|
|
|
# 随机取一个坐席号
|
|
|
destination = random.choice(agents)
|
|
|
# 直接转接到人工坐席
|
|
@@ -554,7 +554,6 @@ class OutboundClient:
|
|
|
self.build_call_info(call_id, device_id, new_device_id, str(destination), **kwargs)
|
|
|
Cache.add_device_user_part(device_id, destination)
|
|
|
con.execute("bridge", "{sip_h_P-LIBRA-CallId=%s,sip_h_P-LIBRA-DeviceId=%s,origination_uuid=%s}user/%s"%(call_id, new_device_id, new_device_id, destination), device_id)
|
|
|
- # con.bgapi(ORIGINATE, "{sip_h_P-LIBRA-CallId=%s,sip_h_P-LIBRA-DeviceId=%s,origination_uuid=%s}user/%s"%(call_id, new_device_id, new_device_id, destination))
|
|
|
|
|
|
# destination = "user/1001"
|
|
|
# msg = ESL.ESLevent("sendmsg", uuid)
|