Building a call log plugin
This is a basic plugin that is a good starting point for you.
We're going to build a call log that will add a menu option to the side menu and, when clicked, will show us recent calls.
Getting ready
The complete source code for this recipe can be found in Chapter10/Recipe1
in the source code for this book.
How to do it…
We're going to build a basic call logging system. This will give us a call log on the menu of our OpenVBX install, which we can then use to view account usage. The following are the steps you will need to perform:
Create a folder in your
plugins
folder, and name itcalllog
.Create a file named
plugin.json
and write in the following code:{ "name" : "Call Log", "description" : "This displays a list of all the calls and sms that have been made or received.", "links" : [{ "menu" : "Call Log", "url" : "call_log", "script" : "call_log.php", "label" : "Call Log" }] }
Create a file named
call_log.php
and write in the following code:<...