[OpenSIPS-Devel] Crash when using drouting module.

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Mar 4 10:45:12 CET 2009


Hi Sergio,

First, do you get a core file or some indication about the crash?

Secondly, the do_routing() function is already populating the RURI with 
the first destination, so no need to call use_next_gw() after it.

Regards,
Bogdan

Sergio Gutierrez wrote:
> Hello to all members.
>
> I am facing some problems trying to use drouting module.
> In my case, OpenSIPS is going to work just as proxy, to forward 
> inbound calls to several IP/PBX which handle blocks of numeration 
> identified by ther DID's
>
> My setup is following:
>
>
> Opensips script:
> ...
>
> #Route to handle inbound routes
> route[1] {
>         # for INVITEs enable some additional helper routes
>         if (is_method("INVITE")) {
>                 t_on_branch("2");
>                 t_on_reply("2");
>                 t_on_failure("1");
>         }
>
>         $avp(i:1)=1;
>         do_routing("$avp(i:1)");
>         xlog("L_ERR", "Listo drouting\n\n\n\n");
>         if(use_next_gw())
>         {
>                 if (!t_relay()) {
>                         sl_reply_error();
>                 };
>                 exit;
>         }
>         else
>         {
>                 sl_send_reply("503", "No destination available");
>                 exit;
>         };
> }
>
>
> - Drouting tables:
> mysql> select * from dr_rules;
> +--------+---------+--------+-----------------+----------+---------+--------+--------------------+
> | ruleid | groupid | prefix | timerec         | priority | routeid | 
> gwlist | description        |
> +--------+---------+--------+-----------------+----------+---------+--------+--------------------+
> |      1 | 1       | 403000 | 20090101T000000 |        0 |       1 | 
> 1      | Test Rule |
> +--------+---------+--------+-----------------+----------+---------+--------+--------------------+
> 1 row in set (0.00 sec)
>
> mysql> select * from dr_gateways;
> +------+------+----------------+-------+------------+-------+-------------------+
> | gwid | type | address        | strip | pri_prefix | attrs | 
> description       |
> +------+------+----------------+-------+------------+-------+-------------------+
> |    1 |   10 | 192.168.10.10 |     0 |            | NULL  | Test GW |
> +------+------+----------------+-------+------------+-------+-------------------+
>
>
> Now, when I dial a call, I got the following output in log:
>
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
> Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1
> Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found rgid 1 
> (rule list fc9a1608)
> Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---> fill = Wed Mar  
> 4 00:05:17 2009
>
>
> This log appears until OpenSIPS crashes.
>
> Thanks in advance for all your help.
>
> -- 
> Sergio.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>   




More information about the Devel mailing list