|
@@ -13,16 +13,16 @@ sip::IncomingConnectionValidator::IncomingConnectionValidator(std::string validU
|
|
|
for (auto &uri : separateUris) {
|
|
|
boost::replace_all(uri, ".", "\\.");
|
|
|
boost::replace_all(uri, "*", "\\w*");
|
|
|
- uriRegexVec.push_back(regex(uri));
|
|
|
+ uriRegexVec.push_back(boost::regex(uri));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
bool sip::IncomingConnectionValidator::validateUri(std::string uri) {
|
|
|
- regex addressRegex("[\"\\w ]*<sip:([\\w\\.]+@[\\w\\.]+)>");
|
|
|
+ boost::regex addressRegex("[\"\\w ]*<sip:([\\w\\.]+@[\\w\\.]+)>");
|
|
|
|
|
|
- smatch s;
|
|
|
+ boost::smatch s;
|
|
|
|
|
|
- if (not regex_match(uri, s, addressRegex)) {
|
|
|
+ if (not boost::regex_match(uri, s, addressRegex)) {
|
|
|
logger.warn("URI has invalid format: %s", uri.c_str());
|
|
|
return false;
|
|
|
}
|
|
@@ -30,7 +30,7 @@ bool sip::IncomingConnectionValidator::validateUri(std::string uri) {
|
|
|
string rawAddress = s[1].str();
|
|
|
|
|
|
for (auto ® : uriRegexVec) {
|
|
|
- if (regex_match(rawAddress, s, reg)) {
|
|
|
+ if (boost::regex_match(rawAddress, s, reg)) {
|
|
|
logger.info("URI %s is valid.", rawAddress.c_str());
|
|
|
return true;
|
|
|
}
|