<div dir="ltr">Hi Bogdan. Thanks a lot. Everything right now.</div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-22 13:33 GMT+03:00 Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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="m_-2684985079939129621VARNAME">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="m_-2684985079939129621moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Install-DBSchema-2-3#GEN-DB-DR-PARTITIONS" target="_blank">http://www.opensips.org/<wbr>Documentation/Install-<wbr>DBSchema-2-3#GEN-DB-DR-<wbr>PARTITIONS</a><br>
<br>
Regards,<br>
</span></font></span>
<pre class="m_-2684985079939129621moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_-2684985079939129621moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit 2018
<a class="m_-2684985079939129621moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank">http://www.opensips.org/<wbr>events/Summit-2018Amsterdam</a>
</pre><div><div class="h5">
<div class="m_-2684985079939129621moz-cite-prefix">On 05/21/2018 06:06 PM, Kirill
Galinurov wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<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",,,"$<wbr>avp(gateway_attr)","$avp(dr_<wbr>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="m_-2684985079939129621mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
Users mailing list
<a class="m_-2684985079939129621moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_-2684985079939129621moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>