hello,
I wonder if anyone could help me understanding how can I use this module in a scenario where multiple mtrees are defined behind the same database table.
I can't guess how to speficy to 'mt_match' the mtree I want to match against, since the 'mtree' module parameter defines a specific memory tree based on a specific table, but not based on a specific 'tname' value.
Any help is apreciated,
Thanks in advance.
2011/6/13 jose luis millan doctore96@gmail.com:
I wonder if anyone could help me understanding how can I use this module in a scenario where multiple mtrees are defined behind the same database table.
I can't guess how to speficy to 'mt_match' the mtree I want to match against, since the 'mtree' module parameter defines a specific memory tree based on a specific table, but not based on a specific 'tname' value.
Indeed we have a table with these colums:
- prefix: string to identify number destination. This is the regex column. - id_zone: integer, points to other table. This is the value column. - scope: integer, can be 0 or 1.
So wee need two instances of mtree: 1) those rows with scope 0. 2) those rows with scope 1.
Is it possible with current mtree module? or maybe we'd do better by creating two views of the table (one for entries with scope 0 and another for entries with scope 1)?
Thanks a lot.
Hi,
In order to have multiple trees in a single table, function 'mt_match' has to be called with the desired 'tname' value as the first argument.
So, the first parameter in the 'mt_match' function refers to a value of 'tname' in case this parameter is used, or to an explicitly created mtree (defined via the mtree parámeter).
Thanks
On Tue, Jun 14, 2011 at 2:27 PM, Iñaki Baz Castillo ibc@aliax.net wrote:
2011/6/13 jose luis millan doctore96@gmail.com:
I wonder if anyone could help me understanding how can I use this module in a scenario where multiple mtrees are defined behind the same database table.
I can't guess how to speficy to 'mt_match' the mtree I want to match against, since the 'mtree' module parameter defines a specific memory tree based on a specific table, but not based on a specific 'tname' value.
Indeed we have a table with these colums:
- prefix: string to identify number destination. This is the regex column.
- id_zone: integer, points to other table. This is the value column.
- scope: integer, can be 0 or 1.
So wee need two instances of mtree:
- those rows with scope 0.
- those rows with scope 1.
Is it possible with current mtree module? or maybe we'd do better by creating two views of the table (one for entries with scope 0 and another for entries with scope 1)?
Thanks a lot.
-- Iñaki Baz Castillo ibc@aliax.net
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users