[SR-Users] Event when acc is written?

Tobias the_fx at hotmail.com
Wed Jan 25 11:32:48 CET 2017


Hi Sebastian,


Thanks, that's what I would like to avoid =)


/Tobias


________________________________
From: sr-users <sr-users-bounces at lists.sip-router.org> on behalf of Sebastian Damm <damm at sipgate.de>
Sent: Wednesday, January 25, 2017 9:47 AM
To: Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Event when acc is written?

Hi,

On Wed, Jan 25, 2017 at 9:26 AM, Daniel-Constantin Mierla <miconda at gmail.com<mailto:miconda at gmail.com>> wrote:
To some extent you may be able to do it in configuration file by replacing the acc default behaviour with sqlops. The records are written by mysql when 200ok is received (which can be caught via an onreply_route) or a final negative response is handled (which can be caught via a failure_route). There you can use acc_db_request() to write the record to database and then sqlops to retrieve the ID. Just an idea by now, but it seems to be doable ...

Be careful with own-built accounting. We did this on a system once, and you really have to make sure you account the correct reply. For instance if the call is forked by kamailio, you might get a 486 from one device and later a 200 OK from the other one. If you only take the first reply, you might end up with wrong call state.

Regards,
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170125/d75da80c/attachment.html>


More information about the sr-users mailing list