Hi Bogdan.<br><br>The problem still presists.<br><br>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.<br><br>#0  0xff198a08 in _ndoprnt () from /lib/libc.so.1                                         <br>
(gdb) bt                                                                                  <br>#0  0xff198a08 in _ndoprnt () from /lib/libc.so.1<br>#1  0xff19ca28 in vfprintf () from /lib/libc.so.1<br>#2  0x000265ac in dprint (format=0x1216d0 &quot;params (%p, %lu), called from %s: %s(%d)\n&quot;) at dprint.c:85<br>
#3  0x0009ff30 in qm_malloc (qm=0xfc800000, size=12, file=0x1207c8 &quot;usr_avp.c&quot;, func=0xf5858 &quot;add_avp&quot;, line=116) at mem/q_malloc.c:362<br>#4  0x0009b3b8 in add_avp (flags=0, name={n = 1, s = {s = 0x1 &lt;Address 0x1 out of bounds&gt;, len = 0}}, val=<br>
        {n = 1, s = {s = 0x1 &lt;Address 0x1 out of bounds&gt;, len = 0}}) at mem/shm_mem.h:148<br>#5  0x00052b88 in pv_set_avp (msg=0x16d000, param=0xff400ad0, op=50, val=0xff400b88) at pvar.c:1735<br>#6  0x000190ac in do_assign (msg=0x1a8618, a=0x1a1a70) at action.c:234<br>
#7  0x000198f4 in do_action (a=0x1a1a70, msg=0x1a8618) at action.c:1067<br>#8  0x0001d0fc in run_action_list (a=0x1a1a70, msg=0x1a8618) at action.c:139<br>#9  0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8618) at action.c:119<br>
#10 0xfebccd38 in do_routing (msg=0x1a8618, drg=0x5e8) at drouting.c:743<br>#11 0x0001af34 in do_action (a=0x1a1c60, msg=0x1a8618) at action.c:961<br>#12 0x0001d0fc in run_action_list (a=0x1a1c60, msg=0x1a8618) at action.c:139<br>
#13 0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8618) at action.c:119<br><br><br>Regards.<br><br>Sergio<br><br><div class="gmail_quote">On Wed, Mar 4, 2009 at 12:08 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Sergio,<br>
<br>
Please update and try again.<div class="im"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
<br>
Sergio Gutierrez wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hi Bogdan.<br>
<br>
I will test as you suggest.<br>
<br>
The error generated a core; the backtrace is as follows.<br>
<br>
#0  0xff1c6770 in _write () from /lib/libc.so.1<br>
#1  0xff1aa828 in _fwrite_unlocked () from /lib/libc.so.1<br>
#2  0xff198834 in _dowrite () from /lib/libc.so.1<br>
#3  0xff19b2c8 in _ndoprnt () from /lib/libc.so.1<br>
#4  0xff19ca28 in vfprintf () from /lib/libc.so.1<br>
#5  0x000265ac in dprint (format=0xfebda820 &quot;%s [%d] DBG:drouting:%s: ---&gt; fill = %s\n&quot;) at dprint.c:85<br>
#6  0xfebcff34 in ac_tm_fill (_atp=0x488, _tm=0x6efa) at ../../mem/../mem/../dprint.h:127<br>
#7  0xfebcffcc in ac_tm_set_time (_atp=0xff400f38, _t=1236107539) at dr_time.c:147<br>
#8  0xfebd3e94 in get_prefix (ptree=0xfc9a1530, prefix=0x15d1f8, rgid=1) at prefix_tree.c:62<br>
#9  0xfebcb8a4 in do_routing (msg=0x1a8ef0, drg=0x0) at drouting.c:729<br>
#10 0x0001af34 in do_action (a=0x1a1c60, msg=0x1a8ef0) at action.c:961<br>
#11 0x0001d0fc in run_action_list (a=0x1a1c60, msg=0x1a8ef0) at action.c:139<br>
#12 0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8ef0) at action.c:119<br>
#13 0xfebccd78 in do_routing (msg=0x1a8ef0, drg=0x5f4) at drouting.c:743<br>
#14 0x0001af34 in do_action (a=0x1a1c60, msg=0x1a8ef0) at action.c:961<br>
#15 0x0001d0fc in run_action_list (a=0x1a1c60, msg=0x1a8ef0) at action.c:139<br>
#16 0x0001d3d8 in run_top_route (a=0x1a1938, msg=0x1a8ef0) at action.c:119<br>
<br>
The last 4 lines are repeated a lot of times.<br>
<br>
Regards.<br>
<br>
Sergio.<br>
<br></div><div><div></div><div class="h5">
On Wed, Mar 4, 2009 at 4:45 AM, Bogdan-Andrei Iancu &lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> &lt;mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;&gt; wrote:<br>

