[SR-Users] dr_load_routing_info(): failed to add rule id 4 -> skipping

Daniel-Constantin Mierla miconda at gmail.com
Thu Nov 16 18:52:14 CET 2017


Hello,


On 16.11.17 17:35, Karsten Horsmann wrote:
> Hello Daniel,
>
> indeed dialplan could solve this. But i dont follow that because i
> dont want to manipulate the $rU part.

if you do not set subst_exp and repl_exp, then no change is done.

To make that feature more visible, the upcoming 5.1 has a dedicated
function just to do the match:

  -
https://www.kamailio.org/docs/modules/devel/modules/dialplan.html#dialplan.p.dp_match

Cheers,
Daniel

> 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) .
>
> 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.
>
> Kind Regards
>
> 2017-11-16 15:57 GMT+01:00 Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>>:
>
>     Hello,
>
>
>     On 16.11.17 10:40, Karsten Horsmann wrote:
>>     Hi List,
>>
>>     i answer myself if someone search for the same problem and ends
>>     with no solution.
>>     Short answer to "drouting" based on "alphanumeric" prefix
>>     question is - NO.
>>     Only numbers are allowed, maybe a + sign, i dont check that.
>     answered by Dmitri in another response, the chars allowed in
>     prefix are the digits, +, * and #.
>
>     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.
>
>     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).
>
>     Cheers,
>     Daniel
>
>>
>>     2017-11-13 14:38 GMT+01:00 Karsten Horsmann <khorsmann at gmail.com
>>     <mailto:khorsmann at gmail.com>>:
>>
>>         Hello List,
>>
>>         i use kamailio-5.0.4 and i experiment with the drouting
>>         module with mysql-db.
>>
>>         I try to route with "alphanumeric" stuff - like 'tetris' in
>>         sip://tetris@mytest.example 
>>
>>         https://www.kamailio.org/docs/db-tables/kamailio-db-devel.html#idp31352844
>>         <https://www.kamailio.org/docs/db-tables/kamailio-db-devel.html#idp31352844>
>>         The DB-Field is an 64 string like route-id. In
>>         dr_rules.route-id i can use "named-routes"
>>         if i leave the prefix empty or i fill in only numbers.
>>
>>         With strings i got this error:
>>
>>         ERROR: drouting [dr_load.c:555]: dr_load_routing_info():
>>         failed to add rule id 4 -> skipping
>>
>>         SQL Result for rule-id 4:
>>         # dr_rules
>>         # ruleid, groupid, prefix, timerec, priority, routeid,
>>         gwlist, description
>>         '4', '9000', 'tetris', '', '0', 'tetris', '4', 'testroute'
>>
>>         Is drouting only for "number-routing"?
>>
>>         -- 
>>         Kind Regards
>>         *Karsten Horsmann*
>>
>>
>>
>>
>>     -- 
>>     Mit freundlichen Grüßen
>>     *Karsten Horsmann*
>>
>>
>>     _______________________________________________
>>     Kamailio (SER) - Users Mailing List
>>     sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
>>     https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>     <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>
>     -- 
>     Daniel-Constantin Mierla
>     www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>     Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com <http://www.asipto.com>
>     Kamailio World Conference - www.kamailioworld.com <http://www.kamailioworld.com>
>
>
>
>
> -- 
> Mit freundlichen Grüßen
> *Karsten Horsmann*

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171116/0d8a98a0/attachment.html>


More information about the sr-users mailing list