|
@@ -614,14 +614,17 @@ class BotAgent:
|
|
self.logger.info('hangup, header_name=%s, header_value=%s'%(k, v))
|
|
self.logger.info('hangup, header_name=%s, header_value=%s'%(k, v))
|
|
sip_header_vector.push_back(_sip_header)
|
|
sip_header_vector.push_back(_sip_header)
|
|
call_op_param.txOption.headers = sip_header_vector
|
|
call_op_param.txOption.headers = sip_header_vector
|
|
-
|
|
|
|
- acc = self.accounts.get(user_part)
|
|
|
|
- if acc:
|
|
|
|
- for k, v in acc.calls.items():
|
|
|
|
- try:
|
|
|
|
- v.hangup(call_op_param)
|
|
|
|
- except:
|
|
|
|
- traceback.print_exc()
|
|
|
|
|
|
+ try:
|
|
|
|
+ acc = self.accounts.get(user_part)
|
|
|
|
+ if acc:
|
|
|
|
+ for k, v in acc.calls.items():
|
|
|
|
+ try:
|
|
|
|
+ v.hangup(call_op_param)
|
|
|
|
+ except:
|
|
|
|
+ traceback.print_exc()
|
|
|
|
+ except:
|
|
|
|
+ traceback.print_exc()
|
|
|
|
+ finally:
|
|
# 机器人主动挂机回收分机号
|
|
# 机器人主动挂机回收分机号
|
|
self.release(user_part)
|
|
self.release(user_part)
|
|
|
|
|