[OpenSIPS-Users] Accounting: How to avoid a fraudulent BYE with lower CSeq?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Dec 19 15:21:03 CET 2008


Hi inaki,

Iñaki Baz Castillo wrote:
> I've received a solution in SIP-implementors that makes sense:
>
>   
>> The accounting should end when you received the BYE from your gateway.
>> Regardless if or what the client answers, you know that the gateway has ended
>> the media before it sends the BYE (it should).
>>
>> The other way around, you know the gateway will has ended the call if it sends
>> out the 200 OK for a BYE.
>>
>> You can only trust the gateway, so you can stop accounting if you receive a
>> BYE or a response on a BYE from your gateway, You shouldn't trust requests
>> and responses from clients, only from your gateway.
>>     
>
>
> I'll check if this behaviour is possible with OpenSIPS acc module (it
> requires doing the ACC for BYE when receiving the 200 OK).
>   
You can control this via the "failed_transaction_flag" = 
http://www.opensips.org/html/docs/modules/1.4.x/acc.html#id2500684

If direction is from GW, set the flag and account BYE disregarding the 
reply code; If direction is from client, do not set and acount BYE only 
if reply is 200 OK

Regards,
Bogdan




More information about the Users mailing list