Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When Twilio receives a call to your phone number, it will send an HTTP request to a URL you configure in the admin console:</p> <p><img src="https://i.stack.imgur.com/QT62l.png" alt="twilio account dashboard"></p> <p>What Twilio expects in return from this HTTP request is a <a href="http://www.twilio.com/docs/api/twiml" rel="nofollow noreferrer">set of XML instructions called TwiML</a> that will tell Twilio what to do in response to the call. For example, let's say that you wanted to respond to a phone call by saying "thank you" and then playing a music file. If you wanted to do this in node, you might consider using <a href="http://twilio.github.io/twilio-node/" rel="nofollow noreferrer">this node library</a> and the express framework to send a TwiML response:</p> <pre><code>var twilio = require('twilio'), express = require('express'); // Create express app with middleware to parse POST body var app = express(); app.use(express.urlencoded()); // Create a route to respond to a call app.post('/respondToVoiceCall', function(req, res) { //Validate that this request really came from Twilio... if (twilio.validateExpressRequest(req, 'YOUR_AUTH_TOKEN')) { var twiml = new twilio.TwimlResponse(); twiml.say('Hi! Thanks for checking out my app!') .play('http://myserver.com/mysong.mp3'); res.type('text/xml'); res.send(twiml.toString()); } else { res.send('you are not twilio. Buzz off.'); } }); app.listen(process.env.PORT || 3000); </code></pre> <p>Good luck - hope this is what you were looking for.</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. 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.
    3. 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