|
@@ -2,6 +2,8 @@
|
|
|
# encoding:utf-8
|
|
|
|
|
|
import json
|
|
|
+import sys
|
|
|
+
|
|
|
import src.core.callcenter.cache as Cache
|
|
|
from src.core.callcenter.acd import AcdService
|
|
|
from src.core.callcenter.call import CallService
|
|
@@ -78,12 +80,14 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
service_id = EslEventUtil.getLIBRAServiceId(event)
|
|
|
Cache.add_call_info(call)
|
|
|
self.acd_service.transfer_to_agent(call, device, service_id)
|
|
|
+ sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
return
|
|
|
|
|
|
# 如果有下一步
|
|
|
next_command = call.next_commands[0] if len(call.next_commands) > 0 else None
|
|
|
if next_command:
|
|
|
self.next_cmd(call, device, next_command, cause)
|
|
|
+ sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
return
|
|
|
|
|
|
# 一般情况下,挂断其他所有设备
|
|
@@ -94,6 +98,7 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
# 判断挂机方向 && 更新缓存
|
|
|
self.hangup_dir(call, device, cause)
|
|
|
Cache.add_call_info(call)
|
|
|
+ sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
|
|
|
def release(self, event):
|
|
|
device_id = event.getHeader("Unique-ID")
|