[OpenSIPS-Users] Miliseconds precision for accounting module
Maciej Bylica
mbsip at gazeta.pl
Fri Apr 11 19:06:51 CEST 2014
Ryan,
One more question.
Currently i have some db extra attrs setup. My acc table looks like
following:
+------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| method | char(16) | NO | | | |
| from_tag | char(64) | NO | | | |
| to_tag | char(64) | NO | | | |
| callid | char(64) | NO | MUL | | |
| sip_code | char(3) | NO | | | |
| sip_reason | char(32) | NO | | | |
| time | datetime | NO | | NULL | |
| duration | int(11) unsigned | NO | | 0 | |
| setuptime | int(11) unsigned | NO | | 0 | |
| SourceAddr | char(30) | NO | | NULL | |
| DestAddr | char(30) | NO | | NULL | |
| Anum | char(30) | NO | | NULL | |
| Bnum_rU | char(30) | NO | | NULL | |
| Bnum_tU | char(30) | NO | | NULL | |
| created | datetime | YES | | NULL | |
+------------+------------------+------+-----+---------+----------------+
modparam("acc", "db_extra", "SourceAddr=$si; DestAddr=$rd; Anum=$fU;
Bnum_rU=$rU; Bnum_tU=$tU")
Now using additional data like $time will give me the exact moment the call
is ended, nothing more, am i right?
To have detailed call duration i need to know exact answer and disconnect
timestamps.
Btw: i am using OpenSIPS (1.9.1-notls (x86_64/linux))
Thanks,
Mac
2014-04-10 22:03 GMT+02:00 Ryan Mitchell <rjm at tcl.net>:
> Using db_extra to stuff custom data into your acc table, use the $time var
> with a format such as "%s.%N" or similar.
>
> Or, as you suggested, do it on the database level with a trigger or
> auto-update column.
>
>
>
> On Thu, Apr 10, 2014 at 10:01 AM, Maciej Bylica <mbsip at gazeta.pl> wrote:
>
>> Hello
>>
>> I just want to know how to achieve miliseconds precision for accounting
>> module.
>> This is quite important while trying to sum up total traffic duration
>> with the accuracy of hundred of ms.
>>
>> As i see there is no rounding feature implemented as well, but heaving ms
>> precision it could be done directly on DB level.
>>
>> Could somebody give me a hand.
>>
>> Thanks in advanced
>> Mac
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Ryan Mitchell <rjm at tcl.net>
> Telecom Logic, LLC
>
>
> _______________________________________________
> 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/20140411/1ab46234/attachment.htm>
More information about the Users
mailing list