[Spce-user] Order that costs are applied to CDR

Thilo Bangert thilo.bangert at gmail.com
Wed Jul 3 03:23:09 EDT 2013


On Wednesday, July 03, 2013 09:09:16 AM Andreas Granig wrote:
> Hi,
> 
> On 07/03/2013 07:00 AM, Bob Fryer wrote:
> > Argentina  	  	001154.     $0.55
> > Argentina Mobile 	0011541151. $1.00
> 
> It tries to find the longest match in terms of length of the pattern.
> 
> This should work perfectly fine with simple cases like the one above, it
> can only lead to surprises for more complex patterns, like "^001154" vs
> "^00[1-9][1-9]", where the first one is matching on a longer string, but
> the second would be used because the pattern itself is longer. We don't
> have a solution for that one yet, any input is highly appreciated.

use x's in the pattern and replace the x with [1-9] before evaluating the 
regexp..

^00xx
vs.
^00[1-9][1-9]

yes, ugly and also doesnt allow the use of [0-9] or other classes.

:-/


kind regards
Thilo

> 
> Andreas
> 
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user




More information about the Spce-user mailing list