[Users] Call executing multiple blocks of code

Brandon Price brandon at viatalk.com
Fri Nov 4 16:41:54 CET 2005


I am having a problem with calls matching a certain pattern executing  
more than one block of code. I have a block of code that looks like
  if (method =~ "INVITE" && uri =~ "sip:\*12.*") { ...
do some stuff
};

and another like

  if (method=="INVITE" && uri =~ "sip:1[0-9]{10}@.*"){ ...
do some stuff
};

see full block here . The problem is that whenever *12 is dialed it  
executes both blocks, I thought the pattern matching is just wrong  
but when a number matching the second pattern is dialed then it  
doesn't execute the 1st block. Can someone please explain this  
behavior to me.

--Sorry if this is a repost--



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20051104/25b8b238/attachment.htm>


More information about the sr-users mailing list