[OpenSIPS-Users] accounting BYE

Alex Balashov abalashov at evaristesys.com
Fri Jul 17 12:20:49 CEST 2009


Jan,

You could set an AVP or a branch parameter.  Those persist for the
lifetime of a transaction.  Since subsequent BYEs are retransmissions
within the same transaction, you should be able to check if an AVP or
branch flag indicating that the BYE has already been accounted is set
before running the database command.

You could also dampen out the BYE retransmissions using t_check_trans().

Any reason you don't want to wait for 200 OK before cutting the CDR?

-- Alex


>
> I have a problem with accounting the BYE in my mysql database (acc table).
>
> Sometimes a BYE is sent more than one time, or sometimes the other site
> does
> not respond with an O.K. on the BYE.
>
> Here is a peace of my config (example):
>
> if(loose_route())
> {
> ...
> if(is_method("BYE"))
> {
> #setflag(25); # account successful transactions
> acc_db_request("200 OK", "acc");
> }
> ...
> }
>
> If I use the flag (in my case flag 25) and the other site does not respond
> the BYE is not accounted. So I tried to use the acc_db_request. This works
> also without the O.K., but is a BYE is sent twice or more I end up with a
> lot of BYE's in my database.
>
> I tried setting a flag, bflag after the acc_db_request but this did not
> help.
>
> Is there a way to account a BYE without an O.K. only one time?
>
> Jan
>
>
>
> --
> View this message in context:
> http://n2.nabble.com/accounting-BYE-tp3274605p3274605.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775





More information about the Users mailing list