writer.setTargetVersion(version);
logger.info("Determined Asterisk version: " + version);
// generate pseudo event indicating a successful login
ConnectEvent connectEvent = new ConnectEvent(this);
connectEvent.setProtocolIdentifier(getProtocolIdentifier());
connectEvent.setDateReceived(DateUtil.getDate());
// TODO could this cause a deadlock?
fireEvent(connectEvent);
}