rlm_sql is not updating the record...

raviprakash sunkara sunkara.raviprakash.feb14 at gmail.com
Fri Jun 9 17:18:39 CEST 2006


Hi ....

I'm working openser + mysql + Freeradius....

when i'm making a call for accounting,  first it say  " Acct-Status-Type =
Failed  " and  then its " Acct-Status-Type = start "

After that when the User hang up the call , it didn't update the Acct Stop
time and inserting the t2 records ...

And also  what  means  this......

rlm_sql (sql): Reserving sql socket id: 2
radius_xlat:  'stop packet with zero session length. [user '666 at 192.168.2.55',
nas '192.168.2.55']'
rlm_sql (sql) in sql_accounting: stop packet with zero session length. [user
'666 at 192.168.2.55', nas '192.168.2.55']
rlm_sql (sql): Released sql socket id: 2


This query is not updating  ---> " 'UPDATE radacct SET AcctStopTime =
'2006-06-09 19:57:27', AcctSessionTime = '', AcctInputOctets = '',
AcctOutputOctets = '', AcctTerminateCause = '', AcctStopDelay = '0',
ConnectInfo_stop = '' WHERE AcctSessionId = '
76788233-9611-4A96-9FAA-E829F175C69C at 192.168.2.20' AND  NASIPAddress = '
192.168.2.55''    " why ?


and this query is  inserting ----->  " INSERT into radacct (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('
76788233-9611-4A96-9FAA-E829F175C69C at 192.168.2.20', '63170499b83f412d', '
666 at 192.168.2.55', '', '192.168.2.55', '5060', '', DATE_SUB('2006-06-09
19:57:27', INTERVAL (0 + 0) SECOND), '2006-06-09 19:57:27', '', '', '', '',
'', '', 'sip:555 at 192.168.2.55', 'sip:666 at 192.168.2.55', '', 'Sip-Session',
'', '', '0', '0')'  "

Acct-Session-time is  zero showing  ? why ?


Can U see the below one .... I need to change . please guys help me , this
very important to complete the task .... please   .

rad_recv: Accounting-Request packet from host 192.168.2.55:33879, id=219,
length=233
        Acct-Status-Type = Stop
        Service-Type = Sip-Session
        Sip-Response-Code = 200
        Sip-Method = BYE
        User-Name = "666 at 192.168.2.55"
        Calling-Station-Id = "sip:666 at 192.168.2.55"
        Called-Station-Id = "sip:555 at 192.168.2.55"
        Sip-Translated-Request-URI = "sip:555 at 192.168.2.21:5060"
        Acct-Session-Id = "76788233-9611-4A96-9FAA-E829F175C69C at 192.168.2.20
"
        Sip-To-Tag = "2044753626"
        Sip-From-Tag = "4110988557"
        Sip-Cseq = "57538"
        NAS-Port = 5060
        Acct-Delay-Time = 0
        NAS-IP-Address = 192.168.2.55
  Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 2
  modcall[preacct]: module "preprocess" returns noop for request 2
rlm_acct_unique: Hashing 'NAS-Port = 5060,Client-IP-Address =
192.168.2.55,NAS-IP-Address
= 192.168.2.55,Acct-Session-Id = "
76788233-9611-4A96-9FAA-E829F175C69C at 192.168.2.20",User-Name = "
666 at 192.168.2.55"'
rlm_acct_unique: Acct-Unique-Session-ID = "63170499b83f412d".
  modcall[preacct]: module "acct_unique" returns ok for request 2
    rlm_realm: Looking up realm "192.168.2.55" for User-Name = "
666 at 192.168.2.55"
    rlm_realm: No such realm "192.168.2.55"
  modcall[preacct]: module "suffix" returns noop for request 2
  modcall[preacct]: module "files" returns noop for request 2
modcall: leaving group preacct (returns ok) for request 2
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 2
radius_xlat:
'/usr/local/var/log/radius/radacct/192.168.2.55/detail-20060609'
rlm_detail:
/usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands
to /usr/local/var/log/radius/radacct/192.168.2.55/detail-20060609
  modcall[accounting]: module "detail" returns ok for request 2
radius_xlat:  '/usr/local/var/log/radius/radutmp'
radius_xlat:  '666 at 192.168.2.55'
  modcall[accounting]: module "radutmp" returns ok for request 2
radius_xlat:  '666 at 192.168.2.55'
rlm_sql (sql): sql_set_user escaped user --> '666 at 192.168.2.55'
radius_xlat:  'UPDATE radacct SET AcctStopTime = '2006-06-09 19:57:27',
AcctSessionTime = '', AcctInputOctets = '', AcctOutputOctets = '',
AcctTerminateCause = '', AcctStopDelay = '0', ConnectInfo_stop = '' WHERE
AcctSessionId = '76788233-9611-4A96-9FAA-E829F175C69C at 192.168.2.20' AND
NASIPAddress = '192.168.2.55''
rlm_sql (sql): Reserving sql socket id: 2
radius_xlat:  'stop packet with zero session length. [user '666 at 192.168.2.55',
nas '192.168.2.55']'
rlm_sql (sql) in sql_accounting: stop packet with zero session length. [user
'666 at 192.168.2.55', nas '192.168.2.55']
rlm_sql (sql): Released sql socket id: 2
radius_xlat:  'INSERT into radacct (AcctSessionId, AcctUniqueId, UserName,
Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,
AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress,
AcctStartDelay, AcctStopDelay) values('
76788233-9611-4A96-9FAA-E829F175C69C at 192.168.2.20', '63170499b83f412d', '
666 at 192.168.2.55', '', '192.168.2.55', '5060', '', DATE_SUB('2006-06-09
19:57:27', INTERVAL (0 + 0) SECOND), '2006-06-09 19:57:27', '', '', '', '',
'', '', 'sip:555 at 192.168.2.55', 'sip:666 at 192.168.2.55', '', 'Sip-Session',
'', '', '0', '0')'
rlm_sql (sql): Released sql socket id: 2
  modcall[accounting]: module "sql" returns noop for request 2
modcall: leaving group accounting (returns ok) for request 2
Sending Accounting-Response of id 219 to 192.168.2.55 port 33879


-- 
Thanks and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
www.hyperion-tech.com
<b>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060609/b6606dee/attachment.html>


More information about the Freeradius-Users mailing list