<div dir="ltr">Can I also do this from the failure route? I noticed that it is not properly showing the carrier ID where the call really went to, on our CDRs right now it shows it went to carrier C, but when checking our carrier CDRs the call went to carrier A,<div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 3, 2020 at 4:00 PM Răzvan Crainea <<a href="mailto:razvan@opensips.org">razvan@opensips.org</a>> wrote:<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, Vic!<br>
<br>
You are not using the correct provisioning in the extra fields. Please <br>
double check the ACC module documentation[1], where it states that for <br>
the db engine, the log_name represents the column in the acc table where <br>
that value ends up.<br>
According to your specifications, you want to dump the carrierid in the <br>
$avp(carrier_id) table; luckily for the flatstore engine the column is <br>
not relevant, as it is nowhere used.<br>
<br>
If you want to get the carrierid and ruleid values in the flatstore, you <br>
have to explicitly set the corresponding tags in your script:<br>
<br>
$acc_extra(carrierid) = $avp(carrier_id);<br>
$acc_extra(ruleid) = $avp(rule_id);<br>
<br>
Make sure to do that after you call do_routing().<br>
<br>
[1] <a href="https://opensips.org/docs/modules/3.1.x/acc.html#ACC-extra-id" rel="noreferrer" target="_blank">https://opensips.org/docs/modules/3.1.x/acc.html#ACC-extra-id</a><br>
<br>
Best regards,<br>
<br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
<br>
On 7/2/20 7:13 PM, Vic Jolin wrote:<br>
> Hello,<br>
> <br>
> I have this for drouting<br>
> loadmodule "drouting.so"<br>
> modparam("drouting", "rule_prefix_avp", '$avp(dr_prefix)')<br>
> modparam("drouting", "carrier_id_avp", '$avp(carrier_id)')<br>
> modparam("drouting", "gw_id_avp", '$avp(gw_id)')<br>
> modparam("drouting", "ruri_avp", '$avp(dr_ruri)')<br>
> modparam("drouting", "gw_priprefix_avp", '$avp(gw_priprefix)')<br>
> modparam("drouting", "rule_id_avp", '$avp(rule_id)')<br>
> <br>
> and for acc<br>
> <br>
> modparam("acc", "extra_fields", "db: callerid->callerid; ani->ani; <br>
> prefix->prefix; src_ip->src_ip; dst_ip->dst_ip; acctid->acctid; <br>
> carrierid->$avp(carrier_id); ruleid->$avp(rule_id)")<br>
> modparam("acc", "db_url", "flatstore:/var/log/acc")<br>
> <br>
> Can anyone tell me why on the flatstore files the carrierid, and ruleid <br>
> is empty?<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> <br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>