Accounting Stop time is not inserting in radacct tables in Radius by using openser

raviprakash sunkara sunkara.raviprakash.feb14 at gmail.com
Mon Jun 5 17:10:46 CEST 2006


Hi

please this Issuse


....... Radius server debug mode.......

rad_recv: Accounting-Request packet from host 192.168.2.55:32807, id=58,
length=221
       Acct-Status-Type = Failed
       Service-Type = IAPP-AP-Check
       Sip-Response-Code = 0
       Sip-Method = INVITE
       User-Name =
"555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"
       Calling-Station-Id =
"sip:555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"
       Called-Station-Id =
"sip:666 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"
       Sip-Translated-Request-URI =
"sip:666 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"
       Acct-Session-Id =
"E54D81BC-C463-446F-B0AF-DE1C3C6EC33D at 192.168.2.21<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"
       Sip-To-Tag = "n/a"
       Sip-From-Tag = "3693743074"
       Sip-Cseq = "34571"
       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 11
 modcall[preacct]: module "preprocess" returns noop for request 11
   rlm_realm: Looking up realm "192.168.2.55" for User-Name =
"555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"
   rlm_realm: No such realm "192.168.2.55"
 modcall[preacct]: module "suffix" returns noop for request 11
modcall: leaving group preacct (returns noop) for request 11
 Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 11
rlm_acct_unique: Hashing 'NAS-Port = 5060,Client-IP-Address =
192.168.2.55,NAS-IP-Address = 192.168.2.55,Acct-Session-Id =
"E54D81BC-C463-446F-B0AF-DE1C3C6EC33D at 192.168.2.21<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>",User-Name
=
"555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
"'
rlm_acct_unique: Acct-Unique-Session-ID = "ef0513de749b7034".
 modcall[accounting]: module "acct_unique" returns ok for request 11
radius_xlat:
'/usr/local/var/log/radius/radacct/192.168.2.55/detail-20060605'
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-20060605
rlm_detail: Failed to create directory
/usr/local/var/log/radius/radacct/192.168.2.55: Permission denied
 modcall[accounting]: module "detail" returns fail for request 11
modcall: leaving group accounting (returns fail) for request 11
Finished request 11
Going to the next request

Below one is openser.cfg file

please help me



#*************************************************************************************************
modparam("usrloc", "db_mode", 2)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "calculate_ha1", yes)
modparam("usrloc|acc|auth_db|group|msilo", "db_url",
"mysql://openser:openserrw@localhost/openser")
########333333
modparam("acc","log_level",1)
modparam("acc","log_flag",1)
modparam("acc","log_missed_flag",2)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "failed_transaction_flag",3)
modparam("acc", "report_cancels", 1)
modparam("acc","report_ack",0)
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc","radius_flag",1)
modparam("acc","radius_missed_flag",2)
modparam("acc","service_type",16)
modparam("acc","radius_config","/usr/local/etc/radiusclient-ng/radiusclient.conf")
##########33
modparam("nathelper","natping_interval",30)
modparam("nathelper","ping_nated_only",1)
modparam("nathelper", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")
#################33
modparam("rr", "enable_full_lr", 1)
###############################################
route    {
   # initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
       if (!mf_process_maxfwd_header("13")) {
           sl_send_reply("483","Too Many
Hops........................!");
           exit;
       };
       if ( msg:len > max_len ) {
       sl_send_reply("513", "Message too big");
       exit;
       };

# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
   record_route();
# loose-route processing
   if (loose_route()) {
       t_relay();
       setflag(1);
       exit;
   };


# account completed transactions via syslog
   setflag(1);
   setflag(2);
   if(uri==myself)
   {
       if(method=="REGISTER")
           {
               if(!radius_www_authorize("192.168.2.55"))
                   {
                       www_challenge("192.168.2.55","1");
                       exit;
                   };
               save("location");
               if (m_dump())
                   {
                       log("MSILO: offline messages dumped - if they
were\n");
                   }else{
                       log("MSILO: no offline messages dumped\n");
                   };

               exit;
           };
       if(method=="INVITE"|| method=="ACK")
           {
               acc_rad_request("Start");
               record_route();
               force_rtp_proxy();
               #setflag(1);
               t_on_reply("1");
           };
       if (method=="BYE") {
           record_route();
           };


       if (method=="MESSAGE") {
           log(1, "MESSAGE\n");
           setflag(1); /* set for accounting (the same value as in
log_flag!) */
           };

       if (method=="BYE" || method=="CANCEL") {
           #log (1, "BYE or CANCEL\n");
           #setflag(1);

           acc_rad_request("Stop");
           setflag(1);

       };
       if(!lookup("location"))
           {
               sl_send_reply("404","Woo......... NOt found");
           };
       };
       lookup("aliases");
       setflag(2);
       if(!t_relay())
           {
               sl_reply_error();
           };
   }
   onreply_route[1]
       {
           if(status=~"[0-9][0-9][0-9]")
           {
               force_rtp_proxy();
           };
       }


....................... Naslist file in raddb(radius_server.....
192.168.2.55      radiustest        other
192.168.2.20           hyperion1 other
192.168.2.21 hyperion2 other

.........................hintsGroups..........

555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
 NAS-IP-ADDRESS ==
192.168.2.21
666 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
NAS-IP-ADDRESS ==
192.168.2.20
......................................

.................radiusclient.conf ........
authserver 192.168.2.55
acctserver 192.168.2.55
......................servers..................

192.168.2.55                                    radiustest
192.168.2.20 hyperion1
192.168.2.21 hyperion2
...................Radacct tables..........
id              UserName       Attribute  op   value
---------------------------------------------------
4            555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
Password   ==   test2
5            666 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
Password   ==   test3


--------------------------------------------------------
                   RadgroupCheck......
id         GroupName  Attribute   op  value

5             voip     Auth-Type  :=   Digest

************************************************************
                RadgroupReply...
id     GroupName   Attribute   op Value
56     voip         Service-Type :=  Sip-Session
............................................................
             UserGroup
UserName            Group     Priority
555 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
  Voip       4
666 at 192.168.2.55<https://email.secureserver.net/view.php?folder=INBOX.Sent_Items&uid=69#Compose>
   voip      5
----------------------------------------------------------
-- 
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/20060605/a930d5f9/attachment.html>


More information about the Freeradius-Users mailing list