private boolean securityCheck(Request request) {
        //        User-Agent: sipcli/v1.8
        //        User-Agent: friendly-scanner
        //        To: "sipvicious" <sip:100@1.1.1.1>
        //        From: "sipvicious" <sip:100@1.1.1.1>;tag=3336353363346565313363340133313330323436343236
        //        From: "1" <sip:1@87.202.36.237>;tag=3e7a78de
        Header userAgentHeader = request.getHeader("User-Agent");
        Header toHeader = request.getHeader("To");
        Header fromHeader = request.getHeader("From");

        for (String blockedValue: balancerRunner.balancerContext.blockedList){
            if(userAgentHeader != null && userAgentHeader.toString().toLowerCase().contains(blockedValue.toLowerCase())) {
                return false;
            } else if (toHeader != null && toHeader.toString().toLowerCase().contains(blockedValue.toLowerCase())) {
                return false;
            } else if (fromHeader != null && fromHeader.toString().toLowerCase().contains(blockedValue.toLowerCase())) {
                return false;
            }
        }
        return true;
    }
private boolean securityCheck ( Request request ) { Header userAgentHeader = request . getHeader ( "User-Agent" ) ; Header toHeader = request . getHeader ( "To" ) ; Header fromHeader = request . getHeader ( "From" ) ; for ( String blockedValue : balancerRunner . balancerContext . blockedList ) { if ( userAgentHeader != null && userAgentHeader . toString ( ) . toLowerCase ( ) . contains ( blockedValue . toLowerCase ( ) ) ) { return false ; } else if ( toHeader != null && toHeader . toString ( ) . toLowerCase ( ) . contains ( blockedValue . toLowerCase ( ) ) ) { return false ; } else if ( fromHeader != null && fromHeader . toString ( ) . toLowerCase ( ) . contains ( blockedValue . toLowerCase ( ) ) ) { return false ; } } return true ; }
@param request
@return