1 package FS::part_export::phone_sqlradius;
3 use vars qw(@ISA $DEBUG %info );
5 use FS::Record; #qw( dbh qsearch qsearchs str2time_sql );
7 use FS::part_export::sqlradius;
10 #use Carp qw( cluck );
12 @ISA = qw(FS::part_export::sqlradius);
16 tie %options, 'Tie::IxHash',
17 'datasrc' => { label=>'DBI data source ' },
18 'username' => { label=>'Database username' },
19 'password' => { label=>'Database password' },
20 'ignore_accounting' => {
22 label => 'Ignore accounting records from this database'
26 label => 'Hide IP address information on session reports',
30 label => 'Hide download/upload information on session reports',
33 #should be default for this one, right?
34 #'show_called_station' => {
36 # label => 'Show the Called-Station-ID on session reports',
40 #'overlimit_groups' => { label => 'Radius groups to assign to svc_acct which has exceeded its bandwidth or time limit', } ,
41 #'groups_susp_reason' => { label =>
42 # 'Radius group mapping to reason (via template user) (svcnum|username|username@domain reasonnum|reason)',
50 'desc' => 'Real-time export to SQL-backed RADIUS (FreeRADIUS, ICRADIUS) for phone provisioning and rating',
51 'options' => \%options,
53 Real-time export of <b>radcheck</b> table
54 <!--, <b>radreply</b> and <b>usergroup</b>-- tables>
55 to any SQL database for <a href="http://www.freeradius.org/">FreeRADIUS</a>
56 or <a href="http://radius.innercite.com/">ICRADIUS</a>.
59 This export is for phone/VoIP provisioning and rating. For a regular RADIUS
60 export, see sqlradius.
63 <!--An existing RADIUS database will be updated in realtime, but you can use
64 <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.9:Documentation:Developer/bin/freeside-phone_sqlradius-reset">freeside-phone_sqlradius-reset</a>
65 to delete the entire RADIUS database and repopulate the tables from the
71 <a href="http://search.cpan.org/dist/DBI/DBI.pm#connect">DBI documentation</a>
73 <a href="http://search.cpan.org/search?mode=module&query=DBD%3A%3A">documentation for your DBD</a>
74 for the exact syntax of a DBI data source.
79 sub rebless { shift; }
82 my($self, $svc_phone) = (shift, shift);
83 $svc_phone->countrycode. $svc_phone->phonenum;
86 sub _export_suspend {}
87 sub _export_unsuspend {}
89 #probably harmless that we ->can('usage_sessions').... ?