Crash when using drouting module.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash when using drouting module.

Sergio Gutierrez
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Crash when using drouting module.

Bogdan-Andrei Iancu
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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>  


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Crash when using drouting module.

Sergio Gutierrez
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 <[hidden email]> 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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
 




--
Sergio Gutiérrez

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Crash when using drouting module.

Bogdan-Andrei Iancu
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
> <[hidden email] <mailto:[hidden email]>> 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
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>          
>
>
>
>
>
> --
> Sergio Gutiérrez


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Crash when using drouting module.

Sergio Gutierrez
Hi Bogdan.

The problem still presists.

This is the backtrace; I modified the code for not calling next_gw after do_routing, although it looks like it is not executing after do_routing.

#0  0xff198a08 in _ndoprnt () from /lib/libc.so.1                                        
(gdb) bt                                                                                 
#0  0xff198a08 in _ndoprnt () from /lib/libc.so.1
#1  0xff19ca28 in vfprintf () from /lib/libc.so.1
#2  0x000265ac in dprint (format=0x1216d0 "params (%p, %lu), called from %s: %s(%d)\n") at dprint.c:85
#3  0x0009ff30 in qm_malloc (qm=0xfc800000, size=12, file=0x1207c8 "usr_avp.c", func=0xf5858 "add_avp", line=116) at mem/q_malloc.c:362
#4  0x0009b3b8 in add_avp (flags=0, name={n = 1, s = {s = 0x1 <Address 0x1 out of bounds>, len = 0}}, val=
        {n = 1, s = {s = 0x1 <Address 0x1 out of bounds>, len = 0}}) at mem/shm_mem.h:148
#5  0x00052b88 in pv_set_avp (msg=0x16d000, param=0xff400ad0, op=50, val=0xff400b88) at pvar.c:1735
#6  0x000190ac in do_assign (msg=0x1a8618, a=0x1a1a70) at action.c:234
#7  0x000198f4 in do_action (a=0x1a1a70, msg=0x1a8618) at action.c:1067
#8  0x0001d0fc in run_action_list (a=0x1a1a70, msg=0x1a8618) at action.c:139
#9  0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8618) at action.c:119
#10 0xfebccd38 in do_routing (msg=0x1a8618, drg=0x5e8) at drouting.c:743
#11 0x0001af34 in do_action (a=0x1a1c60, msg=0x1a8618) at action.c:961
#12 0x0001d0fc in run_action_list (a=0x1a1c60, msg=0x1a8618) at action.c:139
#13 0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8618) at action.c:119


Regards.

Sergio

On Wed, Mar 4, 2009 at 12:08 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
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 <[hidden email] <mailto:[hidden email]>> 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
       [hidden email] <mailto:[hidden email]>

       http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
       




--
Sergio Gutiérrez




--
Sergio Gutiérrez

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel