Hello,
the two start events are very likely to be INVITE and the ACK, please
check the method type. You can safely use either of them, the time
difference between them is insignificant.
calling and called station ID are changed because the called party was
hanging up first, therefore it was considered the origin (calling party)
of the stop event.
See detect_direction parameter of acc module:
http://www.openser.org/docs/modules/1.1.x/acc.html#AEN625
This link may help as well:
http://www.openser.org/docs/openser-radius-1.0.x.html
Cheers,
Daniel
On 07/24/06 10:42, ravi reddy wrote:
Hi users,
I have been trying to use Freeradius using along with
openser ,and with openser sampleconfig files , atlast I managed to
recieve packets from openser.
here the problem was , iam getting accounting packets duplicate .
that is when X called Y ----> in radacct table iam getting the
following information
"I am giving only some coloumns"
___________________________________________________________________________________
radacctid | callingstationid |
calledstationid | acctstarttime |
acctstoptime |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
10 | Y@ipaddress |
X@ipaddress | 2006-07-24 10:23:06 | 2006-07-24 10:23:41|
11 | Y@ipaddress |
X@ipaddress | 2006-07-24 10:23:06 | 2006-07-24 10:23:41|
This records are When "Y" called "X".......
Here Y called X and then Y stops the conversation and the accounting
details are like above with "duplicate entries"
and below are accounting records when "Y" called "X" and " X
" stops
the conversation first.....
radacctid | callingstationid |
calledstationid | acctstarttime |
acctstoptime |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
12 | Y@ipaddress |
X@ipaddress | 2006-07-24 10:23:06 | 0000-00-00 00:00:00|
13 | Y@ipaddress |
X@ipaddress | 2006-07-24 10:23:06 | 0000-00-00 00:00:00|
14 | X@ipaddress |
Y@ipaddress | 2006-07-24 10:23:58 | 2006-07-24 10:23:58 |
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
O.K eventhough Acctsessionid is same and is the key value:
and i setflag(1) [accounting flag]
just before the looseroute section
route {
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
break;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
break;
};
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("81.21.34.37:5060
<http://81.21.34.37:5060>;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
# -----------------------------------------------------------------
# Call Tear Down Section
# -----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
setflag(1) ; if (loose_route())
{
<------------------------------------ {this is the place where i
setflag after checking so many places }
if (has_totag() && (method=="INVITE" ||
method=="ACK")) {
setflag(11);setflag(12);
if (client_nat_test("3") || search("^Route:.*;nat=yes"))
{
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
So please any body solve my problem so that i can get billing records
properly
if not please specify a place to setting the accounting flag so that i
dont get this "duplicate entries"
I hope you guys will help me,
Thank You.
regards,
Ravi.
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users