|
@@ -1,14 +1,11 @@
|
|
|
#!/usr/bin/env python3
|
|
|
# encoding:utf-8
|
|
|
|
|
|
-import json
|
|
|
import random
|
|
|
import socketserver
|
|
|
-import sys
|
|
|
|
|
|
import ESL
|
|
|
import time
|
|
|
-import mmh3
|
|
|
import uuid
|
|
|
import threading
|
|
|
import traceback
|
|
@@ -20,16 +17,15 @@ from src.core.callcenter import BizException
|
|
|
from src.core.callcenter.cache import Cache
|
|
|
from src.core.callcenter.api import MakeCallContext, DelayAction, CallInfo, DeviceInfo, NextCommand
|
|
|
from src.core.callcenter.callback import Callback
|
|
|
-from src.core.callcenter.constant import SK, EMPTY, CTI_ENGINE_DELAY_ACTION_LOCK, HOLD_MUSIC_PATH, WaitingHangupMusicPath, saasId
|
|
|
+from src.core.callcenter.constant import SK, EMPTY, WaitingHangupMusicPath, saasId
|
|
|
from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRIDGE, HANGUP, NORMAL_CLEARING, SIP_HEADER, \
|
|
|
- SPACE, SPLIT, SOFIA, \
|
|
|
+ SPACE, SOFIA, \
|
|
|
ORIGINATE, PARK, SET, EAVESDROP, SMF_ALEG, EXECUTE, PLAYBACK, PAUSE, TRANSFER, UUID_TRANSFER, UUID_BROADCAST, \
|
|
|
UUID_BREAK, UUID_HOLD, \
|
|
|
UUID_RECORD, UUID_SETVAR, UUID_GETVAR, UUID_KILL
|
|
|
-import src.core.registry as Registry
|
|
|
import src.core.callcenter.esl.utils.esl_event_util as EslEventUtil
|
|
|
import src.core.callcenter.esl.handler as event_handler
|
|
|
-from src.core.callcenter.esl.constant.sip_header_constant import sipHeaderHoldMusic, profile1, profile2, sipHeaderCallId
|
|
|
+from src.core.callcenter.esl.constant.sip_header_constant import sipHeaderHoldMusic, profile1, profile2
|
|
|
from src.core.callcenter.enumeration import CallCause, DeviceType, DelayActionEnum, HangupDir, CallType, NextType, \
|
|
|
Direction, CdrType, BizErrorCode
|
|
|
from src.core.callcenter.esl.handler.default_esl_event_handler import DefaultEslEventHandler
|
|
@@ -37,6 +33,8 @@ from src.core.callcenter.snowflake import Snowflake
|
|
|
from src.core.datasource import SERVE_HOST
|
|
|
from src.core.voip.constant import *
|
|
|
from src.core.callcenter.data_handler import *
|
|
|
+from src.core.callcenter import registry
|
|
|
+
|
|
|
class InboundClient:
|
|
|
|
|
|
def __init__(self, agent, app):
|
|
@@ -545,7 +543,7 @@ class OutboundClient:
|
|
|
self.build_call_info(call_id, device_id, new_device_id, destination=None, bucket_type=_bucket_call_type, **kwargs)
|
|
|
self.server.agent.acd_service.transfer_to_agent(call_id, new_device_id)
|
|
|
|
|
|
- Registry.counter('call_incoming_requests', '呼入流量统计', ['bucket_type', str(_bucket_call_type)]).inc()
|
|
|
+ registry.counter('call_incoming_requests', '呼入流量统计', {'bucket_type': f"{_bucket_call_type}"}).inc()
|
|
|
self.server.dataHandleServer.create_record(call_id, caller_number, _bucket_call_type, service_category=None, destination=destination)
|
|
|
|
|
|
# # 检查白名单
|