}
return new ResponseStanzaContainerImpl(builder.build());
} else {
// acting as a Receiving server
// getting a response from the Authoritative server
SessionStateHolder dialbackSessionStateHolder = (SessionStateHolder) sessionContext.getAttribute("DIALBACK_SESSION_STATE_HOLDER");
SessionContext dialbackSessionContext = (SessionContext) sessionContext.getAttribute("DIALBACK_SESSION_CONTEXT");
// XMPPServerConnector connector = serverRuntimeContext.getServerConnectorRegistry().getConnectorBySessionId(id);
// if(connector != null) {
// SessionStateHolder dialbackSessionStateHolder = connector.getSessionStateHolder();
// SessionContext dialbackSessionContext = connector.getSessionContext();
Entity otherServer = sessionContext.getInitiatingEntity();
String resultType = "invalid";
// dialbackSessionContext must be non-null or someone is trying to send this stanza in the wrong state
if("valid".equals(type)) {
dialbackSessionStateHolder.setState(SessionState.AUTHENTICATED);
dialbackSessionContext.setInitiatingEntity(otherServer);
resultType = "valid";
}
// <db:result xmlns:db="jabber:server:dialback" to="xmpp.protocol7.com" from="jabber.org" type="valid"></db:result>