[Freeswitch-users] Canceling sched_hangup and UUID lookup
danb.lists at gmail.com
Sat Jan 3 11:48:12 MSK 2015
Interesting approach you are trying to take.
I see however some scalability issues. Unless you are planning to build
an office PBX (for which mod_nibblebill should do just fine) and want to
go for a more scalable solution, you will be forced to send calls
belonging to the same account always to the same node in order to keep
the billing for them.
Regarding your float64 comments, you are right about trying to avoid
them but there it depends on the operations you are doing on the numbers
(eg: sum/multiply vs divide).
Here is how we solved in CGRateS the issues you are facing:
* Each call started will have the global session timeout set on call
setup stage (same as you planned it). This is more like security for
your call timeout.
* We keep an external component responsible for call management and
timeout corrections. The timeouts will be recalculated inside external
component and if it will be necessary, the sessions will be killed via
ESL. This solves another issue you did not cover yet: if you are billing
units in advance, you can also refund non-used units at the call end.
* On the float issue, we are passing all the calculations through a
special object which does the rounding where needed, eliminating the
float issues with calculations. So far we could not find a case failing,
although we considered initially converting currencies internally to
huge-INTs and perform all the operations there (this would force us
using always same unit of currency - which we were trying to avoid).
Hope it helps!
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users