If you’re someone who didn’t implement our 4 quick ways to help stay safe from VoIP fraud at Christmas and you were not one of the unfortunate ones who was attacked, you perhaps haven’t implemented the other myriad of features we offer to help protect you from expensive Toll Fraud.
We therefore set about today to create a couple of demos that could form the basis of your own monitoring and alerting. These are in PHP and hook directly into our API to leverage our ‘calls in progress’ data.
For those who aren’t familiar with this, we bill every customer call pretty much every second, and we expose that data through the API. This enables you to monitor for activity on your account that doesn’t fit your normal business pattern. Of course, we’ll alert you if a call is to a known bad number or your other thresholds are breached, but what about calls that actually get through? This enables you to see real-time where you are spending money, before the call concludes, and drive your own business logic.
The first example simply calls the API and visualises the data both in a Google GeoChart and a sorted table. This might be the basis of something interesting for your NOC wall!
The second example is far more what we envisaged for this end-point – a simple query to get calls in progress which is then iterated over, applying your own business logic. It may be normal for you to have large volumes of calls to a particular country, it may not. Here you can set your own simple rules by country and alert accordingly!
These took no more than 20 minutes together to write and should take far less for you to adapt and put to work. We hope they may encourage you to investigate the extensive features in our API and, more importantly, to sleep better at night!
As always, keep in mind you’re responsible for the traffic you send us and any measures we offer to protect you are best efforts and can only apply to traffic you send to us alone – if we reject a call and you then send it to another carrier, it was all in vain.
Both the example scripts above can be found on GitHub at https://github.com/simwood/simwood-api-examples and are available for download directly below;
- simwood_map.php – Visualise your current traffic on a world map
- simwood_alert.php – A basic template for alerting using our API