[Serusers] radius accounting, duplicate rows and missing columns
Simone Cittadini
mymailforlists at gmail.com
Wed Aug 10 15:14:48 CEST 2005
I've this ser installation whose purpose in life is accounting all the
calls and redirecting them to asterisk, which routes them to ISDN or a
h323 GSM gateway.
SIP phones -> Ser -> Asterisk -> [isdn | gsm ]
all the calls are "from left to right", asterisk will never see incoming
stuff from the isdn/gsm channels
radius has mysql as backend, the calls works well but :
if the sip phone hangsup radius writes two identical lines in the
radacct table, missing the AcctSessionTime value (writes '0')
if the remote phone hangsup there are the same two lines and a third
line with caller and called inverted, and start and stop time with the
same value
Can someone tell me what's wrong with my route ? or I'm missing
something in radius configuration ?
some columns and lines from the radacct table
"RadAcctId","AcctSessionId","AcctUniqueId","UserName","AcctStartTime","AcctStopTime"
#these lines inserted if the caller hangsup first
49,"e7e71b1b-70eec1ee at 172.18.1.13","d9428a25afbfdf52","[sip
number]","2005-08-10 08:54:53","2005-08-10 08:54:58"
50,"e7e71b1b-70eec1ee at 172.18.1.13","d9428a25afbfdf52","[sip
number]","2005-08-10 08:54:53","2005-08-10 08:54:58"
#these if the called number hangsup
51,"72660925-e480d1a5 at 172.18.1.13","43e7c757d53c2970","[sip
number]","2005-08-10 08:57:10","2005-08-10 08:57:22"
52,"72660925-e480d1a5 at 172.18.1.13","43e7c757d53c2970","[sip
number]","2005-08-10 08:57:10","2005-08-10 08:57:22"
53,"72660925-e480d1a5 at 172.18.1.13","5b732c77e7e3f37d","[external
number]","2005-08-10 08:57:13","2005-08-10 08:57:13"
acc_radius paramethers :
modparam("acc", "radius_config", "/etc/radiusclient-ng/radiusclient.conf")
modparam("acc", "log_level", 2)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "radius_flag", 1)
routing configuration :
# initial sanity checks
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# registration (and authentication)
if (uri==myself) {
if (method=="REGISTER") {
if (!radius_www_authorize("")) {
www_challenge("", "0");
break;
};
save("location");
break;
};
lookup("aliases");
};
setflag(1);
if (method=="INVITE") record_route();
rewritehost("172.18.1.11");
if (!t_relay()) {
sl_reply_error();
};
More information about the sr-users
mailing list