|
@@ -361,7 +361,7 @@ class MyCall(pj.Call):
|
|
|
self.agent.hangup(self.user_part)
|
|
|
elif action_code == 'transfer': # 转人工
|
|
|
print('todo 转人工')
|
|
|
- self.agent.transfer(self.user_part, self.session_id, self.device_id)
|
|
|
+ self.agent.transfer(user_part=self.user_part, call_id=self.session_id, device_id=self.device_id)
|
|
|
|
|
|
class ToTextBotAgent:
|
|
|
def __init__(self, user_asr_text, call_agent):
|
|
@@ -549,8 +549,9 @@ class BotAgent:
|
|
|
self.ep.libHandleEvents(100)
|
|
|
|
|
|
def transfer(self, user_part, call_id, device_id, service_id='00000000000000000'):
|
|
|
+ print(f"Transfer {user_part} to {call_id}", flush=True)
|
|
|
if self.acd_service:
|
|
|
- self.acd_service.transfer_to_agent(call_id, device_id, service_id, user_part)
|
|
|
+ self.acd_service.transfer_to_agent(call_id, device_id, service_id)
|
|
|
# sip_headers = {'P-LIBRA-HangUpReason': 'transferToAgent', 'P-LIBRA-ServiceId': service_id}
|
|
|
try_count = 100
|
|
|
while try_count >0:
|