[OpenSIPS-Users] CDR Accounting
Dave Singer
dave.singer at wideideas.com
Mon Jan 24 21:47:48 CET 2011
Thanks for that clarification!
So just to be sure I'm clear on this. $Ts rounds down ( truncates ) the
current second. So using $avp(s:start_time) = $Ts.$Tsm; would give something
like "12343253.543233" and always be accurate?
Further (standard ACC [without dialog]) you could just put $Tsm in the
db_extras as an extra column and then use the tool you are using to created
cdrs from the acc table to take the column with the $Tsm value into account
when calculating duration, ringtime, etc.
To get these numbers with the new CDR feature, you would have to store a
dialog variable like $dlg_val("start") = "$Ts.$Tsm" at start
and $dlg_val("answered") = "$Ts.$Tsm" at answer and at the end of the call
add them db_extras along with $Ts.$Tsm for the end of the call. You would
then want to go off of those numbers rather than what the acc module
automatically put in the db.
The disadvantage would be having duplicate columns for start/answer/end
times but you would still have the benefit of not having to have an external
process building cdrs from acc table matching up BYEs to INVITES, etc.
Calculating the durations in opensips would be tricky since it does not work
with non integers. But you could do that easily with a sql trigger on the
record insert.
Does this sound right?
Thanks
Dave
On Thu, Jan 20, 2011 at 4:54 AM, Anca Vamanu <anca at opensips.org> wrote:
> On 01/19/2011 09:31 PM, a.zagorskiy at oyster-telecom.ru wrote:
>
>> It was my conversation, and I told about
>> 1) $Tsm is MICROseconds (6 digits)
>> 2) It is microseconds of a current second.
>>
>> Yes, that's true. I fixed it in documentation also.
>
> --
> Anca Vamanu
> www.voice-system.ro
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110124/a3301fa3/attachment.htm>
More information about the Users
mailing list