Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-05-01 Thread Maciej Bylica
] Miliseconds precision for accounting module ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-05-01 Thread ag
To: OpenSIPS users mailling listusers@lists.opensips.org Reply-To: OpenSIPS users mailling list users@lists.opensips.org Subject: Re: [OpenSIPS-Users] Miliseconds precision for accounting module ___ Users mailing list Users@lists.opensips.org http

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-27 Thread Maciej Bylica
Hello, ad1) I am just wondering why get_timestamp must be fired before has_totag part of the script? I've found some threads on discussion group describing the same thing, but without explaination. ad2) i have set following rule: if (is_method(INVITE) t_check_status(200) ) {

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-27 Thread ag
I am wondering if we can ever achieve nano second precision for accounting. Can we? Adrian On 27 Apr 2014, at 13:17, Maciej Bylica mb...@gazeta.pl wrote: Hello, ad1) I am just wondering why get_timestamp must be fired before has_totag part of the script? I've found some threads on

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-15 Thread Maciej Bylica
Hello, It works, but: 1) get_timestamp doesnt work inside has_totag section if (has_totag()) { if (loose_route()) { if (is_method(BYE)) { get_timestamp($avp(secbye),$avp(usecbye)); . . but works if called before that section 2)

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-14 Thread Vlad Paiu
Hello, Which OpenSIPS version are you using ? You could use get_timestamp [1] from the Core to get the current second and microsecond, and set the two variables at INVITE time, and set them as db_extra [2] . Then, at BYE time call again the get_timestamp function, store them in some AVPs and

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-14 Thread Maciej Bylica
Hi Vlad, Thanks for reply. I am using OpenSIPS (1.9.1-notls (x86_64/linux)) so get_timestamp is available there. Let me check this. Regards, Mac 2014-04-14 10:57 GMT+02:00 Vlad Paiu vladp...@opensips.org: Hello, Which OpenSIPS version are you using ? You could use get_timestamp [1] from

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-12 Thread Maciej Bylica
Hello Ryan, I am using dialog accounting, so each row is fully qualified cdr record, not only single transaction of a call. Couldn't i just use two extra db variables which will gather the $time inside INVITE {} and BYE {}? Thanks, Mac 2014-04-12 6:39 GMT+02:00 Ryan Mitchell r...@tcl.net:

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-11 Thread Maciej Bylica
Hi Ryan, Thanks for prompt reply. I am about to check this out. Mac. 2014-04-10 22:03 GMT+02:00 Ryan Mitchell r...@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

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-11 Thread Maciej Bylica
Ryan, One more question. Currently i have some db extra attrs setup. My acc table looks like following: ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra |

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-11 Thread Ryan Mitchell
Hello Mac, Each row in the acc table is for a transaction. To make a proper CDR out of the data, you have to combine rows to find the start and end of the call. That can be harder than it sounds, especially with forking (parallel, or the more common case of serial forking when you are LCR

[OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-10 Thread Maciej Bylica
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

Re: [OpenSIPS-Users] Miliseconds precision for accounting module

2014-04-10 Thread Ryan Mitchell
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 mb...@gazeta.pl wrote: Hello I just