Hello P., Monday, January 5, 2004, 7:57:56 AM, you wrote: PP> Hi, dear gnugk users. PP> If somebody cares, at the end I describe a *possible* bug in PP> gnugk or freeradius perl module. PP> I tried to setup perl module in freeradius but had ALOT of PP> troubles. I think people who tried it had also experienced this PP> problem. PP> In default simple configuration, authenticate function of PP> perl module sets h323-credit-amount parametr of reply packet as PP> follows: $RAD_REPLY{'h323-credit-amount'} = "100"; PP> Strugling for nearly an hour, I foud out that I needed PP> 'h323-credit-TIME' (not 'h323-credit-AMOUNT') for limiting session PP> time ;)... following logic of the provided example I replaced word PP> amount with word time like this: $RAD_REPLY{'h323-credit-time'} = PP> "100"; PP> BUT!! it still didn't work. I tried to replace PP> $RAD_REPLY{'h323-credit-time'} = "100"; with PP> $RAD_REPLY{'Session-Timeout'} = 100; but it still didn't work (in PP> the latter case the string didn't take any effect at all!). PP> In the radiusd -X there were the followin messages: PP> Sending Access-Accept of id 13 to 192.168.199.1:40939 PP> h323-credit-time = "100" PP> but gnugk instantly was rejecting the accepted call. PP> When I traced all fields of received radius reply in gnugk PP> (RadAliasAuth::Check(ARQ,...)) it turned out that there were no PP> string like 'h323-credit-time=100' but the field contained only PP> '100'. PP> Changing in perl script the original string to PP> $RAD_REPLY{'h323-credit-time'} = 'h323-credit-time=100'; fixed the PP> problem! PP> I have no idea what is the standart for this radius field, PP> but original perl script from freeradius was configured to not to PP> send correct string (if to follow the logic the very orignal PP> string should also be changed to $RAD_REPLY{'h323-credit-amount'} PP> = 'h323-credit-amount=100'; PP> Did I do something wrong??? What is the correct way to do this? PP> There was not much harm if the h323-credit-time was sent in PP> not correct form - gnugk simply rejected the call. But in case if PP> I used $RAD_REPLY{'Session-Timeout'} = 100; There were no reaction PP> - the call was unlimited! The most strange thing - it only had PP> some partial reaction when I set it like this: PP> $RAD_REPLY{'Session-Timeout'} = '100'; #integer is replace by string '100' PP> In that case in radiusd -X there was reaction: PP> Sending Access-Accept of id 13 to 192.168.199.1:40939 PP> Session-Timeout = 100 PP> But gnugk rejected the call (At the beginning I tried to use PP> integer becase in dictionary it's declared as: PP> ATTRIBUTE Session-Timeout 27 integer) PP> But even changing it to '100' didn't help. Solution was quite PP> strange - I had to change in gnugk the part when there is a check PP> for SessionTimeout: attr->AsString() replaced by attr->AsInteger() PP> made it functioning well. PP> It seems like a bug in gnugk or freeradius doesn't send an PP> integer value as a string; Who is wrong in this case??? PP> I'll try to post this case to freeradius mailing list as well. PP> Another thing - I HAVE NO IDEA what fot the part authenticate PP> is used for! In order to make it work I had to change authenticate PP> function to autorize (authenticate function has never been called PP> aven when the call was accepted...) Very strange. PP> ------------------------------------------------------- PP> This SF.net email is sponsored by: IBM Linux Tutorials. PP> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's PP> Free Linux Tutorials. Learn everything from the bash shell to sys admin. PP> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click PP> _______________________________________________ PP> List: Openh323gk-users@lists.sourceforge.net PP> Archive: PP> http://sourceforge.net/mailarchive/forum.php?forum_id=8549 PP> Homepage: http://www.gnugk.org/ The correct h323-credit-time will be $RAD_REPLY{'h323-credit-time'} = 'h323-credit-time=100'; And it's not a bug :); I have my own ALPHA :( version of billing for gnugk... there is ability to limit h323-credit-time. If you need, I can send you scripts. (unfortunately web interface is not ready yet... but I'm working on it). -- Best regards, Mike mailto:mike@yes.net.ua ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ List: Openh323gk-users@lists.sourceforge.net Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549 Homepage: http://www.gnugk.org/