public static AsteriskVersion getDetermineVersionFromString ( String coreLine ) { for ( AsteriskVersion version : knownVersions ) { for ( Pattern pattern : version . patterns ) { if ( pattern . matcher ( coreLine ) . matches ( ) ) { return version ; } } } return null ; }
Determine the Asterisk version from the string returned by Asterisk . The string should contain Asterisk followed by a version number .