[freeside-users] Using FS::cdr

olima at SDF.ORG olima at SDF.ORG
Mon Aug 29 01:47:11 PDT 2016


Hi,

I'm using freeside 4.1 (4.1-20160805) installed via Debian's (jessie)
packages,
followed the documentation for the installation, so everything is supposed
to be at the right place and pretty standard (perl v5.22.1, postgresql
9.4.9-0+deb8u1, libdbd-pg-perl 3.4.2-1

So far, I'm really happy with my installation, I've finally managed to
automatize the pulling of CDRs from the various SIP trunks I'm connected to,
and pushing of the data into Freeside, finally getting invoices generated for
our customers.

The final hurdle I need to overcome is the handling of premium services
numbers.
In France, most of these numbers are behind the 08 prefix, thing is, every
destination has more or less its own tarif therefore it is impossible to
group
them in the freeside.rate_prefix and freeside.rate_detail tables.
Also, as a provider is forbidden to make a profit on this kind of calls, I
only
need to pass the cost of the call directly to the customer, and, I happen
to have it within my CDRs.

I've looked at the code, and if I'm not wrong I can't use Freeside's
importing
function to have let's say the upstream price recorded as the rated_cost.
For example, importing using the Simple2 format would only populate the
upstream_price field.
The only way to do it properly would be to inject these kind of CDRs using
FS::cdr.

Now, after breaking a CDR into a hash table, and trying to create a record
object, I'm getting the following error:
   Can't call method "table" on an undefined value at
   /usr/share/perl5/FS/Record.pm line 3459.

I've followed the documentation at
http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Developer/FS/cdr,
can't manage to find what's wrong.
Are there required fields in the hash table that represents the CDR ?

Help would be much appreciated.
Thanks,
-- 
Asega.




More information about the freeside-users mailing list