protected boolean containsRel100 ( Message message ) { ListIterator < SIPHeader > requireHeaders = message . getHeaders ( RequireHeader . NAME ) ; if ( requireHeaders != null ) { while ( requireHeaders . hasNext ( ) ) { if ( REL100_OPTION_TAG . equals ( requireHeaders . next ( ) . getValue ( ) ) ) { return true ; } } } ListIterator < SIPHeader > supportedHeaders = message . getHeaders ( SupportedHeader . NAME ) ; if ( supportedHeaders != null ) { while ( supportedHeaders . hasNext ( ) ) { if ( REL100_OPTION_TAG . equals ( supportedHeaders . next ( ) . getValue ( ) ) ) { return true ; } } } return false ; }
we check all the values of Require and Supported headers to make sure the 100rel is present