[OpenSIPS-Devel] Manual Account Function for failure_route

Ryan Bullock rrb3942 at gmail.com
Thu Feb 16 23:13:33 CET 2012


I would like to create a manual accounting function for use in
failure_route that would act similiar to the current acc_db_request
function in the acc module, but would use the current/winning reply
sip code and reason. The simplest way to accomplish this seems to be
to make a modified w_acc_db_request, and to also pass along the reply
in the call to acc_db_request. However I don't know how I would be
able to get a copy of the current reply. Is their a way to accomplish
this, or is this the wrong approach?

The reason I am looking to do this is for tracking
pdd/deadair/response times while using cdr accounting. With the old
style accounting I could find this just by comparing the time of the
invite to the time of the response (eg 487 for a cancel with no
18[03]), however with CDR accounting this does not work. Instead we
have a variable to track pdd, the problem is that this variable is
taken from the request, so even if I update it in my failure route the
incorrect value is accounted. Therefore I would like to manually
account these responses after I have updated the pdd tracking
variable. Preserving the sip_code and sip_reason fields in our
database are important for reporting purposes, which rules out just
using acc_db_request and a stuffing it all in the 'comment'.

Any Ideas?

Regards,

Ryan Bullock



More information about the Devel mailing list