DavidLiu 3 bulan lalu
induk
melakukan
236a61e1e1
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      src/core/voip/bot.py

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

@@ -567,7 +567,9 @@ class BotAgent:
 
         while not self.is_stopping:
             registry.BOT_AGENT_LIVES.set(self.user_part_pool.qsize())
-            self.logger.info("------------------>pjsua::%s", len(self.accounts))
+            if len(self.accounts) == self.user_part_pool.qsize():
+                self.logger.info("------------------>flush register ::%s", len(self.accounts))
+                self.accounts[0].acc.setRegistration(renew=True)
             self.ep.libHandleEvents(100)
 
     def transfer(self, user_part, call_id, device_id, service_id='00000000000000000'):