[SR-Users] Using =~ to get the group identifier with longest match

Iñaki Baz Castillo ibc at aliax.net
Mon Jun 6 15:29:14 CEST 2011


2011/6/6 Iñaki Baz Castillo <ibc at aliax.net>:
> 2011/6/6 Daniel-Constantine Mierla <miconda at gmail.com>:
>> 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's take a look to it.

Hi Daniel, sounds really specific for which I need :)
Let me ask some doubts:

- 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
  Would that AVP be filled with the content of the "value" column for
the matched row?

- Which is the meaning of "payload" here?:
    http://kamailio.org/docs/modules/3.1.x/modules/mtree.html#id2807543

- What does mt_match() return in case there is match? and when there is not?


Thanks a lot.

-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list