<br>
    Hi Sergio,<br>
<br>
    First, do you get a core file or some indication about the crash?<br>
<br>
    Secondly, the do_routing() function is already populating the RURI<br>
    with the first destination, so no need to call use_next_gw() after it.<br>
<br>
    Regards,<br>
    Bogdan<br>
<br>
    Sergio Gutierrez wrote:<br>
<br>
        Hello to all members.<br>
<br>
        I am facing some problems trying to use drouting module.<br>
        In my case, OpenSIPS is going to work just as proxy, to<br>
        forward inbound calls to several IP/PBX which handle blocks of<br>
        numeration identified by ther DID&#39;s<br>
<br>
        My setup is following:<br>
<br>
<br>
        Opensips script:<br>
        ...<br>
<br>
        #Route to handle inbound routes<br>
        route[1] {<br>
               # for INVITEs enable some additional helper routes<br>
               if (is_method(&quot;INVITE&quot;)) {<br>
                       t_on_branch(&quot;2&quot;);<br>
                       t_on_reply(&quot;2&quot;);<br>
                       t_on_failure(&quot;1&quot;);<br>
               }<br>
<br>
               $avp(i:1)=1;<br>
               do_routing(&quot;$avp(i:1)&quot;);<br>
               xlog(&quot;L_ERR&quot;, &quot;Listo drouting\n\n\n\n&quot;);<br>
               if(use_next_gw())<br>
               {<br>
                       if (!t_relay()) {<br>
                               sl_reply_error();<br>
                       };<br>
                       exit;<br>
               }<br>
               else<br>
               {<br>
                       sl_send_reply(&quot;503&quot;, &quot;No destination available&quot;);<br>
                       exit;<br>
               };<br>
        }<br>
<br>
<br>
        - Drouting tables:<br>
        mysql&gt; select * from dr_rules;<br>
        +--------+---------+--------+-----------------+----------+---------+--------+--------------------+<br>
        | ruleid | groupid | prefix | timerec         | priority |<br>
        routeid | gwlist | description        |<br>
        +--------+---------+--------+-----------------+----------+---------+--------+--------------------+<br>
        |      1 | 1       | 403000 | 20090101T000000 |        0 |              1 | 1      | Test Rule |<br>
        +--------+---------+--------+-----------------+----------+---------+--------+--------------------+<br>
        1 row in set (0.00 sec)<br>
<br>
        mysql&gt; select * from dr_gateways;<br>
        +------+------+----------------+-------+------------+-------+-------------------+<br>
        | gwid | type | address        | strip | pri_prefix | attrs |<br>
        description       |<br>
        +------+------+----------------+-------+------------+-------+-------------------+<br>
        |    1 |   10 | 192.168.10.10 |     0 |            | NULL  |<br>
        Test GW |<br>
        +------+------+----------------+-------+------------+-------+-------------------+<br>
<br>
<br>
        Now, when I dial a call, I got the following output in log:<br>
<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
        Mar  4 00:05:17 [27497] DBG:drouting:do_routing: using dr group 1<br>
        Mar  4 00:05:17 [27497] DBG:drouting:internal_check_rt: found<br>
        rgid 1 (rule list fc9a1608)<br>
        Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill =<br>
        Wed Mar  4 00:05:17 2009<br>
<br>
<br>
        This log appears until OpenSIPS crashes.<br>
<br>
        Thanks in advance for all your help.<br>
<br>
        --         Sergio.<br>
        ------------------------------------------------------------------------<br>
<br>
        _______________________________________________<br>
        Devel mailing list<br></div></div>
        <a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a> &lt;mailto:<a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a>&gt;<div class="im"><br>
        <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
         <br>
<br>
<br>
<br>
<br>
-- <br>
Sergio Gutiérrez<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Sergio Gutiérrez<br>