code: async def refresh(self):
          
          while True:
              await asyncio.sleep(5/6 * self.lifetime)
  
              request = stun.Message(message_method=stun.Method.REFRESH,
                                     message_class=stun.Class.REQUEST)
              request.attributes['LIFETIME'] = self.lifetime
              await self.request(request)
  
              logger.info('TURN allocation refreshed %s', self.relayed_address)
docs: Periodically refresh the TURN allocation.