[Users] acc_radius question
Daniel-Constantin Mierla
daniel at voice-system.ro
Sat Oct 14 20:24:19 CEST 2006
Hello,
On 10/11/06 17:08, Cseke Tamas wrote:
> Hi,
>
> i use both setfalg(x), and acc_rad_request
> i need accounting for INVITE, ACK (for INVITE), CANCEL, BYE
> it was working ubkess error, but now i try failed_transaction flag.
> Could you help me in some better solution,
> I need acc_rad_request becasue of i need invite accounting immediately
> - for set the call setuptime
> ack - for set the call connecttime
> bye - for disconnecttime
>
> So i done it this way:
> (config in question)
>
> modparam("acc", "radius_flag", 1)
> modparam("acc", "radius_missed_flag", 2)
> modparam("acc", "failed_transaction_flag", 4)
>
>
> if (is_method("ACK") || is_method("BYE")) {
use here:
if(is_method("ACK|BYE"))
it is better for performance.
You do not need to set failed_transaction_flag for ACK since it does not
get a reply, so cannot get in that situation.
You have to set report_ack and report_cancels parameters of acc module, see:
http://www.openser.org/docs/modules/1.1.x/acc.html
Cheers,
Daniel
> setflag(1);
> setflag(2);
> setflag(4);
> };
>
> # accounting requests
>
> if (is_method("INVITE")) {
> if (!radius_www_authorize("$rd")) {
> www_challenge("$rd", "0");
> exit;
> };
> acc_rad_request("200 Invite received...");
> consume_credentials();
> }
> else if (is_method("ACK")) {
> if (t_check_status("[4-6][0-9][0-9]")) {
> acc_rad_request("Failed");
> }
> else {
> acc_rad_request("200 Ack received...");
> };
> }
> else if (is_method("BYE")) {
> }
> else if (is_method("CANCEL")) {
> acc_rad_request("200 CANCEL received...");
> };
>
>
> Thanks,
> Tamas
>
>
> raviprakash sunkara wrote:
>
>> Can U send the Config
>>
>> U didn't set the flags properly in ur Config file
>> and
>> Don't use setflag("x");
>>
>> Use acc_rad_request("200");
>>
>> On 10/11/06, Cseke Tamas <cseke.tamas at eworldcom.hu> wrote:
>>
>>>
>>> Hi,
>>>
>>> When sends openser accounting packets for INVITE, and BYE message?
>>> it seems to be, when received 200 OK.
>>>
>>> 1)for INVITE i need radius packet immediately, not just when it was
>>> answered.
>>> 2)for BYE i need accounting packet, when any error occured too.
>>>
>>> modparam("acc", "radius_flag", 2)
>>>
>>> modparam("acc", "radius_missed_flag", 3)
>>>
>>> this attribute mean that, should sent radius packet, when any error
>>> occured too, isn't it? However openser don't send accounting packet in
>>> this case.
>>>
>>> i run into the following error:
>>>
>>> ##########
>>> T called -> openser
>>> BYE sip:21.16.8.92:5060
>>> ##
>>> T openser->called
>>> SIP/2.0 477 Unfortunately error on sending to next hop occurred
>>> (477/TM)
>>> ##########
>>> T caller->openser
>>> BYE sip:66610038641368254 at 21.16.8.90:5060;
>>> #####
>>> # openser -> caller
>>> SIP/2.0 481 Call Leg/Transaction Does Not Exist..
>>>
>>> So no 200 OK for BYE received, therefore no accounting packet to radius
>>> sent.
>>> How can i solve these problems?
>>>
>>> Btw, what could cause this 477 error?
>>>
>>> Thanks,
>>> Tamas
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>>
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list