1. Navigate to Phone Numbers and click “Buy a new number”, then search and choose a phone number you like (make sure it supports “Voice” capabilities, and not just SMS or Fax)

  2. Click on the Phone Number you’d like to manage and under “Configure > Voice & Fax” add a Webhook to the URL where you call-tracking.php will be publicly available (as seen below).

    Untitled.png

  3. Copy & replace the following values in call-tracking.php and clickToCall.php :

    Be sure you have replaced the following lines:

  4. Upload call-tracking.php and clickToCall.php to any LAMP server (make sure PHP is installed) and copy the official Twilio PHP Helper library (download from Github / install via Composer) into the same directory under ./Twilio/

  5. Now you can paste the HTML snippet in clickToCall-form.html anywhere online that you’d like to add click-to-call functionality 🎉 — simply update line 33 with your URL if needed.

  6. Voilà! You can test your click-to-call solution by calling your own numbers, and you should see your call activity appear under “Voice > Overview” in the Twilio Dashboard.

    <aside> ⚠️

    </aside>

    <aside> ⚠️

    Make sure you have paid to upgrade from a “Trial” account before testing — otherwise you can only call “Verified Numbers” and the Twilio trial message will always play.

    </aside>