774056846 há 4 meses atrás
pai
commit
62ae68e45f
1 ficheiros alterados com 0 adições e 52 exclusões
  1. 0 52
      src/core/callcenter/esl/client.py

+ 0 - 52
src/core/callcenter/esl/client.py

@@ -214,58 +214,6 @@ class InboundClient:
         sys.stdout.flush()  # 强制刷新输出缓冲区
         self.con.bgapi(ORIGINATE, cmd)
 
-    def make_call(self, route_gateway, display, called, call_id, device_id, timeout=30, originate_timeout=30, *sip_headers):
-
-        # called = f"{called}{AT}{route_gateway.media_host}{CO}{route_gateway.media_port}"
-        if route_gateway.caller_prefix:
-            display = f"{route_gateway.caller_prefix}{display}"
-        if route_gateway.called_prefix:
-            called = f"{route_gateway.called_prefix}{called}"
-
-        sip_buffer = []
-        if sip_headers:
-            sip_buffer = [f"{SIP_HEADER}{header}" for header in sip_headers]
-
-        params = {
-            "callId": call_id,
-            "deviceId": device_id,
-            "caller": display,
-            "called": called,
-        }
-
-        if route_gateway.sip_header1:
-            sip_header1 = self.expression(route_gateway.sip_header1, params)
-            sip_buffer.append(f"{SIP_HEADER}{sip_header1}")
-
-        if route_gateway.sip_header2:
-            sip_header2 = self.expression(route_gateway.sip_header2, params)
-            sip_buffer.append(f"{SIP_HEADER}{sip_header2}")
-
-        if route_gateway.sip_header3:
-            sip_buffer.append(f"{SIP_HEADER}{route_gateway.sip_header3}")
-
-        builder = [
-            "{return_ring_ready=true,",
-            f"sip_contact_user={display},",
-            "ring_asr=true,",
-            "absolute_codec_string=^^:PCMU:PCMA,",  # Assuming codecs is defined somewhere
-            f"origination_caller_id_number={display},",
-            f"origination_caller_id_name={display},",
-            f"origination_uuid={device_id},",
-        ]
-
-        if originate_timeout:
-            builder.append(f"originate_timeout={originate_timeout},")
-
-        if sip_buffer:
-            builder.append(f"{SPLIT}".join(sip_buffer))
-
-        builder.append("}")
-        builder.append(f"{SOFIA}{SK}{route_gateway.profile}{SK}{called}{PARK}")
-        cmd = "".join(builder)
-        print(cmd)
-        self.con.bgapi(ORIGINATE, cmd)
-
     def call_timeout(self, call_id, device_id, timeout):
         """呼叫超时主动挂机"""
         delay_action = DelayAction(call_id=call_id, device_id=device_id)