Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Twilio evangelist here.</p> <p>Looks like your current code is using the REST library to initiate the call. This send a message to Twilio to initiate a phone call from Twilio to some phone. All of that happens on the server, not in the browser.</p> <p>In your case it sounds like you want to actually make a phone call right from the browser. To do that you need to use Twilio Client, which is a JavaScript framework that lets you create an audio connection from a browser to Twilio, and the connection is made using WebRTC (or Flash if needed). Its the job of the Twilio Client SDK to figure out how to create and manage the actual audio connection between your browser and Twilio.</p> <p><a href="http://www.twilio.com/client" rel="nofollow">http://www.twilio.com/client</a></p> <p><a href="https://www.twilio.com/docs/tutorials/walkthrough/browser-calls/php/laravel" rel="nofollow">https://www.twilio.com/docs/tutorials/walkthrough/browser-calls/php/laravel</a></p> <p>This is different than initiating a call using the REST API. When you initiate an outbound call using the REST API, the API does not actually manage the audio connection. Your using the API simply to tell Twilio to initiate a phone call between Twilio and a phone (or to send a text message), or to ask Twilio for information (like getting list of send SMS messages). The management of the actual audio connection is handled by Twilios internal systems. </p> <p>The first part of your PHP code is correct you need to create a Twilio Capability token. That token is used by our JavaScript library. This tutorial shows the JavaScript code that you can use to make a call from your browser to Twilio:</p> <p><a href="https://www.twilio.com/docs/tutorials/walkthrough/browser-calls/php/laravel" rel="nofollow">https://www.twilio.com/docs/tutorials/walkthrough/browser-calls/php/laravel</a></p> <p>Once the browser connects to Twilio, Twilio will make a request to the URL you've set on your TwiML App (the string starting with "AP" that you specified when you created the capability token). You can return whatever TwiML you like from this URL, including using the &lt;Dial&gt; very to tell Twilio to bridge the Twilio Client connection into a &lt;Conference&gt;.</p> <p>Hope that helps.</p> <p>Devin</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload