<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 7/7/11 1:42 PM, alex pappas wrote:
    <blockquote
cite="mid:CA+bbrB8LdmV3HZ=9xkQUXdDWxLQ2+=xcz3_Cm1bAoj+O8dNP3w@mail.gmail.com"
      type="cite">Dear all,
      <div><br>
      </div>
      <div>I have these 3 entries in the dialplan:</div>
      <div><br>
      </div>
      <div>dpid &nbsp; pr &nbsp; match_exp &nbsp; &nbsp; &nbsp;attr</div>
      <div><br>
      </div>
      <div>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^38.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_A</div>
      <div>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^3802.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_B</div>
      <div>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^3806.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_C</div>
      <div><br>
      </div>
      <div>with the fifo command :</div>
      <div><br>
      </div>
      <div>
        <div><b>kamctl fifo dp_translate 2 3806328881</b></div>
        <div>Output::&nbsp;</div>
        <div>ATTRIBUTES::<b>&nbsp;porvider_A</b></div>
      </div>
      <div><br>
      </div>
      <div>I would expect that the dialplan module would choose the
        third choice which is the correct one for this call.</div>
      <div><br>
      </div>
      <div>From the dialplan documentation i understand that the
        priority is needed when the prefixes are overlaping in terms of
        they are the same but with different attrs like :</div>
      <div>
        <div>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^38.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_A</div>
        <div>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^3802.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_B</div>
        <div><b>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^3806.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_C</b></div>
      </div>
      <div><b>2 &nbsp; &nbsp; &nbsp; 50 &nbsp; ^3806.+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;porvider_D</b></div>
      <div><b><br>
        </b></div>
      <div>here i understand that I should use priorities.</div>
      <div><br>
      </div>
      <div>Does anyone knnows how this works ??</div>
    </blockquote>
    the overlapping applies to matching expressions, not like string
    comparison of them. So, indeed, in this case ^38.+ will match first
    and will be selected. You have to set lower priority for it.<br>
    <br>
    In other words, the module goes one expression by one, order by
    priority, until it has a match. At that time it returns. It does not
    go to all expressions and try to find the longest match.<br>
    <br>
    Cheers,<br>
    Daniel<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>