Closed pzi42 closed 8 years ago
Your regex uses .
, which matches any character. It works, but I came up with safer regex:
boost::regex addressRegex("[\"\\+\\w\\. ]*<?sip:([\\+\\w\\.]+@[\\w\\.]+)>?");
Can you try if it works in your case? It matches the URI you have pasted.
PS. Can you use code syntax when you post code? If you paste it as is, escape characters are lost.
Thanks, boost::regex addressRegex("[\"\\+\\w\\. ]*<?sip:([\\+\\w\\.]+@[\\w\\.]+)>?");
works fine
I updated regex with commit 35f70f319585f3b8d3f7d2aa9789e4f5c79ea389. I'm closing issue.
Testing mumsi delivers refusing incoming connections.So I checked the regex in "IncomingConnectionValidator::validateUri. I chabged
boost::regex addressRegex("[\"+\w ]_sip:([+\w.]+@[\w.]+)"); to boost::regex addressRegex("[\"+ .\w ]_sip:([+\w.]+@[\w.]+)");
After this validateUri accepts my URIs.
I'not shure about side-effects, or what else could happen with this changed regex. So I want to know whetger my new regex is good enough.
My URI is like: "X. XXXX" sip:99@162.168.1.6 and the original regex does not match on this URI.