<div dir="ltr">Hello Daniel,<div><br></div><div>indeed dialplan could solve this. But i dont follow that because i dont want to manipulate the $rU part.</div><div>So for my usecase as siprouter to route "comes from X goes to Y, comes from Z goes to A" i use permissions module (comes from) and dispatcher (goes to) .</div><div><br></div><div>Thanks for the drouting statement. Its okay. I was trapped by the db-field. I try it and saw later that it was not the module i need.</div><div><br></div><div>Kind Regards</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-16 15:57 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hello,<br>
    </p><span class="">
    <br>
    <div class="m_-6520165951179528340moz-cite-prefix">On 16.11.17 10:40, Karsten Horsmann
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi List,
        <div><br>
        </div>
        <div>i answer myself if someone search for the same problem and
          ends with no solution.</div>
        <div>Short answer to "drouting" based on "alphanumeric" prefix
          question is - NO.</div>
        <div>Only numbers are allowed, maybe a + sign, i dont check
          that.</div>
      </div>
    </blockquote></span>
    answered by Dmitri in another response, the chars allowed in prefix
    are the digits, +, * and #.<br>
    <br>
    Anyhow, even making it configurable, if you want to allow all the
    alphanumeric chars in the prefix, the indexing of the prefixes
    becomes inefficient, at least from memory point of view. The module
    uses tree indexing for prefixes and each node is composed by so many
    items as possible chars in the prefix, so the node size is going to
    be big if you have lot of possible chars in it.<br>
    <br>
    The usual solution in this case is to have two layers of indexing.
    Use htable or dialplan modules to map between an alphanumeric value
    to a numerical id and then use that id for matching in drouting (or
    other tree indexing modules such as mtree).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote type="cite"><span class="">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-11-13 14:38 GMT+01:00 Karsten
          Horsmann <span dir="ltr"><<a href="mailto:khorsmann@gmail.com" target="_blank">khorsmann@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr"><span style="font-size:12.8px">Hello List,</span>
              <div style="font-size:12.8px"><br>
              </div>
              <div style="font-size:12.8px"><span style="font-size:12.8px">i use kamailio-5.0.4 and i
                  experiment with the drouting module with mysql-db.</span></div>
              <div style="font-size:12.8px"><span style="font-size:12.8px"><br>
                </span></div>
              <div style="font-size:12.8px">I try to route with
                "alphanumeric" stuff - like 'tetris' in
                <a class="m_-6520165951179528340moz-txt-link-freetext">sip://tetris@mytest.example</a> </div>
              <div style="font-size:12.8px"><br>
              </div>
              <div>
                <div><span style="font-size:12.8px"><a href="https://www.kamailio.org/docs/db-tables/kamailio-db-devel.html#idp31352844" target="_blank">https://www.kamailio.org/docs/<wbr>db-tables/kamailio-db-devel.ht<wbr>ml#idp31352844</a></span></div>
                <div><span style="font-size:12.8px">The DB-Field is an
                    64 string like route-id. In dr_rules.route-id i can
                    use "named-routes"</span></div>
                <div><span style="font-size:12.8px">if i leave the
                    prefix empty or i fill in only numbers.</span></div>
                <div><span style="font-size:12.8px"><br>
                  </span></div>
                <div><span style="font-size:12.8px">With strings i got
                    this error:</span></div>
                <div><span style="font-size:12.8px"><br>
                  </span></div>
                <div><span style="font-size:12.8px">ERROR: drouting
                    [dr_load.c:555]: dr_load_routing_info(): failed to
                    add rule id 4 -> skipping</span></div>
                <div><span style="font-size:12.8px"><br>
                  </span></div>
                <div><span style="font-size:12.8px">SQL Result for
                    rule-id 4:</span></div>
                <div><span style="font-size:12.8px"># dr_rules</span></div>
                <div><span style="font-size:12.8px"># ruleid, groupid,
                    prefix, timerec, priority, routeid, gwlist,
                    description</span></div>
                <div><span style="font-size:12.8px">'4', '9000',
                    'tetris', '', '0', 'tetris', '4', 'testroute'</span></div>
                <div style="font-size:12.8px"><br>
                </div>
              </div>
              <div style="font-size:12.8px">Is drouting only for
                "number-routing"?</div>
              <span class="m_-6520165951179528340HOEnZb"><font color="#888888">
                  <div><br>
                  </div>
                  -- <br>
                  <div class="m_-6520165951179528340m_1837131656195144466gmail_signature">Kind
                    Regards<br>
                    *Karsten Horsmann*<br>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="m_-6520165951179528340gmail_signature" data-smartmail="gmail_signature">Mit
          freundlichen Grüßen<br>
          *Karsten Horsmann*<br>
        </div>
      </div>
      <br>
      <fieldset class="m_-6520165951179528340mimeAttachmentHeader"></fieldset>
      <br>
      </span><span class=""><pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_-6520165951179528340moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_-6520165951179528340moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>
</pre>
    </span></blockquote><span class="">
    <br>
    <pre class="m_-6520165951179528340moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_-6520165951179528340moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-6520165951179528340moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - <a class="m_-6520165951179528340moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_-6520165951179528340moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </span></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Mit freundlichen Grüßen<br>*Karsten Horsmann*<br></div>
</div>