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

Iñaki Baz Castillo ibc at aliax.net
Thu Dec 18 16:03:39 CET 2008


2008/12/18 Andreas Granig <agranig at sipwise.com>:

>> Yes, but it doesn't explain how to do the accounting when receiving
>> the 200 OK for the BYE.
>>
>>
>
> Uh, well... register a new failure route and don't set the flag for
> automatic accounting when receiving the BYE, and in your failure route, do
> something like
>
> if($T_reply_code == 200 || $T_reply_code == 481)
> # or whatever you want to account
> {
>  acc_db_request("something", "acc");
> }
>
> Or am I missing something?

Well, failure_route will not be called when receiving a 200 OK in this
BYE transaction.
failure_route is  only invoked for [3456]XX responses. 200 can only be
handled in on_reply_route, but I don't know if acc flag can be set in
on_reply_route.


-- 
Iñaki Baz Castillo
<ibc at aliax.net>


More information about the sr-users mailing list