Hi OpenSIPS community! I've come across one small obstacle, when trying to use pseudo variables or attribute value pairs in regular expression.
I believe my mistake should be quite simple. Regular expression is used in a condition: if ( $rU =~ "^$var(each)" ) $var(each) - is a string variable, not integer. It contains certain prefix, like "44". For some reason OpenSIPS script is not able to get through this check properly. But, in case I hardcode something like this: if ( $rU =~ "^44" ) then it passes a check as needed. To my shame, I spent several hours trying to solve this in different ways, but without any success. I think that the problem consists of extra quotes appearing when $var(each) comes into play. So I have first quoting defined in a condition, they wrap regular exp: ^$var(each) And when $var(each) is defined in a condition, it gets quotes too, since it's a string. Of course I can use some other way to run this check, for example with help of regex module. But my curiosity doesn't give me any chance to set this case aside. Any advice is appreciated! -- Best regards, Donat Zenichev
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
