POSSA / freepbx-trunk-balancing

Restrict outbound calls or balance calls over multiple trunks based on user specified parameters
http://pbxossa.org/files/trunkbalance/
37 stars 30 forks source link

Billing Period count Reset #13

Closed taphawane closed 11 years ago

taphawane commented 11 years ago

I am using version 1.0.2. I don't know if this is a issue or a misunderstanding of the module. I have setup Max. Different Calls, which is working great, in the Billing Period, I enter 1, this mean the call call will goes to zero every day.at Midnight I checked if the call count will get reset to zero, I find the same number call. May I have miss something, I suppose If Billing Period is set to 1 its will be reset every midnight as a new day come.

Is that a issue or I miss something?

lgaetz commented 11 years ago

Billing Period is the floating day count starting at the time of the incoming call. If the billing period is set to 1, it will count all outbound calls that have come in 24 hours before the call being evaluated.

If you need a daily counter that resets as a specific time of day, I don't see a way to do this with the module as it is currently written. Describe exactly how you would expect such a feature to work and I will see how difficult it would be to program.

taphawane commented 11 years ago

May me I don't understand the function of the module, if something is counting something for any period it's suppose to do something when that period of time is reach.

Example if a provider give you 2000 minutes to call each month, I understand, when those 2000 minutes has been reach within that month any other calls will fail right? My question is, what does the module do after 30 days as its already a month?

taphawane commented 11 years ago

can you help, I want to know if it is possible to reset the max different number count

lgaetz commented 11 years ago

If you configure a balanced trunk with the 'Billing Day' set to 4, then it will count calls for a month, resetting at midnight on the 4th of each month. If you set the 'Billing Period' to 4, it looks in your call history over the last 4 days from the time that the outbound call is being made, that is what is meant by floating.

If you want to set up trunks such that the counter is reset daily at midnight or weekly on Sunday or some such pattern, it is not currently possible to do that. If you need a new feature, please describe exactly how you expect it to work (like I requested above) and I will investigate.

taphawane commented 11 years ago

Thank you. Now, I understand how its works, I want calls count to get reset each month, I was testing the module now my trunks have some call count, I want go to production, I want reset everything and start do the real count. So now If I set the Billing Day to 14th, does that going to reset this month, or next month in the 14th. If that have to wait next month, Do you anything that I can do to rest it manually?

lgaetz commented 11 years ago

Set Billing day to 14 and it should reset every month on the 14th

lgaetz commented 11 years ago

Do you anything that I can do to rest it [the count] manually?

The count of the calls is taken from the CDR database. There is no counter as such, just a an analysis of the call history based on queries of the database. In order to reset anything you would have to delete calls from the CDR database.

taphawane commented 11 years ago

Thank you, all the calls have been reset last midnight, Because I set Billing Day at 14th. Thank you for all your time and help.