Making outgoing calls from the browser
You have used your Twilio Client app to receive incoming calls directly to your browser and have a conversation. Now, let's make this application more useful by letting you make outgoing phone calls from your web browser.
Getting Started
We're going to set up our Twilio Client app to allow our user to make outgoing calls directly from the browser.
The complete code for this recipe can be found in the Recipe1
folder under Code
.
How to do it…
Let's set up our client to make outgoing calls by performing the following steps:
Download the Twilio Helper Library available at https://github.com/twilio/twilio-php/zipball/master and unzip it.
Upload the
Services/
folder to your website.. Upload
config.php
to your web server using the following code:<?php $accountsid = ''; // YOUR TWILIO ACCOUNT SID $authtoken = ''; // YOUR TWILIO AUTH TOKEN $appsid = ''; // YOUR TWILIO APP SID $appname = ''; // YOUR CLIENT NAME $fromNumber = ''; // YOUR TWILIO NUMBER (THIS...