2011/6/6 Daniel-Constantin Mierla :
> The module can load on db table in a memory tree or one db table in many
> trees. For the second case, the db table name is a module parameter and in
> addition it must have an extra column to specify the memory tree name.
Great. So we can extract different mt
On 6/6/11 5:26 PM, Iñaki Baz Castillo wrote:
2011/6/6 Iñaki Baz Castillo:
Thanks Daniel, please let me one question more: does the mtree module
allow setting two different tables (with maybe also different columns
names)? The function mt_match(mtree, pv, mode) seems to allow, as
first argument
On 6/6/11 5:23 PM, Iñaki Baz Castillo wrote:
2011/6/6 Iñaki Baz Castillo:
Thanks Daniel, please let me one question more: does the mtree module
allow setting two different tables (with maybe also different columns
names)? The function mt_match(mtree, pv, mode) seems to allow, as
first argument
2011/6/6 Iñaki Baz Castillo :
>> Thanks Daniel, please let me one question more: does the mtree module
>> allow setting two different tables (with maybe also different columns
>> names)? The function mt_match(mtree, pv, mode) seems to allow, as
>> first argument, the "model/table" to use, but I see
2011/6/6 Iñaki Baz Castillo :
>
> Thanks Daniel, please let me one question more: does the mtree module
> allow setting two different tables (with maybe also different columns
> names)? The function mt_match(mtree, pv, mode) seems to allow, as
> first argument, the "model/table" to use, but I see n
2011/6/6 Daniel-Constantin Mierla :
>> - You say "It has option to return a value in a cfg variable, that can
>> be the group id for example". Do you mean pv_value AVP?:
>> http://kamailio.org/docs/modules/3.1.x/modules/mtree.html#id2845134
>
> yes, but it can be any kind of writable variable,
Hello,
On 6/6/11 3:29 PM, Iñaki Baz Castillo wrote:
2011/6/6 Iñaki Baz Castillo:
2011/6/6 Daniel-Constantine Mierla:
Btw, very lightweight module for longest prefix matching is mtree. It has
option to return a value in a cfg variable, that can be the group id for
example. It does caching in
2011/6/6 Iñaki Baz Castillo :
> 2011/6/6 Daniel-Constantine Mierla :
>> Btw, very lightweight module for longest prefix matching is mtree. It has
>> option to return a value in a cfg variable, that can be the group id for
>> example. It does caching in memory trees, so it is really fast in matchi
2011/6/6 Daniel-Constantine Mierla :
> Btw, very lightweight module for longest prefix matching is mtree. It has
> option to return a value in a cfg variable, that can be the group id for
> example. It does caching in memory trees, so it is really fast in matching.
I also missed that module. Let
2011/6/6 David Villasmil :
> I had much the same traffic, and with a good index that wouldn't be a
> problem, IMHO.
Hi David, your query cannot make usage of table indexes:
select * from routes where '$rU' like concat(areacode,'%') order by
len(areacode) desc limit 1;
You are using "LIKE" and
On Jun 6, 2011, at 2:52 PM, Iñaki Baz Castillo wrote:
> 2011/6/6 David Villasmil :
>> I connected to mysql and ran something like:
>> select * from routes where '$rU' like concat(areacode,'%') order by
>> len(areacode) desc limit 1;
>
> Hi David, that would work indeed, but I prefer not to sat
Hello Iñaki,
I had much the same traffic, and with a good index that wouldn't be a
problem, IMHO.
You could also load the table in memory, can't be faster than that.
Of course, doing it in the config script is faster, but it limits your
flexibility... just a thought...
I even got the rate and cre
2011/6/6 David Villasmil :
> I connected to mysql and ran something like:
> select * from routes where '$rU' like concat(areacode,'%') order by
> len(areacode) desc limit 1;
Hi David, that would work indeed, but I prefer not to saturate the DB
with such a query which cannot use table indexes. My k
Hello Iñaki,
I did this a long time ago using a db backend, i can't remember exactly how.
the table would be:
areacode, route
1 route1
13 route2
I connected to mysql and ran something like:
select * from routes where '$rU' like concat(areacode,'%') order by
len(ar
2011/6/6 Juha Heinanen :
> sure, but i was asking about cr and the other module that henning was
> recommending.
Well, for sure cr and userblacklist implements regular expression
matching by taking the prefix from the DB and internally using
"^PREFIX" (I expect). Same as LCR.
The fact is that I d
Iñaki Baz Castillo writes:
>
> Dialplan module allows setting a regular expression per table entry
> (by setting the column match_op to 1 (regexp).
sure, but i was asking about cr and the other module that henning was
recommending.
-- juha
___
SIP Exp
2011/6/6 Juha Heinanen :
> do both of them also support regular expressions, what inaki was asking
> for?
Dialplan module allows setting a regular expression per table entry
(by setting the column match_op to 1 (regexp).
--
Iñaki Baz Castillo
___
SI
Iñaki Baz Castillo writes:
> > We use the userblacklist module for this, it works with the same
> > longest prefix match logic as cr.
do both of them also support regular expressions, what inaki was asking
for?
-- juha
___
SIP Express Router (SER) and
On Monday 06 June 2011, Iñaki Baz Castillo wrote:
> It's not valid for my custom case as I need a function returning an id
> of the matched groups. This is, I have various geo-zone groups:
>
> 1: Europe (prefixes of Europe)
> 2: North America (prefixes of North America)
> ...
>
> Each clien
2011/6/6 Iñaki Baz Castillo :
> 2011/6/6 Henning Westerholt :
>> We use the userblacklist module for this, it works with the same
>> longest prefix match logic as cr.
>
> Ops, I missed that module :)
> I'll take a look to it. Thanks.
It's not valid for my custom case as I need a function returning
2011/6/6 Henning Westerholt :
> We use the userblacklist module for this, it works with the same
> longest prefix match logic as cr.
Ops, I missed that module :)
I'll take a look to it. Thanks.
--
Iñaki Baz Castillo
___
SIP Express Router (SER) and K
On Monday 06 June 2011, Iñaki Baz Castillo wrote:
> > Its works a bit differently, but this is similar to the logic that we
> > use. You've a bunch of specific prefixes with special routing, normal
> > country prefixes that you want to route differently and then a default
> > routing for the rest
>
2011/6/6 Henning Westerholt :
> if you just want to have the longest match on a prefix tree, this is what
> carrierroute was build for.
>
>> In case $rU = "99" I need to get "null", in case $rU =
>> "122323" I need to get "1".
>
> Its works a bit differently, but this is similar to the logi
On Monday 06 June 2011, Iñaki Baz Castillo wrote:
> [..]
> I want to match the RURI user, let's suppose $rU = "138787686223". In
> this case the above regexp matches groups 1 and 2, but since group 2
> matching is longest ("13" is longest than "1") I want to get value 2.
Hi Iñaki,
if you just wan
2011/6/6 Juha Heinanen :
>> Thanks. I don't need different priorities, I just need that, in case
>> of multiple matching (i.e. ^1 , ^10) the longest matching wins. Does
>> the dialplan module allow it?
>
> try by giving rule ^1 lower priority than ^10.
Yes, the trick will be:
priority = 20 - s
Iñaki Baz Castillo writes:
> Thanks. I don't need different priorities, I just need that, in case
> of multiple matching (i.e. ^1 , ^10) the longest matching wins. Does
> the dialplan module allow it?
try by giving rule ^1 lower priority than ^10.
-- juha
__
2011/6/6 Juha Heinanen :
> perhaps you could use dialplan module. it there is overlapping regular
> expressions, one is selected based on its priority.
Thanks. I don't need different priorities, I just need that, in case
of multiple matching (i.e. ^1 , ^10) the longest matching wins. Does
the di
Hello,
On 6/6/11 10:39 AM, Iñaki Baz Castillo wrote:
2011/6/6 Daniel-Constantin Mierla:
one option that comes in my mind is to break it in several if conditions,
matching one group at a time, written in the order of preferences.
The problem is that it would require perform N regular expression
Iñaki Baz Castillo writes:
> The problem is that it would require perform N regular expression
> matching and such expressions will be very long (all the country
> prefixes in the world). The main problem is that some groups would
> contain prefixes starting with, for example, 12, while in other g
2011/6/6 Daniel-Constantin Mierla :
> one option that comes in my mind is to break it in several if conditions,
> matching one group at a time, written in the order of preferences.
The problem is that it would require perform N regular expression
matching and such expressions will be very long (al
Hello,
On 6/6/11 10:25 AM, Iñaki Baz Castillo wrote:
Hi, I wonder how feasible is the folowing:
I have a regular expresion like:
REGEXP = "^((1|20)|(13|3|4)|(5|6))"
There are 3 matching groups:
1) (1|20)
2) (13|3|4)
3) (5|6)
I want to match the RURI user, let's suppose $rU =
Hi, I wonder how feasible is the folowing:
I have a regular expresion like:
REGEXP = "^((1|20)|(13|3|4)|(5|6))"
There are 3 matching groups:
1) (1|20)
2) (13|3|4)
3) (5|6)
I want to match the RURI user, let's suppose $rU = "138787686223". In
this case the above regexp matches groups
32 matches
Mail list logo