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 class="gmail_quote">On Wed, Mar 4, 2009 at 4:45 AM, 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>
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 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>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
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 forward inbound calls to several IP/PBX which handle blocks of 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 | 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 | description       |<br>
+------+------+----------------+-------+------------+-------+-------------------+<br>
|    1 |   10 | 192.168.10.10 |     0 |            | NULL  | 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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 rgid 1 (rule list fc9a1608)<br>
Mar  4 00:05:17 [27497] DBG:drouting:ac_tm_fill: ---&gt; fill = 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>
-- <br>
Sergio.<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a><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>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Sergio Gutiérrez<br>