From bb8f13c0f4b477bee877d2b0b08a94ff4f294e32 Mon Sep 17 00:00:00 2001 From: albertmata Date: Fri, 18 Mar 2016 18:47:42 +0100 Subject: [PATCH] Changed version detection regex to allow for certified versions. In my case the version string which didn't work was "Asterisk 11.6-cert7 built by ... " --- Asterisk.2013/Asterisk.NET/Common.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Asterisk.2013/Asterisk.NET/Common.cs b/Asterisk.2013/Asterisk.NET/Common.cs index 9111467..e88a0ef 100644 --- a/Asterisk.2013/Asterisk.NET/Common.cs +++ b/Asterisk.2013/Asterisk.NET/Common.cs @@ -18,8 +18,8 @@ namespace AsterNET /// Line separator public const string LINE_SEPARATOR = "\r\n"; - public static Regex ASTERISK_VERSION = new Regex("^Asterisk\\s+\\D*([0-9]+.[0-9]+.[0-9]+|[1-9][0-9]-r[0-9]+).*$", - RegexOptions.Compiled | RegexOptions.IgnoreCase); + public static Regex ASTERISK_VERSION = new Regex( "^Asterisk\\s+\\D*([0-9]+.[0-9]+.[0-9]+|[1-9][0-9]-r[0-9]+|[0-9]+.[0-9]+-cert[0-9]).*$", + RegexOptions.Compiled | RegexOptions.IgnoreCase ); public static Regex SHOW_VERSION_FILES_PATTERN = new Regex("^([\\S]+)\\s+Revision: ([0-9\\.]+)"); public static char[] RESPONSE_KEY_VALUE_SEPARATOR = {':'};