|
@@ -29,28 +29,28 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
print(json.loads(event.serialize('json')))
|
|
|
try:
|
|
|
call_id = EslEventUtil.getCallId(event)
|
|
|
- print('call_id is ', call_id)
|
|
|
+ print('debugger::call_id is ', call_id)
|
|
|
sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
if not call_id:
|
|
|
self.release(event)
|
|
|
print("call_id is null")
|
|
|
return
|
|
|
call = Cache.get_call_info(call_id)
|
|
|
- print('call_info is ', call)
|
|
|
+ print('debugger::call_info is ', call)
|
|
|
sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
if not call:
|
|
|
print("call:%s is null", call_id)
|
|
|
return
|
|
|
device_id = EslEventUtil.getDeviceId(event)
|
|
|
device = call.device_info_map.get(device_id)
|
|
|
- print('device_id is ', device_id)
|
|
|
+ print('debugger::device_id is ', device_id)
|
|
|
sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
if not device:
|
|
|
print("device:%s is null", device_id)
|
|
|
return
|
|
|
|
|
|
count = len(call.device_list)
|
|
|
- print('ChannelHangupHandler, call_id=%s, device_id=%s, count=%s'% (call_id, device_id, count))
|
|
|
+ print('debugger::ChannelHangupHandler, call_id=%s, device_id=%s, count=%s'% (call_id, device_id, count))
|
|
|
sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
try:
|
|
|
call.device_list.remove(device_id)
|
|
@@ -82,7 +82,7 @@ class ChannelHangupHandler(EslEventHandler):
|
|
|
if device.record_start_time:
|
|
|
device.record_time = int(device.end_time) - int(device.record_start_time)
|
|
|
call.device_info_map[device.device_id] = device
|
|
|
- print('ChannelHangupHandler, hangup_reason=%s, device_type=%s' % (hangup_reason, device.device_type))
|
|
|
+ print('debugger::ChannelHangupHandler, hangup_reason=%s, device_type=%s' % (hangup_reason, device.device_type))
|
|
|
# 如果是转人工
|
|
|
sys.stdout.flush() # 强制刷新输出缓冲区
|
|
|
if 'transferToAgent' == hangup_reason and DeviceType.ROBOT.code == device.device_type:
|