[Serusers] SER + RADIUS Accounting
Lucas Aimaretto
lucas at cyneric.com
Mon Dec 27 19:56:10 CET 2004
Hi there list,
I've been looking around to make RADIUS work with ser ... And
succesfully got Authentication work just nice. Need a hand on
Authorization, but does not care about that as much as I do with
Accounting.
This is the problem, I can get the Acct-Start messeages when an INVITE
messege is received, but cannot get any Acct-Stop messege for any BYE or
CANCEL messege. Here goes my ser.cfg ...
[...]
# -- RADIUS ACC --
modparam("acc", "radius_config", "/etc/radiusclient.conf")
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 2)
modparam("acc", "log_level", 1)
[...]
route
{
[...]
if (method=="INVITE")
{
setflag(1);
acc_rad_request("200");
};
if (method=="BYE" || method=="CANCEL")
{
setflag(1);
acc_rad_request("200");
};
[...]
}
And here goes my RADIUS output for a call made from user 1992005 to user
1992001 ...
radrecv: Accounting Request from host c0a801fd code=4, id=89, length=248
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = Invite
User-Name = "1992005 at 192.168.1.253"
Calling-Station-Id = "sip:1992005 at 192.168.1.253:11005"
Called-Station-Id = "sip:1992001 at 192.168.1.253"
Sip-Translated-Request-URI = "sip:1992001 at 192.168.1.253"
Acct-Session-Id =
"CF8F4CE6-A085-413A-B2E1-CD70D396EBBD at 192.168.1.178"
Sip-To-Tag = "n/a"
Sip-From-Tag = "3735508357"
Sip-CSeq = "36572"
NAS-IP-Address = 192.168.1.253
NAS-Port-Id = 5060
Acct-Delay-Time = 0
Entro a rad_accounting
Entro a rad_accounting_sql
must_update_client_fst_ack=TRUE
Calling Corrected = 1992005
Called Corrected = 1992001
Entro a rad_send_reply
Sending Accounting Ack of id 89 to c0a801fd (nas linux)
( the previous output corresponds to the "RINGING" state .. Just before
the called user answers the phone )
radrecv: Accounting Request from host c0a801fd code=4, id=90, length=278
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = Invite
User-Name = "1992005 at 192.168.1.253"
Calling-Station-Id = "sip:1992005 at 192.168.1.253:11005"
Called-Station-Id = "sip:1992001 at 192.168.1.253"
Sip-Translated-Request-URI =
"sip:1992001 at 192.168.1.113:11001;user=phone"
Acct-Session-Id =
"CF8F4CE6-A085-413A-B2E1-CD70D396EBBD at 192.168.1.178"
Sip-To-Tag = "90d69e0f71f15064"
Sip-From-Tag = "3735508357"
Sip-CSeq = "36572"
NAS-IP-Address = 192.168.1.253
NAS-Port-Id = 5060
Acct-Delay-Time = 0
Entro a rad_accounting
Entro a rad_accounting_sql
must_update_client_fst_ack=TRUE
Calling Corrected = 1992005
Called Corrected = 1992001
Entro a rad_send_reply
Sending Accounting Ack of id 90 to c0a801fd (nas linux)
radrecv: Accounting Request from host c0a801fd code=4, id=91, length=278
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = Bye
User-Name = "1992005 at 192.168.1.253"
Calling-Station-Id = "sip:1992005 at 192.168.1.253:11005"
Called-Station-Id = "sip:1992001 at 192.168.1.253"
Sip-Translated-Request-URI =
"sip:1992001 at 192.168.1.113:11001;user=phone"
Acct-Session-Id =
"CF8F4CE6-A085-413A-B2E1-CD70D396EBBD at 192.168.1.178"
Sip-To-Tag = "90d69e0f71f15064"
Sip-From-Tag = "3735508357"
Sip-CSeq = "36572"
NAS-IP-Address = 192.168.1.253
NAS-Port-Id = 5060
Acct-Delay-Time = 0
Entro a rad_accounting
Entro a rad_accounting_sql
must_update_client_fst_ack=TRUE
Calling Corrected = 1992005
Called Corrected = 1992001
Entro a rad_send_reply
Sending Accounting Ack of id 91 to c0a801fd (nas linux)
( the previous output corresponds to when called user answer the phone.
According to my ser.cfg, at a BYE or CANCEL message an Acct-Stop should
be sent, but no stop messege is seen at the RADIUS output )
Any hint ?
Regards,
Lucas
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.5 - Release Date: 26/12/2004
More information about the sr-users
mailing list