DavidLiu 3 miesięcy temu
rodzic
commit
5b2252136a
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      src/core/voip/bot.py

+ 3 - 1
src/core/voip/bot.py

@@ -639,7 +639,9 @@ class BotAgent:
             call.hangup(call_op_param)
             acc = self.accounts.get(user_part)
             if acc:
-                acc.calls.pop(call)
+                keys = [k for k,v in list(acc.calls.items()) if call == v]
+                for k in keys:
+                    acc.calls.pop(k)
             del call
             #     for k, v in acc.calls.items():
             #         self.logger.info('hangup, call_idx=%s, call_active=%s'%(k, v.isActive()))