From 413ecbe4ada73f38031b1c25dbd9a70e9ea15b13 Mon Sep 17 00:00:00 2001 From: Falk Stern Date: Sun, 14 Feb 2016 16:21:48 +0100 Subject: [PATCH] Match international phone numbers starting with +XX --- IncomingConnectionValidator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IncomingConnectionValidator.cpp b/IncomingConnectionValidator.cpp index 7d509a8..a97abeb 100644 --- a/IncomingConnectionValidator.cpp +++ b/IncomingConnectionValidator.cpp @@ -12,13 +12,13 @@ sip::IncomingConnectionValidator::IncomingConnectionValidator(std::string validU boost::split(separateUris, validUriExpression, boost::is_any_of("\t ")); for (auto &uri : separateUris) { boost::replace_all(uri, ".", "\\."); - boost::replace_all(uri, "*", "\\w*"); + boost::replace_all(uri, "*", "[\\+\\w]*"); uriRegexVec.push_back(boost::regex(uri)); } } bool sip::IncomingConnectionValidator::validateUri(std::string uri) { - boost::regex addressRegex("[\"\\w ]*"); + boost::regex addressRegex("[\"\\+\\w ]*"); boost::smatch s;