From renemontilva@gmail.com Fri May 9 21:45:35 2014 From: Rene Montilva To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] CNXCC PrePaid module Date: Fri, 09 May 2014 15:15:29 -0430 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1571588529==" --===============1571588529== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Carlos This my kamailio config: #!ifdef CNXCC_MONEY sql_query("ca", "select * from billing.sel_customer_credit('pepe','xxxxxxx","ra"); xlog("L_INFO", "Setting up money based credit control"); if($dbr(ra=3D>rows)> 0){ xlog("L_INFO", "saldo:$dbr(ra=3D>[0,0]) y seg:$dbr(ra=3D>[0,1]) "); $var(credit) =3D $dbr(ra=3D>[0,0]); # 30$ of credit $var(cost_per_sec) =3D $dbr(ra=3D>[0,1]); # 1$ per sec $var(i_pulse) =3D "1"; # 1$ to establish the call $var(f_pulse) =3D "1"; # 1$ per second } sql_result_free ("ra"); # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit("$var(client)", "$var(credit)", "$var(cost_per_sec)", "$var(i_pulse)", And this are the values by syslog info INFO: