774056846 il y a 4 mois
Parent
commit
647f8227f1

+ 7 - 4
src/core/callcenter/esl/client.py

@@ -18,9 +18,11 @@ from apscheduler.schedulers.background import BackgroundScheduler
 from src.core.callcenter.cache import Cache
 from src.core.callcenter.cache import Cache
 from src.core.callcenter.api import MakeCallContext, DelayAction, CallInfo, DeviceInfo, NextCommand
 from src.core.callcenter.api import MakeCallContext, DelayAction, CallInfo, DeviceInfo, NextCommand
 from src.core.callcenter.constant import SK, EMPTY, CTI_ENGINE_DELAY_ACTION_LOCK, HOLD_MUSIC_PATH, saasId
 from src.core.callcenter.constant import SK, EMPTY, CTI_ENGINE_DELAY_ACTION_LOCK, HOLD_MUSIC_PATH, saasId
-from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRIDGE, HANGUP, NORMAL_CLEARING, SIP_HEADER, SPACE, SPLIT, 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
+from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRIDGE, HANGUP, NORMAL_CLEARING, SIP_HEADER, \
+    SPACE, SPLIT, 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.callcenter.esl.utils.esl_event_util as EslEventUtil
 import src.core.callcenter.esl.utils.esl_event_util as EslEventUtil
 import src.core.callcenter.esl.handler as event_handler
 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, sipHeaderCallId
@@ -259,7 +261,8 @@ class InboundClient:
             if _con.connected():
             if _con.connected():
                 arg = ''.join([EslEventUtil.SIP_H_P_LIBRA_HANGUP_CAUSE, "=", case_enum.description])
                 arg = ''.join([EslEventUtil.SIP_H_P_LIBRA_HANGUP_CAUSE, "=", case_enum.description])
                 # self.send_args(device_id, SET, arg, con=_con)
                 # self.send_args(device_id, SET, arg, con=_con)
-                e = _con.sendEvent(msg)
+                # e = _con.sendEvent(msg)
+                e = _con.api(UUID_KILL, device_id)
                 self.logger.info("hangup_call挂机 hangup call: %s, device: %s, arg: %s, res:%s" % (call_id, device_id, arg, e.serialize('json')))
                 self.logger.info("hangup_call挂机 hangup call: %s, device: %s, arg: %s, res:%s" % (call_id, device_id, arg, e.serialize('json')))
         except:
         except:
             traceback.print_exc()
             traceback.print_exc()

+ 1 - 0
src/core/callcenter/esl/constant/esl_constant.py

@@ -15,6 +15,7 @@ UUID_ANSWER = "uuid_answer"
 UUID_BRIDGE = "uuid_bridge"
 UUID_BRIDGE = "uuid_bridge"
 UUID_BROADCAST = "uuid_broadcast"
 UUID_BROADCAST = "uuid_broadcast"
 UUID_BREAK = "uuid_break"
 UUID_BREAK = "uuid_break"
+UUID_KILL = "uuid_kill"
 UUID_HOLD = "uuid_hold"
 UUID_HOLD = "uuid_hold"
 UUID_GETVAR = "uuid_getvar"
 UUID_GETVAR = "uuid_getvar"
 UUID_SETVAR = "uuid_setvar"
 UUID_SETVAR = "uuid_setvar"