Hi Daniel<br><br>thanks for giving a more detailed information.  About the last point, it sounds really interesting; as a matter of fact it&#39;s exactly what I&#39;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.<br>
<br>Regards<br><br>Javi<br><br><div class="gmail_quote">On Mon, Aug 15, 2011 at 5:55 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    some more comments/confirmations:<div class="im"><br>
    <br>
    On 8/12/11 11:31 PM, Javier Gallart wrote:
    <blockquote type="cite">Hi Juha<br>
      <br>
      based on my experience with the mtree module:<br>
      <br>
      -mt_match() will match the longest prefix in the tree, in your
      case 00358<br>
    </blockquote></div>
    * yes, longest prefix is matched<div class="im"><br>
    <br>
    <blockquote type="cite">-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 <br>
    </blockquote>
    <br></div>
    * indeed, duplicated are ignored in such mode, otherwise loading the
    records from db will throw error in duplicate prefixes.<div class="im"><br>
    <br>
    <blockquote type="cite">
      -I don&#39;t know about mt_tree_type...(never needed to test it)<br>
    </blockquote>
    <br></div>
    * 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.<br>
    <br>
    There is actually a second mode, 1, intended to have the data as two
    integers separated by colon, like &#39;weight:value&#39; iirc. The matching
    of any part of the prefix that has data associated with will add
    &#39;value&#39; into a list of avps ordered by &#39;weight&#39;. 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.<br>
    <br>
    Other types of trees may be added in the future in order to optimize
    the data in the nodes for runtime usage.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote type="cite"><div class="im"><br>
      Hope it helps<br>
      <br>
      Regards<br>
      <br>
      Javi<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          ------------------------------<br>
          <br>
          Message: 2<br>
          Date: Fri, 12 Aug 2011 10:10:29 +0300<br>
          From: Juha Heinanen &lt;<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>&gt;<br>
          Subject: [SR-Users] mtree question<br>
          To: <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
          Message-ID: &lt;<a href="mailto:20036.53733.20652.518606@sip.test.fi" target="_blank">20036.53733.20652.518606@sip.test.fi</a>&gt;<br>
          Content-Type: text/plain; charset=us-ascii<br>
          <br>
          after reading mtree readme, it is not clear to me if
          mt_match() matches<br>
          to longest or any matching prefix in the three.  for example,
          if i have<br>
          tree with prefixes 00 and 00358 and string to be matched is<br>
          0035892345670, will mt_match() set pv to value associated with
          00 or<br>
          00358?  also, if mt_ignore_duplicates is set, will 00358 be
          considered<br>
          as duplicate of 00 or just prefixes that are exactly same.
           finally,<br>
          what are possible mt_tree_type values and what types they
          stand for?<br>
          <br>
          -- juha<br>
          <br>
          <br>
          <br>
          ------------------------------<br>
          <br>
          _______________________________________________<br>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<div class="im"><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
</div><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
  </font></div>

</blockquote></div><br>