Hi,<br>I am trying to set up using Radius for accounting. As a newbie, I am simply following the standard configuration from the menu. <br>Here is where I put my flags in openser.cfg:<br><br>if(method=="BYE") {<br>
setflag(2);<br>};<br><br><br>if (method=="INVITE") {<br> # Account INVITE packets<br> setflag(2);<br> # Account Missed calls<br> setflag(3);<br>};<br><br>The cdr is successfully logged to the database via radius, but the starttime and endtime are incorrect. The starting time and ending time being recorded is the same. Also, I noticed that Openser only sends the message (both INSERT and UPDATE cdr) to radius when the BYE method is received. I was expecting Openser to instruct Radius to create a new record ( INSERT ) during the INVITE method and update the stoptime during the BYE method. <br>
<br>Here is the SQL Query log i extracted from mysql:<br><br>80603 4:38:06 6481 Query UPDATE radacct SET acctstoptime = '2008-06-03 04:38:06', acctsessiontime = '', acctinputoctets = '0' << 32 | '0', acctoutputoctets = '0' << 32 | '0', acctterminatecause = '', acctstopdelay = '0', connectinfo_stop = '' WHERE acctsessionid = 'NWQyZGI1ZTkzNGM5ZjMzZTg5ZGQ2OGVmZDY5MjYxMGE.' AND username = '1005' AND nasipaddress = '<a href="http://127.0.0.1">127.0.0.1</a>'<br>
<span style="color: rgb(255, 0, 0);"> 6481 Query 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 ('NWQyZGI1ZTkzNGM5ZjMzZTg5ZGQ2OGVmZDY5MjYxMGE.', '1412cd5bf3dd4a31', '1005', '<a href="http://192.168.1.104">192.168.1.104</a>', '<a href="http://127.0.0.1">127.0.0.1</a>', '5060', '', DATE_SUB('2008-06-03 04:38:06', INTERVAL (0 + 0) SECOND), '2008-06-03 04:38:06', '', '', '', '', '0' << 32 | '0', '0' << 32 | '0', '<a href="mailto:sip%3A1006@192.168.1.104">sip:1006@192.168.1.104</a>', '<a href="mailto:sip%3A1005@192.168.1.104">sip:1005@192.168.1.104</a>', '', 'IAPP-Register', '', '', '0', '0')</span><br>
<br><br>I would appreciate any help on getting the radius accounting to work. <br><br>Thanks alot in advance.<br><br>Pete<br><br><br><br>