code: private void handleDisconnectEvent(DisconnectEvent disconnectEvent)
      {
          // reset version information as it might have changed while Asterisk
          // restarted
          version = null;
          versions = null;
  
          // same for channels, agents and queues rooms, they are reinitialized
          // when reconnected
          channelManager.disconnected();
          agentManager.disconnected();
          meetMeManager.disconnected();
          queueManager.disconnected();
          initialized = false;
          initializing = false;
      }
docs: /*
  Resets the internal state when the connection to the asterisk server is
  lost.