So I have decided to make public the most useful SQL queries I have developed while dealing with FusionPBX. Please note that I am a MariaDB user, I have no intention to translate to PostgreSQL for free. Remember to change them to fit your specific needs.
So, again. In my last article related to how to work around the crappy surcharges some greedy carriers are imposing I describe how to extend the call to a minimum of 6 seconds when the caller hangs up first. This is very useful in a class-5 PBX, but it is not enough. Another surcharge that carriers are innovating is the cancellation ratio; you may get a surcharge if a certain percentage of your calls in a given period of time exceeds a threshold.
This is really difficult to avoid, for starters, think of a ring group that points to a mix of extensions and cellphone numbers (make it worst, some extensions have a call forward to cellphones). When a call arrives, all the endpoints and cellphones will ring; when someone answers every other call is cancelled rising right away your cancellation ratio. Also if you have a teenager you may know that they do not always answer the phone, 10 to 20 lost calls just to find out they forgot to they put it on mute.
Any of these possible scenarios or any other you may have rises your cancellation ratio, therefore your surcharges. I will describe a technique I have implemented in the next LCR for FusionPBX 1.3.0 release.
This could be wrong or could be right. I do not know, but what I have seen is that since the COVID-19 pandemic started, businesses have been struggling with how to get the income. Sadly, some indispensable businesses know their status and they have started to impose new fees. The telecommunication industry is no exception; since November 2020 at some point, carriers started to apply a short call policy with a fee. If the policy already existed and not enforced, I can't tell, but what I can is the charge. If you ask one of them why the charge, they will answer they try to stop dialers. Again, nobody can tell if this is the real reason.
Fortunately, a short call definition for everybody is any answered call that is six or fewer seconds in length. When a call is terminated (outgoing call made), if the callee answers and the call is hung up before 6 seconds, the fee applies. There are two possible scenarios: