Code: Select all
return sys.RegexMatch(req.URI.User, "^1[2-9][0-9][0-9][2-9][0-9][0-9][0-9][0-9][0-9][0-9]$")
sys.Log(req.URI.User) if is_north_america # this line is working, e.g. dial 16465551212
sys.Log(req.URI.User) if is_north_america # the same thing is not working this time
It seems that sys.RegexMatch does not like to be used a second time in a method. It took some time to identify the problem in a more complex code that everything looked fine and the code lacked good debugging. Or maybe there is a simple mistake that I am not aware.