Hi Daniel thanks for giving a more detailed information. About the last point, it sounds really interesting; as a matter of fact it's exactly what I'm doing manually right now (we get a bunch of k,v pairs in each entry in the mtree and right now I parse them manually with loops and or transformations...)... Being able to use avp (o xavp) would be a nice addition to the modue.
Regards Javi On Mon, Aug 15, 2011 at 5:55 PM, Daniel-Constantin Mierla <mico...@gmail.com > wrote: > Hello, > > some more comments/confirmations: > > > On 8/12/11 11:31 PM, Javier Gallart wrote: > > Hi Juha > > based on my experience with the mtree module: > > -mt_match() will match the longest prefix in the tree, in your case 00358 > > * yes, longest prefix is matched > > > -mt_ignore_duplicates makes sense when loading the data in the DB to the > memory. There could be duplicate entries in the db and with that directive > you tell kamailio how to handle that situation > > > * indeed, duplicated are ignored in such mode, otherwise loading the > records from db will throw error in duplicate prefixes. > > > -I don't know about mt_tree_type...(never needed to test it) > > > * this is intended to control the behavior of the tree data and matching > mode. The default one is 0, match longest prefix and the associated data > with the prefix is a string. This is complete implementation. > > There is actually a second mode, 1, intended to have the data as two > integers separated by colon, like 'weight:value' iirc. The matching of any > part of the prefix that has data associated with will add 'value' into a > list of avps ordered by 'weight'. Since it was not really tested and the > implementation might not be full -- due to lack of time at that moment and > plans to migrate to use xavp for proper internal representation -- it was > left undocumented. I should review this mode soon. > > Other types of trees may be added in the future in order to optimize the > data in the nodes for runtime usage. > > Cheers, > Daniel > > > Hope it helps > > Regards > > Javi > >> ------------------------------ >> >> Message: 2 >> Date: Fri, 12 Aug 2011 10:10:29 +0300 >> From: Juha Heinanen <j...@tutpro.com> >> Subject: [SR-Users] mtree question >> To: sr-users@lists.sip-router.org >> Message-ID: <20036.53733.20652.518...@sip.test.fi> >> Content-Type: text/plain; charset=us-ascii >> >> after reading mtree readme, it is not clear to me if mt_match() matches >> to longest or any matching prefix in the three. for example, if i have >> tree with prefixes 00 and 00358 and string to be matched is >> 0035892345670, will mt_match() set pv to value associated with 00 or >> 00358? also, if mt_ignore_duplicates is set, will 00358 be considered >> as duplicate of 00 or just prefixes that are exactly same. finally, >> what are possible mt_tree_type values and what types they stand for? >> >> -- juha >> >> >> >> ------------------------------ >> >> _______________________________________________ >> > > > _______________________________________________ > 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 > > > -- > Daniel-Constantin Mierla -- http://www.asipto.com > Kamailio Advanced Training, Oct 10-13, Berlin: > http://asipto.com/u/kathttp://linkedin.com/in/miconda -- > http://twitter.com/miconda > >
_______________________________________________ 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