[freeside-users] freeside-sqlradius-radacctd complainig about svc_acct record
M. Stephen
stemap at netsoltz.com
Thu Dec 6 14:07:35 PST 2007
Wow!
For the first time for over 4 months i managed to see
sqlradius-radacctd can account for usage and can disable
the account (password) in radcheck account.
The sqlradius-radacctd module was complaining as "no
svc_acct record found.." because the username sent to
radcheck table was in the form xxx at yyy.zzz while the
stored user in freeside postgre was xxx.
What I did was to strip the user in radius so that users
are stored as xxx and not xxx at yyy.zzz. I had to setup
another radius server (freeradius) and proxy the users
with nostrip entry in proxy configuration file.
BUT I have one problem.
If I set package with no recurring fee, and set Base
recurring fee for this package to a value say 5000 and
Additional charge per megabyte total to a value say 500
a new created account is inactive. But being inactive, the
account is provisioned to radius database and works well.
If I set If I set package with recurring fee to monthly,
and set Base recurring fee for this package to a value say
5000 and Additional charge per megabyte total to a value
say 500
a new created account is active and works well.
sqlradius-radacctd deducts well the availabe usage. But
when sqlradius-radacctd deducts to zero, suspends the
account. and the account is NOT ACTIVATED EVEN THOUGH YOU
ADD SOME CREDI.
I want to have plan such that, usage xxxMB purchased by
client should be available for two months. If not used
within that time, or some bytes remains then the account
should be suspended
Also if the xxxMB is used before the end of month then the
account should be suspended.
if the account is suspended and recharged the account
should be active.
Please help
__________
Stephen
being inactive, the account is provisioned to radius
database and works well.
On Mon, 3 Dec 2007 14:00:39 -0800
Ivan Kohler <ivan at sisd.com> wrote:
> On Tue, Dec 04, 2007 at 12:51:22AM +0300, M. Stephen
>wrote:
>> I have one question to go about, as i am not used to
>> internal scripts of freeside.
>>
>> If I look at Schema.pm, I find this section with radius
>> entities commented out. Are these radius attributes not
>> required for usage billing?
>
> No, they are not. These are check and reply attributes
>for the radcheck
> and radreply tables. AFAIK, no one has used this
>functionality in a
> long time - groups provide a better mechanism for
>setting check and
> reply attributes.
>
> They have nothing to do with reading accounting
>information from a
> RADIUS server.
>
> I look forward to reviewing your changes.
>
> --
> _ivan
>
>
>>
>> #add radius attributes to svc_acct
>> #
>> #my($svc_acct)=$dbdef->table('svc_acct');
>> #
>> #my($attribute);
>> #foreach $attribute (@attributes) {
>> # $svc_acct->addcolumn ( new DBIx::DBSchema::Column (
>> # 'radius_'. $attribute,
>> # 'varchar',
>> # 'NULL',
>> # $char_d,
>> # ));
>> #}
>> #
>> # foreach $attribute (@check_attributes) {
>> # $svc_acct->addcolumn( new DBIx::DBSchema::Column (
>> # 'rc_'. $attribute,
>> # 'varchar',
>> # 'NULL',
>> # $char_d,
>> # ));
>> # }
>>
>> ______
>> Stemap
>>
>>
>>
>>
>>
>> On Mon, 3 Dec 2007 13:41:31 -0800
>> Ivan Kohler <ivan at sisd.com> wrote:
>> > On Tue, Dec 04, 2007 at 12:29:33AM +0300, M. Stephen
>> >wrote:
>> >> I think freeside-sqlradius-radacctd is complainig as
>>"no
>> >> svc_acct record found" because freeside sends the
>> >>username
>> >> to freeside database as xxx at yyy.zzz but the internal
>> >> stored UseRName is xxx. So when
>> >> freeside-sqlradius-radacctd check record detail from
>> >> radacct in freeradius database and compare to
>>username
>> >>in
>> >> svc_acct, it finds no record as the usernames are
>> >> different.
>> >>
>> >> Is there a way to store the names in svc_acct table
>>in
>> >>the
>> >> form of xxx at yyy.zzz?
>> >
>> > No. Usernames ("xxx") are stored in the svc_acct
>>table,
>> >and domains
>> > ("yyy.zzz") are stored in the svc_domain table.
>> >
>> > If you aren't finding the accounting records because
>> >your RADIUS server
>> > stores them differently than the ones we've written
>>the
>> >support against,
>> > modify the lookup to find records the way Freeside
>> >stores them: Lookup
>> > the domain in svc_domain, then lookup the svc_acct
>>with
>> >username and
>> > domsvc set to the svcnum of the domain you found.
>> >
>> > Don't kludge username at domain into the
>>svc_acct.username
>> >field.
>> >
>> >For bonus points, make your changes conditional on a
>> >configuration
>> > option (so as not to disturb the default operation)
>>and
>> >submit them as a
>> > patch for inclusion in the next release (diff -u
>>format
>> >preferred).
>> >
>> > HTH.
>> >
>> > --
>> > _ivan
>> >
>> >
>> >
>> >> This should be taken from the new
>> >> customer form section of UserName,Domain and password
>> >>
>> >> ________
>> >> Stephen
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>> >> On Mon, 3 Dec 2007 12:14:55 -0800
>> >> Ivan Kohler <ivan at sisd.com> wrote:
>> >> > On Mon, Dec 03, 2007 at 11:06:55PM +0300, M.
>>Stephen
>> >> >wrote:
>> >> >> I downloaded November 2. Actually I just
>>downloaded
>> >>the
>> >> >> cvs using the cvs command as follows
>> >> >>
>> >> >> $ cvs checkout -r FREESIDE_1_7_BRANCH freeside
>> >> >>
>> >> >> With the above command, I got full freeside
>> >> >>distribution.
>> >> >>
>> >> >> The skipped records does not contain uppercase
>> >> >
>> >> > Okay, your problem is not the same as the one we
>>fixed
>> >> >some time ago on
>> >> >FREESIDE_1_7_BRANCH, then.
>> >> >
>> >> > No idea what's causing your problem;
>> >> >freeside-sqlradius-radacctd is
>> >> > working for us for several customers and has been
>>for
>> >> >somet time.
>> >> >
>> >> > Let us know what you turn up.
>> >> >
>> >> > --
>> >> > _ivan
>> >> >
>> >> >
>> >> >> On Sun, 2 Dec 2007 16:40:58 -0800
>> >> >> Ivan Kohler <ivan at sisd.com> wrote:
>> >> >> > On Sat, Dec 01, 2007 at 09:42:48PM +0300, M.
>> >>Stephen
>> >> >> >wrote:
>> >> >> >>
>> >> >> >> I am trying to do usage billing from
>>freeradius. I
>> >> >>want
>> >> >> >>an
>> >> >> >> account to get suspended when usage limit is
>> >>reached.
>> >> >> >>
>> >> >> >> On monitoring the freeside-sqlradius-radacctd
>> >>(from
>> >> >>the
>> >> >> >> logs) I see it is complaining about svc_acct
>> >>record.
>> >> >>The
>> >> >> >> message from the log file is as follows;
>> >> >> >>
>> >> >> >> [Sat Dec 1 20:58:21 2007] [3886] WARNING: no
>> >> >>svc_acct
>> >> >> >> record found for RADIUS detail RadAcctID 91681
>> >> >>(UserName
>> >> >> >> xxx at yyy.com, Realm ) - skipping.
>> >> >> >>
>> >> >> >> Monitoring the account from the billing
>>interface,
>> >>i
>> >> >>can
>> >> >> >> see the usage has exceeded the limit but not
>> >> >>suspended.
>> >> >> >>
>> >> >> >> I am using CVS branch FREESIDE_1_7_BRANCH
>> >> >> >
>> >> >> > When did you last update?
>> >> >> >
>> >> >> > Do the skipped records contain uppercase
>> >>characters?
>> >> >> >
>> >> >> > --
>> >> >> > _ivan
>> >> >> > _______________________________________________
>> >> >> > freeside-users mailing list
>> >> >> > freeside-users at sisd.com
>> >> >> >
>> >>http://420.am/cgi-bin/mailman/listinfo/freeside-users
>> >> >>
>> >> >> _______________________________________________
>> >> >> freeside-users mailing list
>> >> >> freeside-users at sisd.com
>> >> >>
>>http://420.am/cgi-bin/mailman/listinfo/freeside-users
>> >> >
>> >> > --
>> >> > _ivan
>> >> > _______________________________________________
>> >> > freeside-users mailing list
>> >> > freeside-users at sisd.com
>> >> >
>>http://420.am/cgi-bin/mailman/listinfo/freeside-users
>> >>
>> >> _______________________________________________
>> >> freeside-users mailing list
>> >> freeside-users at sisd.com
>> >> http://420.am/cgi-bin/mailman/listinfo/freeside-users
>> >
>> > --
>> > _ivan
>> > _______________________________________________
>> > freeside-users mailing list
>> > freeside-users at sisd.com
>> > http://420.am/cgi-bin/mailman/listinfo/freeside-users
>>
>> _______________________________________________
>> freeside-users mailing list
>> freeside-users at sisd.com
>> http://420.am/cgi-bin/mailman/listinfo/freeside-users
>
> --
> _ivan
> _______________________________________________
> freeside-users mailing list
> freeside-users at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-users
More information about the freeside-users
mailing list