if(clbMonitoringManager.isCLBMonitoringEnabled()){
clbMonitoringManager.getCLBStatsUpdater().
incrementTotalIncomingSipRequestsFE();
}
ServerInstance serverInstance = router.selectInstance(req);
if (serverInstance == null) {
throw new SipRoutingException("Could not find a server");
}
String hashkey = req.getHashKey();
request.setBeKey(hashkey);
if (logger.isLoggable(Level.FINER)) {
logger.log(Level.FINER,
"Hash key: " + hashkey + "; server: " +
serverInstance.getName()+"; isLocal: "+serverInstance.isLocalInstance());
}
if (serverInstance.isLocalInstance()) {
if(clbMonitoringManager.isCLBMonitoringEnabled()){
clbMonitoringManager.getCLBStatsUpdater().
incrementTotalLocalSipRequestsFE();
}
// Continue on this instance
return null;
} else {
if(clbMonitoringManager.isCLBMonitoringEnabled()){
clbMonitoringManager.getCLBStatsUpdater().
incrementTotalProxiedSipRequestsFE();
}
// Proxy to the other instance
Socket serverAddress = getServerAddress(
serverInstance.getEndPoint(CLBConstants.SIP_PROTOCOL));
Socket outgoingSocket = null;
//update via with proper param
if(controller.getLocalInstance() != null){
EndPoint endPoint = controller.getLocalInstance().getEndPoint(
CLBConstants.SIP_PROTOCOL);