[OpenSER-Users] quick question regarding pattern matching

Mik Cheez michael_bulk at wildgate.com
Wed Jul 11 22:31:21 CEST 2007


It would be something more like this:

"^sip:(99|9911|45555|93911)@.*"

Zahid Mehmood wrote:
> 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.
> 





More information about the Users mailing list