2011/6/6 Daniel-Constantin Mierla <miconda(a)gmail.com>om>:
- 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, not restricted to AVP --
see the example in the readme where it is a $var()
Would that AVP be filled with the content of the "value" column for
the matched row?
Exactly
when it is 0, will return the value as string in varibale. The goal is to
parse in cache the value into some internal structure. Right now there is
also the option of 1, expecting some 'id=value', both being integers, with
the purpose of returning all matches for the prefix ordered by value. It
hasn't be tested extensively and thus not documented - initially work was on
hold to get first xavps so the structure can be returned nicely to config,
then lack of time kept it posponed.
- What does mt_match() return in case there is match? and when there is
not?
True and false.
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 no way of defining
different models, is it?
Thanks a lot.
--
Iñaki Baz Castillo
<ibc(a)aliax.net>