[OpenSER-Users] quick question regarding pattern matching

Zahid Mehmood zm23 at columbia.edu
Wed Jul 11 22:15:11 CEST 2007


Hi all,
    I'm still trying to get a handle on using regular expression in  
openser.  I can't seem to find any documentation on openser wiki on  
regular expression usage.


I have the following in my openser.cfg and a call to sip: 
48911 at ourdomain.com  is logged as emergency call.  What am I doing  
wrong?


if (uri=~"^sip:(99)|(9911)|(45555)|((93)?911)@")
{
	xlog ("L_INFO","Emergency call \n");
}

I am using this as a work around:

     if ((uri=~"^sip:(99)|(9911)|(45555)|(93911)@") || (uri=~"^sip: 
911@"))



Thanks in advance for your help.

-- 
Zahid




More information about the sr-users mailing list