|
@@ -49,12 +49,12 @@ class CallService:
|
|
|
|
|
|
def hold(self, call_info: CallInfo, device_id):
|
|
|
devices = call_info.device_list
|
|
|
- # try:
|
|
|
- # devices.remove(device_id)
|
|
|
- # except:
|
|
|
- # pass
|
|
|
- # custom_device_id = devices[0]
|
|
|
- custom_device_id = device_id
|
|
|
+ try:
|
|
|
+ self.client.hangup_call(call_info.call_id, device_id, case_enum=CallCause.HANGUP_EVENT)
|
|
|
+ devices.remove(device_id)
|
|
|
+ except:
|
|
|
+ pass
|
|
|
+ custom_device_id = devices[0]
|
|
|
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))
|