×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Love Code
Added: Jun 6, 2018 12:54 AM
Views: 3127
Tags: no tags
  1. const VoiceResponse = require('twilio').twiml.VoiceResponse;
  2.  
  3. const response = new VoiceResponse();
  4. response.say(
  5.   'Please leave a message at the beep.\nPress the star key when finished.'
  6. );
  7. response.record({
  8.   action: 'http://foo.edu/handleRecording.php',
  9.   method: 'GET',
  10.   maxLength: 20,
  11.   finishOnKey: '*',
  12. });
  13. response.say('I did not receive a recording');
  14.  
  15. console.log(response.toString());