Hello all! Help please with billsec variable, how to it calculate? In my accounting store I have a sets: billsec; billmsec 7 7820 7 7360 33 33360 38 38020 59 58900 26 25840 87 86400 How to calculate billsec? What algorithm is used for round billmsec? P.S.: Sorry for my English.
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code. On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
if remainder is 4 or plus. On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
7 7820 ???? On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
yes. it's crazy сб, 13 апр. 2019 г. в 06:23, Giovanni Maruzzelli <gmaruzz@gmail.com>:
7 7820 ????
On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Morfair (OP), can you please double check you actually got crazy roundings like 7 7820? -giovanni On Sat, Apr 13, 2019 at 10:29 PM Михаил Калинин <morfair@gmail.com> wrote:
yes. it's crazy
сб, 13 апр. 2019 г. в 06:23, Giovanni Maruzzelli <gmaruzz@gmail.com>:
7 7820 ????
On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
If you really want your code to act like the big boys you always ceiling to the second or bill increment… using whole numbers for example, 60/60 (1 minute increments like that cell phone companies) 0-60 is the first minute, 61 seconds, that’s 2 minutes… When you are dealing ms level counters, 0-60.000 is first minute, 60.001-120.000 is the second minute. Doesn’t matter that you are only .001 over the 60 seconds you are into the next minute already… From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> On Behalf Of Giovanni Maruzzelli Sent: Saturday, April 13, 2019 4:41 PM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] billmsec and billsec round Morfair (OP), can you please double check you actually got crazy roundings like 7 7820? -giovanni On Sat, Apr 13, 2019 at 10:29 PM Михаил Калинин <morfair@gmail.com <mailto:morfair@gmail.com> > wrote: yes. it's crazy сб, 13 апр. 2019 г. в 06:23, Giovanni Maruzzelli <gmaruzz@gmail.com <mailto:gmaruzz@gmail.com> >: 7 7820 ???? On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com <mailto:imfanee@gmail.com> > wrote: if remainder is 4 or plus. On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com <mailto:gmaruzz@gmail.com> > wrote: On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com <mailto:imfanee@gmail.com> > wrote: It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code. Maybe you have not paid attention to the example given... On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <mailto:morfair@gmail.com> <morfair@gmail.com <mailto:morfair@gmail.com> > wrote: Hello all! Help please with billsec variable, how to it calculate? In my accounting store I have a sets: billsec; billmsec 7 7820 7 7360 33 33360 38 38020 59 58900 26 25840 87 86400 How to calculate billsec? What algorithm is used for round billmsec? P.S.: Sorry for my English. _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com -- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
Ciao Ken! yep, I'm totally with you in ceiling to the next unit if you do your billing. But the OP seems to have inconsistent roundings of the vars expressed in millisec vs sec I tend to think probably the OP was not actually having those rounding errs, maybe he just miscopied things... On Sun, Apr 14, 2019 at 12:04 AM Ken Rice <krice@freeswitch.org> wrote:
If you really want your code to act like the big boys you always ceiling to the second or bill increment… using whole numbers for example, 60/60 (1 minute increments like that cell phone companies) 0-60 is the first minute, 61 seconds, that’s 2 minutes…
When you are dealing ms level counters, 0-60.000 is first minute, 60.001-120.000 is the second minute. Doesn’t matter that you are only .001 over the 60 seconds you are into the next minute already…
*From:* FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> *On Behalf Of *Giovanni Maruzzelli *Sent:* Saturday, April 13, 2019 4:41 PM *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Subject:* Re: [Freeswitch-users] billmsec and billsec round
Morfair (OP),
can you please double check you actually got crazy roundings like 7 7820?
-giovanni
On Sat, Apr 13, 2019 at 10:29 PM Михаил Калинин <morfair@gmail.com> wrote:
yes. it's crazy
сб, 13 апр. 2019 г. в 06:23, Giovanni Maruzzelli <gmaruzz@gmail.com>:
7 7820 ????
On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
--
Sincerely,
Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18 _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
I repeat, that it's right example!! 7 7820 More strange examples: 125 124740 38 38020 119 119500 65 64320 etc... 14.04.2019 01:43, Giovanni Maruzzelli пишет:
Ciao Ken!
yep, I'm totally with you in ceiling to the next unit if you do your billing.
But the OP seems to have inconsistent roundings of the vars expressed in millisec vs sec I tend to think probably the OP was not actually having those rounding errs, maybe he just miscopied things...
On Sun, Apr 14, 2019 at 12:04 AM Ken Rice <krice@freeswitch.org <mailto:krice@freeswitch.org>> wrote:
If you really want your code to act like the big boys you always ceiling to the second or bill increment… using whole numbers for example, 60/60 (1 minute increments like that cell phone companies) 0-60 is the first minute, 61 seconds, that’s 2 minutes…
When you are dealing ms level counters, 0-60.000 is first minute, 60.001-120.000 is the second minute. Doesn’t matter that you are only .001 over the 60 seconds you are into the next minute already…
*From:* FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org <mailto:freeswitch-users-bounces@lists.freeswitch.org>> *On Behalf Of *Giovanni Maruzzelli *Sent:* Saturday, April 13, 2019 4:41 PM *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org <mailto:freeswitch-users@lists.freeswitch.org>> *Subject:* Re: [Freeswitch-users] billmsec and billsec round
Morfair (OP),
can you please double check you actually got crazy roundings like 7 7820?
-giovanni
On Sat, Apr 13, 2019 at 10:29 PM Михаил Калинин <morfair@gmail.com <mailto:morfair@gmail.com>> wrote:
yes. it's crazy
сб, 13 апр. 2019 г. в 06:23, Giovanni Maruzzelli <gmaruzz@gmail.com <mailto:gmaruzz@gmail.com>>:
7 7820 ????
On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com <mailto:imfanee@gmail.com>> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com <mailto:gmaruzz@gmail.com>> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com <mailto:imfanee@gmail.com>> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <mailto:morfair@gmail.com> <morfair@gmail.com <mailto:morfair@gmail.com>> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
--
Sincerely,
Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Sincerely,
Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
yes!! it's really!! I have more other rows with wrong round. 14.04.2019 00:41, Giovanni Maruzzelli пишет:
Morfair (OP),
can you please double check you actually got crazy roundings like 7 7820?
-giovanni
On Sat, Apr 13, 2019 at 10:29 PM Михаил Калинин <morfair@gmail.com <mailto:morfair@gmail.com>> wrote:
yes. it's crazy
сб, 13 апр. 2019 г. в 06:23, Giovanni Maruzzelli <gmaruzz@gmail.com <mailto:gmaruzz@gmail.com>>:
7 7820 ????
On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com <mailto:imfanee@gmail.com>> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com <mailto:gmaruzz@gmail.com>> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com <mailto:imfanee@gmail.com>> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <mailto:morfair@gmail.com> <morfair@gmail.com <mailto:morfair@gmail.com>> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com <mailto:sales@freeswitch.com> https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Sincerely,
Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Wow weird examples. I take billmsec/1000 and always round up when billing customers. On Sat, Apr 13, 2019, 6:14 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
7 7820 ????
On Sat, Apr 13, 2019, 04:06 Faisal Hanif <imfanee@gmail.com> wrote:
if remainder is 4 or plus.
On Sat, Apr 13, 2019, 6:59 AM Giovanni Maruzzelli <gmaruzz@gmail.com> wrote:
On Sat, Apr 13, 2019, 03:26 Faisal Hanif <imfanee@gmail.com> wrote:
It simply dividing billmsec by 1000 and then rounding it by general math rule so ideally you can use billsec for billing but if you need more precision you can use billmsec and decide by 1000 by your code.
Maybe you have not paid attention to the example given...
On Sat, Apr 13, 2019, 3:37 AM morfair@gmail.com <morfair@gmail.com> wrote:
Hello all!
Help please with billsec variable, how to it calculate? In my accounting store I have a sets:
billsec; billmsec
7 7820
7 7360
33 33360
38 38020
59 58900
26 25840
87 86400
How to calculate billsec? What algorithm is used for round billmsec?
P.S.: Sorry for my English.
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi. I faced a similar issue, due to the billsec variable. I started using the variable billusec, which doesn't make any rounds and lets me do the rounding myself. So I use a function to divide the billusec by 1000000 and then ceil the result. Hope it helps. ________________________________ From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> on behalf of morfair@gmail.com <morfair@gmail.com> Sent: Friday, April 12, 2019 7:26 AM To: FreeSWITCH Users Help Subject: [Freeswitch-users] billmsec and billsec round Hello all! Help please with billsec variable, how to it calculate? In my accounting store I have a sets: billsec; billmsec 7 7820 7 7360 33 33360 38 38020 59 58900 26 25840 87 86400 How to calculate billsec? What algorithm is used for round billmsec? P.S.: Sorry for my English. _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
participants (7)
-
Avi Marcus
-
Caio Assis
-
Faisal Hanif
-
Giovanni Maruzzelli
-
Ken Rice
-
morfair@gmail.com
-
Михаил Калинин