Hi users,<br><br> I have been trying to use Freeradius using along with openser ,and with openser sampleconfig files , atlast I managed to recieve packets from openser.<br> <br> here the problem was , iam getting accounting packets
<span style="font-weight: bold;">duplicate </span>. that is when X called Y ----> in radacct table iam getting the following information <br> <br>"I am giving only some coloumns"<br>___________________________________________________________________________________
<br>radacctid | callingstationid | calledstationid | acctstarttime | acctstoptime | <br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------
<br> 10 | Y@ipaddress | X@ipaddress | 2006-07-24 10:23:06 | 2006-07-24 10:23:41|<br> 11 | Y@ipaddress | X@ipaddress | 2006-07-24 10:23:06 | 2006-07-24 10:23:41|
<br><br>This records are When "Y" called "X".......<br><br>Here Y called X and then Y stops the conversation and the accounting details are like above with "duplicate entries"<br><br><br>and below are accounting records when "Y" called "X" and " X " stops the conversation first.....
<br><br>radacctid | callingstationid |
calledstationid | acctstarttime |
acctstoptime | <br>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
12 | Y@ipaddress | X@ipaddress | 2006-07-24 10:23:06 | 0000-00-00 00:00:00|<br>
13 | Y@ipaddress | X@ipaddress | 2006-07-24 10:23:06 | 0000-00-00 00:00:00|<br> 14 | X@ipaddress | Y@ipaddress | 2006-07-24 10:23:58 | 2006-07-24 10:23:58 |
<br><br><br><br>So, here iam getting two duplicate entries with only account start time and one with acct stoptime but with calling stationid is going to called stationid <br><br>O.K eventhough Acctsessionid is same and is the key value:
<br><br>and i setflag(1) [accounting flag]<br><br>just before the looseroute section <br><br><br><br>route {<br><br> # -----------------------------------------------------------------<br> # Sanity Check Section<br>
# -----------------------------------------------------------------<br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483", "Too Many Hops");<br> break;<br> };
<br><br> if (msg:len > max_len) {<br> sl_send_reply("513", "Message Overflow");<br> break;<br> };<br><br> <br> <br><br><br> # -----------------------------------------------------------------
<br> # Record Route Section<br> # -----------------------------------------------------------------<br> if (method=="INVITE" && client_nat_test("3")) {<br> # INSERT YOUR IP ADDRESS HERE
<br> record_route_preset("<a href="http://81.21.34.37:5060">81.21.34.37:5060</a>;nat=yes");<br> } else if (method!="REGISTER") { <br> record_route();<br> };<br> <br> # -----------------------------------------------------------------
<br> # Call Tear Down Section<br> # -----------------------------------------------------------------<br> if (method=="BYE" || method=="CANCEL") {<br> end_media_session();<br> };<br>
<br> # -----------------------------------------------------------------<br> # Loose Route Section<br> # -----------------------------------------------------------------<br> <span style="font-weight: bold; font-style: italic; text-decoration: underline;">
setflag(1) ; </span> if (loose_route()) { <------------------------------------ {this is the place where i setflag after checking so many places }<br><br> if (has_totag() && (method=="INVITE" || method=="ACK")) {
<br> setflag(11);setflag(12);<br> if (client_nat_test("3") || search("^Route:.*;nat=yes")) {<br> setflag(6);<br> use_media_proxy();<br> };<br>
};<br><br> route(1);<br> break;<br> };<br><br>So please any body solve my problem so that i can get billing records properly <br>if not please specify a place to setting the accounting flag so that i dont get this "duplicate entries"
<br><br> I hope you guys will help me, <br> <span style="font-weight: bold;">Thank You.</span><br><br><br>regards,<br>
Ravi.<br>