package FS::part_export::a2billing; use strict; use vars qw(@ISA @EXPORT_OK $DEBUG %info %options); use Exporter; use Tie::IxHash; use FS::Record qw( qsearch qsearchs str2time_sql ); use FS::part_export; use FS::svc_acct; use FS::svc_phone; use Locale::Country qw(country_code2code); use Date::Format qw(time2str); use Carp qw( cluck ); use FS::DBI; @ISA = qw(FS::part_export); $DEBUG = 0; tie %options, 'Tie::IxHash', 'datasrc' => { label=>'DBI data source ' }, 'username' => { label=>'Database username' }, 'password' => { label=>'Database password' }, 'didgroup' => { label=>'DID group ID', default=>1 }, 'credit' => { label=>'Default credit limit' }, 'billtype' => {label=>'Billing type', type => 'select', options => ['Dial Out Rate', 'Free'] }, 'debug' => { label=>'Enable debugging', type=>'checkbox' } ; my $notes = <<'END';

Real-time export to the backend database of an Asterisk2Billing billing server. This is both a svc_acct and a svc_phone export, and needs to be attached to both a svc_acct and svc_phone definition within the same package.