inbound.js 565 B

12345678910111213141516171819
  1. var twilio = require('twilio'),
  2. http = require('http');
  3. http.createServer(function (req, res) {
  4. var resp = new twilio.TwimlResponse();
  5. resp.say({voice:'woman'}, 'Welcome to the office of David A. Windham. David is not available at this time.');
  6. resp.gather({ timeout:30 }, function() {
  7. this.say('To Leave a messaage, press 1. For immediate support, press 2.');
  8. });
  9. res.writeHead(200, {
  10. 'Content-Type':'text/xml'
  11. });
  12. res.end(resp.toString());
  13. }).listen(1337);
  14. console.log('Twiml Server started on port 1337');