[OpenSIPS-Devel] Crash when using drouting module.
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Wed Mar 4 18:08:51 CET 2009
Hi Sergio,
Please update and try again.
Regards,
Bogdan
Sergio Gutierrez wrote:
> Hi Bogdan.
>
> I will test as you suggest.
>
> The error generated a core; the backtrace is as follows.
>
> #0 0xff1c6770 in _write () from /lib/libc.so.1
> #1 0xff1aa828 in _fwrite_unlocked () from /lib/libc.so.1
> #2 0xff198834 in _dowrite () from /lib/libc.so.1
> #3 0xff19b2c8 in _ndoprnt () from /lib/libc.so.1
> #4 0xff19ca28 in vfprintf () from /lib/libc.so.1
> #5 0x000265ac in dprint (format=0xfebda820 "%s [%d] DBG:drouting:%s:
> ---> fill = %s\n") at dprint.c:85
> #6 0xfebcff34 in ac_tm_fill (_atp=0x488, _tm=0x6efa) at
> ../../mem/../mem/../dprint.h:127
> #7 0xfebcffcc in ac_tm_set_time (_atp=0xff400f38, _t=1236107539) at
> dr_time.c:147
> #8 0xfebd3e94 in get_prefix (ptree=0xfc9a1530, prefix=0x15d1f8,
> rgid=1) at prefix_tree.c:62
> #9 0xfebcb8a4 in do_routing (msg=0x1a8ef0, drg=0x0) at drouting.c:729
> #10 0x0001af34 in do_action (a=0x1a1c60, msg=0x1a8ef0) at action.c:961
> #11 0x0001d0fc in run_action_list (a=0x1a1c60, msg=0x1a8ef0) at
> action.c:139
> #12 0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8ef0) at action.c:119
> #13 0xfebccd78 in do_routing (msg=0x1a8ef0, drg=0x5f4) at drouting.c:743
> #14 0x0001af34 in do_action (a=0x1a1c60, msg=0x1a8ef0) at action.c:961
> #15 0x0001d0fc in run_action_list (a=0x1a1c60, msg=0x1a8ef0) at
> action.c:139
> #16 0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8ef0) at action.c:119
>
> The last 4 lines are repeated a lot of times.
>
> Regards.
>
> Sergio.
>
> On Wed, Mar 4, 2009 at 4:45 AM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
> 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 <mailto:Devel at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>
>
>
>
>
> --
> Sergio Gutiérrez
More information about the Devel
mailing list