|
@@ -369,10 +369,7 @@ class MyCall(pj.Call):
|
|
|
|
|
|
def release(self):
|
|
|
self.asr.close()
|
|
|
- try:
|
|
|
- self.hangup()
|
|
|
- except:
|
|
|
- traceback.print_exc()
|
|
|
+ self.agent.hangup(self.user_part)
|
|
|
|
|
|
if self.audio_port:
|
|
|
# self.audio_port.stopTransmit()
|
|
@@ -601,7 +598,10 @@ class BotAgent:
|
|
|
acc = self.accounts.get(user_part)
|
|
|
if acc:
|
|
|
for k, v in acc.calls.items():
|
|
|
- v.hangup(call_op_param)
|
|
|
+ try:
|
|
|
+ v.hangup(call_op_param)
|
|
|
+ except:
|
|
|
+ traceback.print_exc()
|
|
|
# 机器人主动挂机回收分机号
|
|
|
self.release(user_part)
|
|
|
|