Iñaki Baz Castillo wrote:
2008/12/18 Andreas Granig
<agranig(a)sipwise.com>om>:
Iñaki Baz Castillo wrote:
Stop
accounting:
1) On 200 OK (or maybe 481 or other response) from the gateway in
response to
a BYE.
2) On BYE from the gateway
Is it feasible with the acc module? Can the acc be
stoped depending on
the response? is it valid to set the acc flag in on_reply_route?
You could do it manually by checking $T_reply_code and using
acc_db_request() from a failure route.
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?
Andreas