[Users] acc_radius question

Cseke Tamas cseke.tamas at eworldcom.hu
Wed Oct 11 16:08:34 CEST 2006


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")) {
       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
>>
>
>
>





More information about the Users mailing list