<div dir="ltr"><div>Hello, <br></div><div>should I open a bug for this on github or how do I need to proceed ?</div><div><br></div><div>BR, <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op di 31 mrt. 2020 om 19:23 schreef johan <<a href="mailto:johan@democon.be">johan@democon.be</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi guys when I call do_routing in opensips 3.1. I have :<br>
<br>
Mar 31 16:52:25 hendrix /data/opensips/sbin/opensips[20886]: <br>
callid=hxj~vmgW54: route[drouting]: let's find the group for drouting <br>
based on fU 33757936420<br>
Mar 31 16:52:25 hendrix /data/opensips/sbin/opensips[20886]: <br>
DBG:core:pv_printf: final buffer length 102<br>
Mar 31 16:52:25 hendrix /data/opensips/sbin/opensips[20886]: <br>
callid=hxj~vmgW54: route[drouting]: fU 33757936420 does not start with <br>
32460, we put var(group) 1 to 1<br>
<br>
Mar 31 16:52:25 hendrix /data/opensips/sbin/opensips[20886]: <br>
DBG:drouting:do_routing: empty routing table<br>
Mar 31 16:52:25 hendrix /data/opensips/sbin/opensips[20886]: <br>
DBG:core:pv_printf: final buffer length 51<br>
Mar 31 16:52:25 hendrix /data/opensips/sbin/opensips[20886]: <br>
callid=hxj~vmgW54: route[drouting]: drouting failed<br>
<br>
<br>
script part :<br>
<br>
xlog("callid=$ci: route[drouting]: let's find the group for <br>
drouting based on fU $fU");<br>
$var(group)="";<br>
if($fU=~"32460.*")<br>
{<br>
$var(group)=2;<br>
xlog("callid=$ci: route[drouting]: fU $fU starts with 32460, we <br>
put var(group) $var(group) to 2");<br>
}<br>
else<br>
{<br>
$var(group)=1;<br>
xlog("callid=$ci: route[drouting]: fU $fU does not start with <br>
32460, we put var(group) $var(group) to 1");<br>
}<br>
if(!do_routing($(var(group){<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a>}),,,$var(rule),$var(gw)))<br>
{<br>
xlog("callid=$ci: route[drouting]: drouting failed");<br>
sl_send_reply(500,"no routes!!!");<br>
exit;<br>
}<br>
<br>
<br>
<br>
olddb :<br>
<br>
select * from dr_rules;<br>
+--------+---------+--------+---------+----------+---------+--------+----------------+-------------+<br>
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | <br>
attrs | description |<br>
+--------+---------+--------+---------+----------+---------+--------+----------------+-------------+<br>
| 4 | 1 | | | 0 | | 32 | <br>
BICS | |<br>
| 7 | 2 | | | 0 | | 32460 | <br>
Belgian mobile | |<br>
+--------+---------+--------+---------+----------+---------+--------+----------------+-------------+<br>
<br>
select * from dr_rules;<br>
+--------+---------+--------+---------+----------+---------+--------+----------------+-------------+<br>
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | <br>
attrs | description |<br>
+--------+---------+--------+---------+----------+---------+--------+----------------+-------------+<br>
| 4 | 1 | | | 0 | | 32 | A <br>
| |<br>
| 7 | 2 | | | 0 | | 32460 | B <br>
| |<br>
+--------+---------+--------+---------+----------+---------+--------+----------------+-------------+<br>
2 rows in set (0.01 sec)<br>
lect * from dr_gateways<br>
-> ;<br>
+----+-------+------+----------------------+-------+------------+-------+------------+-------+--------+----------------------------------+<br>
| id | gwid | type | address | strip | pri_prefix | attrs <br>
| probe_mode | state | socket | description |<br>
+----+-------+------+----------------------+-------+------------+-------+------------+-------+--------+----------------------------------+<br>
| 1 | 32 | 2 | <a href="http://192.168.174.251:5060" rel="noreferrer" target="_blank">192.168.174.251:5060</a> | 0 | | | <br>
0 | 0 | | A |<br>
| 5 | -1 | 1 | <a href="http://192.168.174.254:5060" rel="noreferrer" target="_blank">192.168.174.254:5060</a> | 1 | | | <br>
0 | 0 | | Inbound from B |<br>
| 7 | 32460 | 1 | <a href="http://192.168.174.253:5060" rel="noreferrer" target="_blank">192.168.174.253:5060</a> | 0 | | | <br>
0 | 0 | | C|<br>
+----+-------+------+----------------------+-------+------------+-------+------------+-------+--------+----------------------------------+<br>
3 rows in set (0.00 sec)<br>
<br>
select * from dr_groups;<br>
+----+----------+------------------------+---------+------------------------------+<br>
| id | username | domain | groupid | <br>
description |<br>
+----+----------+------------------------+---------+------------------------------+<br>
| 3 | 1 | abcc| 1 | Default group for |<br>
| 5 | 1 | <a href="http://yourdomain.net" rel="noreferrer" target="_blank">yourdomain.net</a> | 2 | BICS <br>
mobile |<br>
+----+----------+------------------------+---------+------------------------------+<br>
2 rows in set (0.00 sec)<br>
<br>
new db :<br>
<br>
dr_rules;<br>
+--------+---------+--------+---------+----------+---------+--------+----------+--------------+----------------+-------------+<br>
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | <br>
sort_alg | sort_profile | attrs | description |<br>
+--------+---------+--------+---------+----------+---------+--------+----------+--------------+----------------+-------------+<br>
| 4 | 1 | | | 0 | | 32 | <br>
N | 0 | A | |<br>
| 7 | 2 | | | 0 | | 32460 | <br>
N | 0 | B | |<br>
+--------+---------+--------+---------+----------+---------+--------+----------+--------------+----------------+-------------+<br>
2 rows in set (0.00 sec)<br>
select * from dr_gateways;<br>
+----+-------+------+----------------------+-------+------------+-------+------------+-------+--------+----------------------------------+<br>
| id | gwid | type | address | strip | pri_prefix | attrs <br>
| probe_mode | state | socket | description |<br>
+----+-------+------+----------------------+-------+------------+-------+------------+-------+--------+----------------------------------+<br>
| 1 | 32 | 2 | <a href="http://192.168.174.251:5060" rel="noreferrer" target="_blank">192.168.174.251:5060</a> | 0 | | | <br>
0 | 0 | | A |<br>
| 5 | -1 | 1 | <a href="http://192.168.174.254:5060" rel="noreferrer" target="_blank">192.168.174.254:5060</a> | 1 | | | <br>
0 | 0 | | Inbound from B |<br>
| 7 | 32460 | 1 | <a href="http://192.168.174.253:5060" rel="noreferrer" target="_blank">192.168.174.253:5060</a> | 0 | | | <br>
0 | 0 | | C|<br>
+----+-------+------+----------------------+-------+------------+-------+------------+-------+--------+----------------------------------+<br>
3 rows in set (0.00 sec)<br>
select * from dr_groups;<br>
+----+----------+------------------------+---------+------------------------------+<br>
| id | username | domain | groupid | <br>
description |<br>
+----+----------+------------------------+---------+------------------------------+<br>
| 3 | 1 | abc | 1 | Default <br>
group for |<br>
| 5 | 1 | <a href="http://yourdomain.net" rel="noreferrer" target="_blank">yourdomain.net</a> | 2 | BICS <br>
mobile |<br>
+----+----------+------------------------+---------+------------------------------+<br>
2 rows in set (0.00 sec)<br>
<br>
select * from dr_carriers;<br>
Empty set (0.00 sec)<br>
<br>
select * from dr_partitions;<br>
Empty set (0.00 sec)<br>
<br>
<br>
so dr_rules has changed.<br>
<br>
<br>
can somebody please point out what is wrong with my datafill ?<br>
<br>
</blockquote></div>