A call tracking application allows you to collect metrics about your phone calls so you can monitor their effectiveness and optimize marketing. Using Twilio, you can record every call as well as track information such as what number was dialed, what time of day it was dialed, the duration of the call, and the geographic location of the caller.
A twilio phone number is provisioned (see HowTo – Phone Number Search API) and its voice url is set to the “handle_incoming_call.php” script . When a call is made to that number, Twilio makes a request to your application’s voice url for instructions on how to handle the call. The call tracking application stores the information Twilio sends about the call in a database and then connects the incoming call to an operator’s phone. After the call to the operator is completed, Twilio makes another call to the application, which updates its database with the status of the 2nd leg of the call. And finally, if you want to deprovision a number used in a temporary call tracking campaign (and thereby no longer have to pay for it), please see this documentation.
This HowTo shows how to receive calls using Twilio, how to capture call information in a database, and how to use the TwiML <Dial> verb.