It’s Thursday again, and I’m looking back on another project from days gone by.
Following on from a decision not to renew our QueueMetrics license to monitor our call volume over Asterisk, we were left in a bit of a pickle. Numerous calls were coming in but managers could not gauge the volume and in times of an outage this was a serious problem when it came to breaks and assigning overtime.
Luckily, Python comes to the rescue with the py-asterisk library that talks to the Asterisk API.
“Import all the things!” Python
The design was quite simple, a small Python application that talks to the Asterisk API and returns JSON over HTTP. We then had a small HTML page with jQuery performing AJAX GET to this small server.
Voilla, Hacktrix*. Tiny call monitor.
Then for a sneaky added bonus (running on my desktop)… Caller ID! Basically looking up the number in a dictionary and returning the company name.