[Serusers] Radius Acc
Carlos Mauricio
mauricio at voip.nce.ufrj.br
Tue Jan 4 18:10:36 CET 2005
Hi,
SER and freeradius should be installed in the same host, for acc or auth?
regards,
Carlos
----- Original Message -----
From: "Lucas Aimaretto" <lucas at cyneric.com>
To: <o-zone at zerozone.it>; <serusers at lists.iptel.org>
Sent: Tuesday, January 04, 2005 1:29 PM
Subject: RE: [Serusers] Radius Acc
>> > Hi there. I've a question for you. Are you getting correctly the
>> > Acct-Stop records ? .... if so, how did you configure your ser.cfg,
>> > because I'm only getting Acct-Start records, for both
>> INVITE and BYE
>> > messages.
>>
>> I've solved using setflag(1) after route {, in this way:
>>
>> [....CUT....]
>> # -- rr params --
>> # add value to ;lr param to make some broken UAs happy
>> modparam("rr", "enable_full_lr", 1) modparam("acc",
>> "radius_flag", 1) modparam("acc", "radius_missed_flag", 3)
>>
>> # ------------------------- request routing logic -------------------
>>
>> # main routing logic
>>
>> route{
>> setflag(1);
>> if (method=="REGISTER")
>> log(1, "REGISTER message received\n");
>>
>> if (method=="INVITE")
>> log(1, "INVITE message received\n");
>>
>> if (method=="ACK")
>> log(1, "ACK message received\n");
>>
>> if (method=="BYE")
>> log(1, "BYE message received\n");
>> [...CUT...]
>
> Thanx for answering ... but your configuration did not help me at all.
> Look at my ser.cfg ...
>
> # -- RADIUS ACC --
> modparam("acc", "radius_config", "/etc/radiusclient.conf")
> modparam("acc", "radius_flag", 1)
> modparam("acc", "radius_missed_flag", 3)
> modparam("acc", "log_level", 2)
>
> route{
>
> 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;
> };
> record_route();
> if (loose_route())
> {
> t_relay();
> break;
> };
>
> if (uri==myself)
> {
> setflag(1);
> if (method=="REGISTER")
> {
> log(1, "REGISTER message received\n");
> if (!radius_www_authorize(""))
> {
> www_challenge("", "0");
> break;
> };
> save("location");
> break;
> };
>
> if (method=="INVITE")
> {
> log(1, "INVITE message received\n");
> };
>
> if (method=="ACK")
> {
> log(1, "ACK message received\n");
> };
> };
>
> t_relay();
>
>
> .... with this configuration ... I'm getting this Radius Output ...
>
> radrecv: Accounting Request from host c0a801fd code=4, id=216,
> 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 =
> "3F8FDBB3-E77D-4039-BE70-E89912A026E0 at 192.168.1.178"
> Sip-To-Tag = "e711b276be6653cb"
> Sip-From-Tag = "2604456034"
> Sip-CSeq = "19560"
> NAS-IP-Address = 192.168.1.253
> NAS-Port-Id = 5060
> Acct-Delay-Time = 0
> Sending Accounting Ack of id 216 to c0a801fd (nas linux)
>
> radrecv: Accounting Request from host c0a801fd code=4, id=217,
> 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 =
> "3F8FDBB3-E77D-4039-BE70-E89912A026E0 at 192.168.1.178"
> Sip-To-Tag = "e711b276be6653cb"
> Sip-From-Tag = "2604456034"
> Sip-CSeq = "19560"
> NAS-IP-Address = 192.168.1.253
> NAS-Port-Id = 5060
> Acct-Delay-Time = 0
> Sending Accounting Ack of id 217 to c0a801fd (nas linux)
>
> Do you see ? ... first output corresponds to an INVITE message, and so
> an Acct-Start message is received. But, instantly, just after receiving
> the INVITE message, I get a BYE message, but it also corresponds to an
> Acct-Start message. I do not understand 2 things:
> 1) Why am I receiving both messages instantly and ..
> 2) Why the BYE message corresponds to an Acct-Start message.
> Should not it be an Acct-Stop message ?
>
> I just want to get an Acct-Stop message when Sip-Method == BYE or
> CANCEL. But I can not achieve that. I've tried configuring ser like this
> ...
>
> if (method=="BYE" || method=="CANCEL")
> {
> setflag(1);
> };
>
> ... but the results where just the same.
>
> I've been posting this problem many times but no one could answer to me.
> I just see some posts telling that people could do accounting but their
> configuration files are just the same as mine ... anyways ... if you
> have any hint, I'll really apreaciate it.
>
> Regards,
>
> Lucas
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.296 / Virus Database: 265.6.7 - Release Date: 30/12/2004
>
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
More information about the sr-users
mailing list