|
@@ -567,11 +567,14 @@ class BotAgent:
|
|
|
|
|
|
while not self.is_stopping:
|
|
while not self.is_stopping:
|
|
registry.BOT_AGENT_LIVES.set(self.user_part_pool.qsize())
|
|
registry.BOT_AGENT_LIVES.set(self.user_part_pool.qsize())
|
|
- 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.flush_register_expire()
|
|
self.ep.libHandleEvents(100)
|
|
self.ep.libHandleEvents(100)
|
|
|
|
|
|
|
|
+ def flush_register_expire(self):
|
|
|
|
+ if len(self.accounts) == self.user_part_pool.qsize():
|
|
|
|
+ self.logger.info("------------------>flush register ::%s", len(self.accounts))
|
|
|
|
+ self.accounts[0].setRegistration(renew=True)
|
|
|
|
+
|
|
def transfer(self, user_part, call_id, device_id, service_id='00000000000000000'):
|
|
def transfer(self, user_part, call_id, device_id, service_id='00000000000000000'):
|
|
if self.acd_service:
|
|
if self.acd_service:
|
|
self.acd_service.transfer_to_agent(call_id, device_id, service_id)
|
|
self.acd_service.transfer_to_agent(call_id, device_id, service_id)
|