<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,<br>
</p>
<br>
<div class="moz-cite-prefix">On 16.11.17 10:40, Karsten Horsmann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFArqsZQ2zfX352+QEOSxLNNH+K9G8qkPv9MBBt4MyLNpDUh=g@mail.gmail.com">
<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>
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"
cite="mid:CAFArqsZQ2zfX352+QEOSxLNNH+K9G8qkPv9MBBt4MyLNpDUh=g@mail.gmail.com">
<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"
moz-do-not-send="true">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="moz-txt-link-freetext" href="sip://tetris@mytest.example">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" moz-do-not-send="true">https://www.kamailio.org/docs/<wbr>db-tables/kamailio-db-devel.<wbr>html#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="HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
<div class="m_1837131656195144466gmail_signature">Kind
Regards<br>
*Karsten Horsmann*<br>
</div>
</font></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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.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-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>