2011/6/16 Javier Gallart jgallartm@gmail.com:
not sure what you want to accomplish, but in case it might help this is how we use the mtree module. Our 3 columns are: partition, prefix, route Partition is just a name that defines a group, this is done inside the script before calling mt_match (via a table lookup for instance). Let's say if a call comes from ip x we assign it to partition 400; if it comes from ip y we assign it to partition 401. Each partition is a different tree. Consider these entries in the tree table: 400,123456,A 401,123456,A 401,1234567,B
Let's say both x and y send a call with $rU 1234567; mt_match will return A for ip x, and B for ip y; we use that information for taking further routing decisions. A common situation might be: x has a unique route for a whole country while y has that entry but has more defined routes for more specific area codes inside that country. The column route could also be for instance the setid of a group of gw's for the dispatcher module, etc...
Hi Javier, indeed this is very similar to the usage we give now to mtree, by using different "partitions" of the table. We have it already working (as Jose Luis told in his last mail in this thread) :)
Thanks a lot.