|
@@ -368,7 +368,12 @@ class MyCall(pj.Call):
|
|
|
registry.BOT_INTERACTION_ROUNDS.labels(self.taskId).observe(self.inter_action_total)
|
|
|
|
|
|
def release(self):
|
|
|
- # self.hangup()
|
|
|
+ self.asr.close()
|
|
|
+ try:
|
|
|
+ self.hangup()
|
|
|
+ except:
|
|
|
+ traceback.print_exc()
|
|
|
+
|
|
|
if self.audio_port:
|
|
|
# self.audio_port.stopTransmit()
|
|
|
self.audio_port = None # 或调用相关销毁方法
|
|
@@ -379,7 +384,6 @@ class MyCall(pj.Call):
|
|
|
# self.audio_media.stopTransmit()
|
|
|
self.aud_media = None
|
|
|
|
|
|
- self.asr.close()
|
|
|
# 远程挂机之后要将分机号回收
|
|
|
self.agent.release(self.user_part)
|
|
|
self.end_statistics()
|