[Users] acc module db_extra accounting issue

Glenn Dalgliesh glenn at routerboy.com
Fri Apr 21 18:43:45 CEST 2006


I am having issues with avp's as part of db_extra. In the below scenario
which ever avp value is listed first in the db_extra statement ends up in
both fields in the table that involve avp's. The Pseudo-variables seem to
get populated correctly.

 I have verified that the values are correct in the avp's via the xlog
statement but the sql insert has the wrong values when I send ngrep it.

modparam("avpops","avp_aliases","outbound_cust_id=i:5024;inbound_cust_id=i:5
025")

modparam("acc", "db_extra", "inbound_cust_id=$avp($inbound_cust_id);
src_ip=$si; recv_ip=$Ri; outbound_cust_id=$avp($outbound_cust_id)")

avp_db_query("select id from customers where gateway1 = '$si' or gateway2 =
'$si'","$avp($outbound_cust_id)");

avp_db_query("select cust_id from customer_dids where did =
'$tU'","$avp($inbound_cust_id)");

xlog("L_ERR", "AVP outbound_cust_id [$avp($outbound_cust_id)]\n");
xlog("L_ERR", "AVP inbound_cust_id [$avp($inbound_cust_id)]\n");





More information about the Users mailing list