<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    some more comments/confirmations:<br>
    <br>
    On 8/12/11 11:31 PM, Javier Gallart wrote:
    <blockquote
cite="mid:CACviLGa7bn6PizMCxgQLY8-uM29PnnC666NjU1vY2Nco5=uing@mail.gmail.com"
      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>
    * yes, longest prefix is matched<br>
    <br>
    <blockquote
cite="mid:CACviLGa7bn6PizMCxgQLY8-uM29PnnC666NjU1vY2Nco5=uing@mail.gmail.com"
      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>
    * indeed, duplicated are ignored in such mode, otherwise loading the
    records from db will throw error in duplicate prefixes.<br>
    <br>
    <blockquote
cite="mid:CACviLGa7bn6PizMCxgQLY8-uM29PnnC666NjU1vY2Nco5=uing@mail.gmail.com"
      type="cite">
      -I don't know about mt_tree_type...(never needed to test it)<br>
    </blockquote>
    <br>
    * 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 '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.<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
cite="mid:CACviLGa7bn6PizMCxgQLY8-uM29PnnC666NjU1vY2Nco5=uing@mail.gmail.com"
      type="cite"><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 moz-do-not-send="true"
            href="mailto:jh@tutpro.com">jh@tutpro.com</a>&gt;<br>
          Subject: [SR-Users] mtree question<br>
          To: <a moz-do-not-send="true"
            href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
          Message-ID: &lt;<a moz-do-not-send="true"
            href="mailto:20036.53733.20652.518606@sip.test.fi">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. &nbsp;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? &nbsp;also, if mt_ignore_duplicates is set, will 00358 be
          considered<br>
          as duplicate of 00 or just prefixes that are exactly same.
          &nbsp;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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>