[OpenSIPS-Users] Match regular expression for '+'

Jayesh Nambiar jayesh.voip at gmail.com
Wed Oct 29 14:00:58 CET 2008


Hi Bogdan,Thanks for the reply.
So the RE that i had written which is if(uri=~"^sip:\+[2-9]*@")  should
match +91981122334455 right?
But it does not. Any suggestions?

--- Jayesh

On Wed, Oct 29, 2008 at 1:12 PM, Bogdan-Andrei Iancu <bogdan at voice-system.ro
> wrote:

> Hi Jayesh,
>
> try:
>   if ($ru=~"^sip:\+12127773456 at domain.com <mailto:
> sip%3A%2B12127773456 at domain.com <sip%253A%252B12127773456 at domain.com>>")
>
> + is a special chr in regexp and you need to escape it to use it.
>
> Regards,
> Bogdan
>
> Jayesh Nambiar wrote:
>
>> Hello,
>> Can someone please guide me to write a regular expression that matches
>> URIs like sip:+12127773456 at domain.com <sip%3A%2B12127773456 at domain.com><mailto:
>> sip%3A%2B12127773456 at domain.com <sip%253A%252B12127773456 at domain.com>> in
>> OpenSIPS.
>> I want to match numbers starting from '+'.
>>
>> Any help would be highly appreciated.
>>
>> Thanks in advance.
>>
>> w/regards,
>> Jayesh
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081029/cca3ab30/attachment-0001.htm 


More information about the Users mailing list