<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Kirill,<br>
<br>
I see you use partitions, and your lookup is over partition "1".
So, in the dr_partitions table, when defining the partition "1",
have you set the "</tt><code class="VARNAME">rule_id_avp" field to
"</code><span style="font-family:monospace"><font color="#000000"><span
style="font-family:monospace">$avp(dr_rule_id)" ?<br>
<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-DR-PARTITIONS">http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-DR-PARTITIONS</a><br>
<br>
Regards,<br>
</span></font></span>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="moz-cite-prefix">On 05/21/2018 06:06 PM, Kirill
Galinurov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPDUut_hcUGbAC=m9rw+9CTh+ZjWoFHaMmaa=wKPqgufdE_tPA@mail.gmail.com">
<div dir="ltr">Hi i use opensips 2.3 (<span
style="font-family:monospace"><span
style="color:rgb(0,0,0);background-color:rgb(255,255,255)">OpenSIPS
(2.3.3 (x86_64/linux)) drouting</span></span>
<div><span style="font-family:monospace"><font color="#000000">And
I need rule_id variable to store in CDR.</font></span></div>
<div><span style="font-family:monospace"><font color="#000000"><span
style="font-family:monospace"><span
style="color:rgb(0,0,0);background-color:rgb(255,255,255)">modparam("drouting",
"use_partitions", 1)
</span><br>
modparam("drouting", "carrier_id_avp",
'$avp(carrier_id)')
<br>
modparam("drouting", "partition_id_pvar",
"$var(matched_partition)")
<br>
modparam("drouting", "rule_id_avp", '$avp(dr_rule_id)')<br>
<br>
</span><span style="font-family:monospace"><span
style="color:rgb(0,0,0);background-color:rgb(255,255,255)">if(!do_routing("*:1","W",,,"$avp(gateway_attr)","$avp(dr_rule_from)"))
{
</span><br>
xlog("do_routing: No rules matching the
URI/n");
<br>
send_reply("503","No rules matching the URI");
<br>
exit;
<br>
} else {
<br>
xlog("do_routing: to operator
$avp(carrier_id)/n"); <br>
xlog("L_INFO", "get_route: rule_id
$avp(dr_rule_id)\n");<br>
</span>}</font></span></div>
<div><span style="font-family:monospace"><font color="#000000">But
in output</font></span></div>
<div><span style="font-family:monospace"><font color="#000000"><span
style="font-family:monospace"><span
style="color:rgb(0,0,0);background-color:rgb(255,255,255)">Opensips:
May 21 18:06:18 [26575] get_route: rule_id -
<null></span><br>
<br>
</span><br>
</font>
<br>
</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>