774056846 2 dní pred
rodič
commit
3bb42d5174

+ 1 - 1
src/core/callcenter/call.py

@@ -57,7 +57,7 @@ class CallService:
         print('debugger::hold, custom_device_id=%s'%custom_device_id, flush=True)
         # self.client.sync_invoke_method("bridge_break", method_args=(custom_device_id,))
         # self.client.sync_invoke_method("hold_play", method_args=(custom_device_id,HOLD_MUSIC_PATH))
-        self.client.bridge_break(custom_device_id)
+        self.client.bridge_break(call_info.call_id, custom_device_id)
         Cache.set_need_play_hold_music(call_info.call_id)
         print('debugger::hold success custom_device_id=%s'%custom_device_id, flush=True)
 

+ 3 - 3
src/core/callcenter/esl/client.py

@@ -23,7 +23,7 @@ from src.core.callcenter.esl.constant.esl_constant import BRIDGE_VARIABLES, BRID
     UUID_RECORD, UUID_SETVAR, UUID_GETVAR
 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
+from src.core.callcenter.esl.constant.sip_header_constant import sipHeaderHoldMusic, profile1, profile2, sipHeaderCallId
 from src.core.callcenter.enumeration import CallCause, DeviceType, DelayActionEnum, HangupDir, CallType, NextType, \
     Direction, CdrType
 from src.core.callcenter.esl.handler.default_esl_event_handler import DefaultEslEventHandler
@@ -413,11 +413,11 @@ class InboundClient:
         arg = ''.join(builder)
         self.con.api(TRANSFER, arg)
 
-    def bridge_break(self, device_id):
+    def bridge_break(self, call_id, device_id):
         """拆线"""
         builder = [
             device_id,
-            "  -both 'set:hangup_after_bridge=false,set:park_after_bridge=true,set:" + SIP_HEADER + sipHeaderHoldMusic + "=true,park:' inline "
+            "  -both 'set:hangup_after_bridge=false,set:park_after_bridge=true,set:" + SIP_HEADER + sipHeaderHoldMusic + "=true,set:"+SIP_HEADER+sipHeaderCallId+"="+call_id+",park:' inline "
         ]
         _con = None
         try: