[OpenSIPS-Users] DRouting - routeid, prefix questions

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Oct 5 10:08:30 CEST 2010


Hi Maciej,

Maciej Bylica wrote:
> Hello,
>
> I am playing around with DRouting module plus my opensips 1.6.3-notls.
> The wiki is quite nice written, but i have some doubts here.
> My config is pretty simple.
>
> if ($rU=~"^xxxxxxxx"){
> ...
> ...
> route(1) }
>
> if ($rU=~"^yyyyyyyy"){
> ...
> ...
> route(2) }
> ...
>
> route[1] {
>         if (!do_routing("1")) {
>                 sl_reply_error();
>                 exit;
>         };
>         t_on_failure("10");
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
>         exit;
> }
>
> route[2] {
>         if (!do_routing("2")) {
>                 sl_reply_error();
>                 exit;
>         };
>         t_on_failure("11");
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
>         exit;
> }
> and it works fine, but...
> 1) there is routeid column associated with dr_rules table. Frankly i
> have no idea what's that and how to use it?
>   
see 
http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#GEN-DB-DR-RULES
> >From time to time I am receiving
> WARNING:drouting:dr_load_routing_info: route <120> does not exist
> 2) prefix is very limitted, because in many cases there is a need to
> use regex to simplify all routes selection. Is it possible to use it
> here?
>   
Dynamic Routing module is designed & used for prefix based routing and 
not for regexp based routing. The module uses internal prefix trees for 
fast prefix lookup - something like this is not possible with regexp.
It is not a limitation, it is the usage case it was built for - if you 
need regexp based ops, see the dialplan module.

> 3) prefix is char(64), could I use * char there?
>   
only numerical prefixes are accepted . If you want to define a rule to 
match all prefixes (wildcard), simpy use a an empty string prefix.

Regards,
Bogdan
> Thanks in advance,
> Maciej.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro




More information about the Users mailing list