[OpenSIPS-Users] Quick Regex Question.

Alan Frisch frisch.alan at gmail.com
Thu Feb 18 23:12:24 CET 2010


I've been fooling around with OpenSIPS and regex pattern matching on the R-URI.

For example, this code allows for any number of numerical characters:

if(uri =~ "^sip:[0-9]+@")
{
  whatever
}

What I am trying to do is prefix a value if the inbound number comes
in with an E164 format.  I tried the following, but it seems to throw
OpenSIPS.

if(uri =~ "^sip:[2-9][0-9]+@")
{
    whatever

}

Can a kind soul suggest the proper regex to match first number as
[2-9]  and then any (unlimited number of) second numbers.

Thanks

AF



More information about the Users mailing list