private Node checkRouteHeaderForSipNode ( SipURI routeSipUri ) { Node node = null ; String hostNode = routeSipUri . getParameter ( ROUTE_PARAM_NODE_HOST ) ; String hostPort = routeSipUri . getParameter ( ROUTE_PARAM_NODE_PORT ) ; String hostVersion = routeSipUri . getParameter ( ROUTE_PARAM_NODE_VERSION ) ; if ( hostNode != null && hostPort != null ) { int port = Integer . parseInt ( hostPort ) ; String transport = routeSipUri . getTransportParam ( ) ; if ( transport == null ) transport = ListeningPoint . UDP ; node = register . getNode ( hostNode , port , transport , hostVersion ) ; } return node ; }
This will check if in the route header there is information on which node from the cluster send the request . If the request is not received from the cluster this information will not be present .