public static bool IsAllowedProtocol(string protocol) { try { Enum.Parse(typeof(SIPProtocolsEnum), protocol, true); return true; } catch { return false; } }