Allowing outgoing phone calls
We've given users the ability to handle incoming calls. Now let's give them the ability to call people back from their account.
In index.php
, we displayed a link on each phone number that lets the user use the "Click-to-Call" feature. Now, let's build up on this recipe.
Getting ready
The complete source code for this recipe can be found in the Chapter9/Recipe6
folder in the source code for this book.
How to do it...
Once we're finished, we'll be able to click any phone number and make an outgoing call. This call will first call us and then the phone number we clicked on. Perform the following step to do so.
Update index.php
again with our new routes as follows:
<?php session_start(); include 'Services/Twilio.php'; require("system/jolt.php"); require("system/pdo.class.php"); require("system/functions.php"); $_GET['route'] = isset($_GET['route']) ? '/'.$_GET['route'] : '/'; $app = new Jolt('site',false); $app->option('source', 'config.ini'); #$pdo = Db::singleton...