diff --git a/guides/migration/java-6-to-7/basic-say-twiml/basic-say-twiml.7.x.java b/guides/migration/java-6-to-7/basic-say-twiml/basic-say-twiml.7.x.java index 9f4d1b4d39..d1c803f73e 100644 --- a/guides/migration/java-6-to-7/basic-say-twiml/basic-say-twiml.7.x.java +++ b/guides/migration/java-6-to-7/basic-say-twiml/basic-say-twiml.7.x.java @@ -7,7 +7,7 @@ public class Example { public static void main(String[] args) { Say say = new Say.Builder("Hello World!") - .voice(Say.Voice.ALICE) + .voice(Say.Voice.POLLY_AMY) .language(Language.EN_GB) .build(); VoiceResponse response = new VoiceResponse.Builder() diff --git a/guides/migration/java-6-to-7/basic-say-twiml/output/basic-say-twiml.twiml b/guides/migration/java-6-to-7/basic-say-twiml/output/basic-say-twiml.twiml index 67a94c96f0..54ca03c1a8 100644 --- a/guides/migration/java-6-to-7/basic-say-twiml/output/basic-say-twiml.twiml +++ b/guides/migration/java-6-to-7/basic-say-twiml/output/basic-say-twiml.twiml @@ -1,4 +1,4 @@ - Hello World! + Hello World! diff --git a/guides/voice/make-outbound-calls-guide/response-raw-twiml/example.xml b/guides/voice/make-outbound-calls-guide/response-raw-twiml/example.xml index 50c6894396..71dbd1a066 100644 --- a/guides/voice/make-outbound-calls-guide/response-raw-twiml/example.xml +++ b/guides/voice/make-outbound-calls-guide/response-raw-twiml/example.xml @@ -1,5 +1,5 @@ - Thanks for trying our documentation. Enjoy! + Thanks for trying our documentation. Enjoy! https://demo.twilio.com/docs/classic.mp3 diff --git a/quickstart/php/voice/answer_call/answer_call.7.x.php b/quickstart/php/voice/answer_call/answer_call.7.x.php index fe87b25436..6fe50984cf 100644 --- a/quickstart/php/voice/answer_call/answer_call.7.x.php +++ b/quickstart/php/voice/answer_call/answer_call.7.x.php @@ -8,7 +8,7 @@ // Read a message aloud to the caller $response->say( "Thank you for calling! Have a great day.", - array("voice" => "alice") + array("voice" => "Polly.Amy") ); echo $response; \ No newline at end of file diff --git a/quickstart/php/voice/answer_call_without_composer/answer_call.7.x.php b/quickstart/php/voice/answer_call_without_composer/answer_call.7.x.php index b36a14bbb8..00734bcf4b 100644 --- a/quickstart/php/voice/answer_call_without_composer/answer_call.7.x.php +++ b/quickstart/php/voice/answer_call_without_composer/answer_call.7.x.php @@ -9,7 +9,7 @@ // Read a message aloud to the caller $response->say( "Thank you for calling! Have a great day.", - array("voice" => "alice") + array("voice" => "Polly.Amy") ); echo $response; diff --git a/quickstart/python/voice/example-2-receive-call/respond_to_call.8.x.py b/quickstart/python/voice/example-2-receive-call/respond_to_call.8.x.py index eea0aad3d5..8aa63138d2 100644 --- a/quickstart/python/voice/example-2-receive-call/respond_to_call.8.x.py +++ b/quickstart/python/voice/example-2-receive-call/respond_to_call.8.x.py @@ -11,7 +11,7 @@ def answer_call(): resp = VoiceResponse() # Read a message aloud to the caller - resp.say("Thank you for calling! Have a great day.", voice='alice') + resp.say("Thank you for calling! Have a great day.", voice='Polly.Amy') return str(resp) diff --git a/rest/voice/generate-twiml-gather-input/example.java b/rest/voice/generate-twiml-gather-input/example.java deleted file mode 100644 index b8a2d979cb..0000000000 --- a/rest/voice/generate-twiml-gather-input/example.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.twilio; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.HashMap; - -import com.twilio.sdk.verbs.TwiMLResponse; -import com.twilio.sdk.verbs.TwiMLException; -import com.twilio.sdk.verbs.Say; -import com.twilio.sdk.verbs.Record; -import com.twilio.sdk.verbs.Dial; - -public class TwilioHandleKeyServlet extends HttpServlet { - - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - - String digits = request.getParameter("Digits"); - TwiMLResponse twiml = new TwiMLResponse(); - if (digits != null && digits.equals("1")) { - // Connect 310 555 1212 to the incoming caller. - Dial dial = new Dial("+13105551212"); - - // If the above dial failed, say an error message. - Say say = new Say("The call failed, or the remote party hung up. Goodbye."); - try { - twiml.append(dial); - twiml.append(say); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } else if (digits != null && digits.equals("2")) { - Say pleaseLeaveMessage = new Say("Record your message after the tone."); - // Record the caller's voice. - Record record = new Record(); - record.setMaxLength(30); - // You may need to change this to point to the location of your - // servlet - record.setAction("/handle-recording"); - try { - twiml.append(pleaseLeaveMessage); - twiml.append(record); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } else { - response.sendRedirect("/twiml"); - return; - } - - response.setContentType("application/xml"); - response.getWriter().print(twiml.toXML()); - } -} \ No newline at end of file diff --git a/rest/voice/generate-twiml-gather-input/meta.json b/rest/voice/generate-twiml-gather-input/meta.json deleted file mode 100644 index 4be1b09233..0000000000 --- a/rest/voice/generate-twiml-gather-input/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Generate TwiML to handle a Gather action and Record a message.", - "type": "server", - "testable": false -} diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-input.6.x.cs b/rest/voice/generate-twiml-gather-input/twiml-gather-input.6.x.cs deleted file mode 100644 index 7be8f249a0..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-input.6.x.cs +++ /dev/null @@ -1,29 +0,0 @@ -// In Package Manager, run: -// Install-Package Twilio.Mvc -DependencyVersion HighestMinor - -using System.Web.Mvc; -using Twilio.TwiML; - -public class VoiceController : Controller -{ - // /Voice/HandleGather - public ActionResult HandleGather() - { - var response = new VoiceResponse(); - switch (Request.Form["Digits"]) - { - case "1": - response.Dial("+13105551212"); - response.Say("The call failed or the remote party hung up. Goodbye."); - break; - case "2": - response.Say("Record your message after the tone."); - response.Record(maxLength: 30, action: "/Voice/HandleRecord"); - break; - default: - response.Redirect("/Voice"); - break; - } - return Content(response.ToString(), "text/xml"); - } -} diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-record.4.x.js b/rest/voice/generate-twiml-gather-input/twiml-gather-record.4.x.js deleted file mode 100644 index 5830fcc7ca..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-record.4.x.js +++ /dev/null @@ -1,59 +0,0 @@ -const http = require('http'); -const express = require('express'); -const router = express.Router(); -const app = express(); -const twilio = require('twilio'); -const VoiceResponse = require('twilio').twiml.VoiceResponse; -const bodyParser = require('body-parser'); - -app.use(bodyParser.json()); - -// POST: '/voice/handle-gather' -router.post( - '/handle-gather', - twilio.webhook({ validate: false }), - (req, res) => { - const selectedOption = req.body.Digits; - const twiml = new VoiceResponse(); - - if (selectedOption == '1') { - // Dial a new person - twiml.dial('+13105551212'); - - twiml.say('The call failed or the remote party hung up. Goodbye.'); - - return res.send(twiml); - } else if (selectedOption == '2') { - // Record your message - twiml.say('Record your message after the tone.'); - - twiml.record({ - action: '/voice/handle-record', - maxLength: '30', - }); - - return res.send(twiml); - } - - res.send(redirectWelcome()); - } -); - -const redirectWelcome = () => { - const twiml = new VoiceResponse(); - - twiml.say( - { voice: 'alice', language: 'en-GB' }, - 'Returning to the main menu' - ); - - twiml.redirect('/voice'); - - return twiml; -}; - -app.use('/', router); - -http.createServer(app).listen(1337, () => { - console.log('Express server listening on port 1337'); -}); diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-record.6.x.rb b/rest/voice/generate-twiml-gather-input/twiml-gather-record.6.x.rb deleted file mode 100644 index 9bbe7d9560..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-record.6.x.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'rubygems' -require 'sinatra' -require 'twilio-ruby' - -get '/voice/handle-gather' do - redirect '/voice' unless %w[1 2].include?(params['Digits']) - if params['Digits'] == '1' - response = Twilio::TwiML::Response.new do |r| - r.Dial '+13105551212' - r.Say 'The call failed or the remote party hung up. Goodbye.' - end - elsif params['Digits'] == '2' - response = Twilio::TwiML::Response.new do |r| - r.Say 'Record your message after the tone.' - r.Record maxLength: '30', action: '/voice/handle-record', method: 'get' - end - end - response.text -end diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-record.8.x.py b/rest/voice/generate-twiml-gather-input/twiml-gather-record.8.x.py deleted file mode 100644 index 5948256c38..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-record.8.x.py +++ /dev/null @@ -1,34 +0,0 @@ -from flask import Flask, request, redirect -# from __future__ import with_statement # Only necessary for Python 2.5 -from twilio.twiml.voice_response import VoiceResponse - -app = Flask(__name__) - - -@app.route("/handle-gather", methods=['GET', 'POST']) -def handle_gather(): - """Handle key press from a user.""" - - digit_pressed = request.values.get('Digits', None) - if digit_pressed == "1": - resp = VoiceResponse() - # Dial (310) 555-1212 - connect that number to the incoming caller. - resp.dial("+13105551212") - # If the dial fails: - resp.say("The call failed, or the remote party hung up. Goodbye.") - - return str(resp) - - elif digit_pressed == "2": - resp = VoiceResponse() - resp.say("Record your message after the tone.") - resp.record(maxLength="30", action="/handle-recording") - return str(resp) - - # If the caller pressed anything but 1, redirect them to the homepage. - else: - return redirect("/") - - -if __name__ == "__main__": - app.run(debug=True) diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-record.9.x.java b/rest/voice/generate-twiml-gather-input/twiml-gather-record.9.x.java deleted file mode 100644 index b3ec19c385..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-record.9.x.java +++ /dev/null @@ -1,42 +0,0 @@ -import java.io.IOException; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.twilio.twiml.*; -import com.twilio.twiml.voice.Number; - -public class TwilioHandleKeyServlet extends HttpServlet { - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String digits = request.getParameter("Digits"); - VoiceResponse twiml; - - if (digits != null && digits.equals("1")) { - // Connect 310 555 1212 to the incoming caller. - Number number = new Number.Builder("+13105551212").build(); - Dial dial = new Dial.Builder().number(number).build(); - - // If the above dial failed, say an error message. - Say say = new Say.Builder("The call failed, or the remote party hung up. Goodbye.").build(); - - twiml = new VoiceResponse.Builder().dial(dial).say(say).build(); - } else if (digits != null && digits.equals("2")) { - Say pleaseLeaveMessage = new Say.Builder("Record your message after the tone.").build(); - // Record the caller's voice. - Record record = new Record.Builder().maxLength(30).action("/handle-recording").build(); - - twiml = new VoiceResponse.Builder().say(pleaseLeaveMessage).record(record).build(); - } else { - response.sendRedirect("/twiml"); - return; - } - - response.setContentType("application/xml"); - try { - response.getWriter().print(twiml.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-record.php b/rest/voice/generate-twiml-gather-input/twiml-gather-record.php deleted file mode 100644 index d58cb8197f..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-record.php +++ /dev/null @@ -1,20 +0,0 @@ -\n"; -?> - - - +13105551212 - The call failed or the remote party hung up. Goodbye. - - Record your message after the tone. - - - \ No newline at end of file diff --git a/rest/voice/generate-twiml-gather-input/twiml-gather-record.xml b/rest/voice/generate-twiml-gather-input/twiml-gather-record.xml deleted file mode 100644 index 239d57ad70..0000000000 --- a/rest/voice/generate-twiml-gather-input/twiml-gather-record.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Record your message after the tone. - - \ No newline at end of file diff --git a/rest/voice/generate-twiml-gather/example.9.x.java b/rest/voice/generate-twiml-gather/example.9.x.java deleted file mode 100644 index 9cb5f245bb..0000000000 --- a/rest/voice/generate-twiml-gather/example.9.x.java +++ /dev/null @@ -1,44 +0,0 @@ -import java.io.IOException; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.twilio.twiml.*; - -public class TwilioServlet extends HttpServlet { - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - // Use the caller's name - String message = "Hello. It's me."; - - // Create a TwiML response and add our friendly message. - Say say = new Say.Builder(message).build(); - - // Play an MP3 for incoming callers. - Play play = new Play.Builder("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3").build(); - - Say sayInGather = new Say.Builder("To speak to a real person, press 1. " - + "Press 2 to record a message for a Twilio educator. " - + "Press any other key to start over.").build(); - - Gather gather = new Gather.Builder() - .action("/handle-gather") - .numDigits(1) - .method(HttpMethod.POST) - .say(sayInGather) - .build(); - - VoiceResponse twiml = new VoiceResponse.Builder() - .say(say) - .play(play) - .gather(gather) - .build(); - - response.setContentType("application/xml"); - try { - response.getWriter().print(twiml.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/rest/voice/generate-twiml-gather/meta.json b/rest/voice/generate-twiml-gather/meta.json deleted file mode 100644 index 9a353bbc0d..0000000000 --- a/rest/voice/generate-twiml-gather/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Generate TwiML to Gather user input.", - "type": "server", - "testable": false -} diff --git a/rest/voice/generate-twiml-gather/twiml-gather.4.x.js b/rest/voice/generate-twiml-gather/twiml-gather.4.x.js deleted file mode 100644 index d577f9d4e6..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.4.x.js +++ /dev/null @@ -1,24 +0,0 @@ -const http = require('http'); -const express = require('express'); -const router = express.Router(); -const app = express(); -const VoiceResponse = require('twilio').twiml.VoiceResponse; - -// POST: '/voice' -router.post('/voice', twilio.webhook({ validate: false }), (req, res) => { - const twiml = new VoiceResponse(); - - const gather = twiml.gather({ - action: 'voice/handle-record', - numDigits: '1', - method: 'POST', - }); - - res.send(twiml); -}); - -app.use('/', router); - -http.createServer(app).listen(1337, () => { - console.log('Express server listening on port 1337'); -}); diff --git a/rest/voice/generate-twiml-gather/twiml-gather.6.x.cs b/rest/voice/generate-twiml-gather/twiml-gather.6.x.cs deleted file mode 100644 index 1f27b6c652..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.6.x.cs +++ /dev/null @@ -1,24 +0,0 @@ -// In Package Manager, run: -// Install-Package Twilio.Mvc -DependencyVersion HighestMinor - -using System.Web.Mvc; -using Twilio.TwiML; - -public class VoiceController : Controller -{ - // /Voice - public ActionResult Index() - { - var gather = new Gather (numDigits: 1, action: "/Voice/HandleGather"); - gather.Say("To speak to a real person, press 1.\n" + - "Press 2 to record a message for a Twilio educator.\n" + - "Press any other key to start over."); - - var response = new VoiceResponse(); - response.Say("Hello. It's me.", voice: "alice", language: "en-GB"); - response.Play("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3"); - response.Gather (gather); - - return Content(response.ToString(), "text/xml"); - } -} diff --git a/rest/voice/generate-twiml-gather/twiml-gather.6.x.rb b/rest/voice/generate-twiml-gather/twiml-gather.6.x.rb deleted file mode 100644 index 1cdefa80e8..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.6.x.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'rubygems' -require 'sinatra' -require 'twilio-ruby' - -voice_gather = '/voice/handle-gather' - -get '/voice' do - Twilio::TwiML::Response.new do |r| - r.Say "Hello. It's me.", voice: 'alice', language: 'en-GB' - r.Play 'https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3' - r.Gather numDigits: '1', action: voice_gather, method: 'get' do |g| - g.Say 'To speak to a real person, press 1.' - g.Say 'Press 2 to record a message for a Twilio educator.' - g.Say 'Press any other key to start over.' - end - end.text -end diff --git a/rest/voice/generate-twiml-gather/twiml-gather.8.x.py b/rest/voice/generate-twiml-gather/twiml-gather.8.x.py deleted file mode 100644 index 7b70381042..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.8.x.py +++ /dev/null @@ -1,29 +0,0 @@ -from flask import Flask -# from __future__ import with_statement # Only necessary for Python 2.5 -from twilio.twiml.voice_response import VoiceResponse - -app = Flask(__name__) - - -@app.route("/", methods=['GET', 'POST']) -def voice(): - - resp = VoiceResponse() - # Greet the caller by name - resp.say("Hello. It's me. ") - # Play an mp3 - resp.play("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3") - - # Gather digits. - with resp.gather(numDigits=1, action="/handle-gather", method="POST") as g: - g.say( - """To speak to a real person, press 1. - Press 2 to record a message for a Twilio educator. - Press any other key to start over.""" - ) - - return str(resp) - - -if __name__ == "__main__": - app.run(debug=True) diff --git a/rest/voice/generate-twiml-gather/twiml-gather.java b/rest/voice/generate-twiml-gather/twiml-gather.java deleted file mode 100644 index f179564555..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.twilio; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -import com.twilio.sdk.verbs.TwiMLResponse; -import com.twilio.sdk.verbs.TwiMLException; -import com.twilio.sdk.verbs.Gather; -import com.twilio.sdk.verbs.Play; -import com.twilio.sdk.verbs.Say; - - -public class TwilioServlet extends HttpServlet { - - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String message; - // Use the caller's name - message = "Hello. It's me."; - - // Create a TwiML response and add our friendly message. - TwiMLResponse twiml = new TwiMLResponse(); - Say say = new Say(message); - - // Play an MP3 for incoming callers. - Play play = new Play("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3"); - - Gather gather = new Gather(); - gather.setAction("/handle-gather"); - gather.setNumDigits(1); - gather.setMethod("POST"); - Say sayInGather = new Say("To speak to a real person, press 1. " + - "Press 2 to record a message for a Twilio educator. " + - "Press any other key to start over."); - try { - gather.append(sayInGather); - twiml.append(say); - twiml.append(play); - twiml.append(gather); - } catch (TwiMLException e) { - e.printStackTrace(); - } - - response.setContentType("application/xml"); - response.getWriter().print(twiml.toXML()); - } -} diff --git a/rest/voice/generate-twiml-gather/twiml-gather.php b/rest/voice/generate-twiml-gather/twiml-gather.php deleted file mode 100644 index 712916f139..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.php +++ /dev/null @@ -1,17 +0,0 @@ -\n"; -?> - - Hello. It's me. - https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3 - - - To speak with a real person, press 1. - Press 2 to record a message for a Twilio educator. - Press any other key to start over. - - - diff --git a/rest/voice/generate-twiml-gather/twiml-gather.xml b/rest/voice/generate-twiml-gather/twiml-gather.xml deleted file mode 100644 index ac072e8b38..0000000000 --- a/rest/voice/generate-twiml-gather/twiml-gather.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Hello. - https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3 - - To speak to a real person, press 1. - Press 2 to record a message for a Twilio educator. - Press any other key to start over. - - diff --git a/rest/voice/generate-twiml-record/meta.json b/rest/voice/generate-twiml-record/meta.json deleted file mode 100644 index 2d32b20dbc..0000000000 --- a/rest/voice/generate-twiml-record/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Generate TwiML to Play, Gather and Record a message.", - "type": "server", - "testable": false -} diff --git a/rest/voice/generate-twiml-record/twiml-record.4.x.js b/rest/voice/generate-twiml-record/twiml-record.4.x.js deleted file mode 100644 index cfb775e7f3..0000000000 --- a/rest/voice/generate-twiml-record/twiml-record.4.x.js +++ /dev/null @@ -1,88 +0,0 @@ -const http = require('http'); -const express = require('express'); -const router = express.Router(); -const app = express(); -const bodyParser = require('body-parser'); -const twilio = require('twilio'); -const VoiceResponse = require('twilio').twiml.VoiceResponse; - -app.use(bodyParser.json()); - -// POST: '/voice' -router.post('/voice', twilio.webhook({ validate: false }), (req, res) => { - const twiml = new VoiceResponse(); - - const gather = twiml.gather({ - action: 'voice/handle-record', - numDigits: '1', - method: 'POST', - }); - gather.play({}, 'https://deved-sample-assets-2691.twil.io/et-phone.mp3', { - loop: 3, - }); - - res.send(twiml); -}); - -// POST: '/voice/handle-gather' -router.post( - '/handle-gather', - twilio.webhook({ validate: false }), - (req, res) => { - const selectedOption = req.body.Digits; - const twiml = new VoiceResponse(); - - if (selectedOption == '1') { - // Dial a new person - twiml.dial('+13105551212'); - twiml.say('The call failed or the remote party hung up. Goodbye.'); - - res.send(twiml); - } else if (selectedOption == '2') { - // Record your message - twiml.say('Record your message after the tone.'); - - twiml.record({ - action: '/voice/handle-record', - maxLength: '30', - }); - - res.send(twiml); - } - - res.send(redirectWelcome()); - } -); - -// POST: '/handle-record' -router.post( - '/handle-record', - twilio.webhook({ validate: false }), - (req, res) => { - const twiml = new VoiceResponse(); - - twiml.say('Listen to your recorded message.'); - twiml.play({}, req.body.RecordingUrl); - twiml.say('Goodbye.'); - - res.send(twiml); - } -); - -const redirectWelcome = () => { - const twiml = new VoiceResponse(); - - twiml.say( - { voice: 'alice', language: 'en-GB' }, - 'Returning to the main menu' - ); - twiml.redirect('/voice'); - - return twiml; -}; - -app.use('/', router); - -http.createServer(app).listen(1337, () => { - console.log('Express server listening on port 1337'); -}); diff --git a/rest/voice/generate-twiml-record/twiml-record.6.x.cs b/rest/voice/generate-twiml-record/twiml-record.6.x.cs deleted file mode 100644 index c0be3f43ca..0000000000 --- a/rest/voice/generate-twiml-record/twiml-record.6.x.cs +++ /dev/null @@ -1,55 +0,0 @@ -// In Package Manager, run: -// Install-Package Twilio.Mvc -DependencyVersion HighestMinor - -using System.Web.Mvc; -using Twilio.TwiML; - -public class VoiceController : Controller -{ - // /Voice - public ActionResult Index() - { - var gather = new Gather(numDigits: 1, action: "/Voice/HandleGather"); - gather.Say("To speak to a real person, press 1.\n" + - "Press 2 to record a message for a Twilio educator.\n" + - "Press any other key to start over."); - - var response = new VoiceResponse(); - response.Say("Hello. It's me.", voice: "alice", language: "en-GB"); - response.Play("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3"); - response.Gather(gather); - - return Content(response.ToString(), "text/xml"); - } - - // /Voice/HandleGather - public ActionResult HandleGather() - { - var response = new VoiceResponse(); - switch (Request.Form["Digits"]) - { - case "1": - response.Dial("+13105551212"); - response.Say("The call failed or the remote party hung up. Goodbye."); - break; - case "2": - response.Say("Record your message after the tone."); - response.Record(maxLength: 30, action: "/Voice/HandleRecord"); - break; - default: - response.Redirect("/Voice"); - break; - } - return Content(response.ToString(), "text/xml"); - } - - // /Voice/HandleRecord - public ActionResult HandleRecord() - { - var response = new VoiceResponse(); - response.Say("Listen to your recorded message."); - response.Play(Request.Form["RecordingUrl"]); - response.Say("Goodbye."); - return Content(response.ToString(), "text/xml"); - } -} diff --git a/rest/voice/generate-twiml-record/twiml-record.6.x.rb b/rest/voice/generate-twiml-record/twiml-record.6.x.rb deleted file mode 100644 index d960077ec6..0000000000 --- a/rest/voice/generate-twiml-record/twiml-record.6.x.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'rubygems' -require 'sinatra' -require 'twilio-ruby' - -voice_endpoint = '/voice' -voice_gather = '/voice/handle-gather' -voice_record = '/voice/handle-record' - -get voice_endpoint do - Twilio::TwiML::Response.new do |r| - r.Say "Hello. It's me.", voice: 'alice', language: 'en-GB' - r.Play 'https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3' - r.Gather numDigits: '1', action: voice_gather, method: 'get' do |g| - g.Say 'To speak to a real person, press 1.' - g.Say 'Press 2 to record a message for a Twilio educator.' - g.Say 'Press any other key to start over.' - end - end.text -end - -get voice_gather do - redirect voice_endpoint unless %w[1 2].include?(params['Digits']) - if params['Digits'] == '1' - response = Twilio::TwiML::Response.new do |r| - r.Dial '+13105551212' - r.Say 'The call failed or the remote party hung up. Goodbye.' - end - elsif params['Digits'] == '2' - response = Twilio::TwiML::Response.new do |r| - r.Say 'Record your message after the tone.' - r.Record maxLength: '30', action: voice_record, method: 'get' - end - end - response.text -end - -get voice_record do - Twilio::TwiML::Response.new do |r| - r.Say 'Listen to your recorded message.' - - # Twilio passes a 'RecordingUrl' parameter with the incoming request - r.Play params['RecordingUrl'] - r.Say 'Goodbye.' - end.text -end diff --git a/rest/voice/generate-twiml-record/twiml-record.8.x.py b/rest/voice/generate-twiml-record/twiml-record.8.x.py deleted file mode 100644 index 91a417f6a9..0000000000 --- a/rest/voice/generate-twiml-record/twiml-record.8.x.py +++ /dev/null @@ -1,67 +0,0 @@ -from flask import Flask, request, redirect -# from __future__ import with_statement # Only necessary for Python 2.5 -from twilio.twiml.voice_response import VoiceResponse - -app = Flask(__name__) - - -@app.route("/", methods=['GET', 'POST']) -def voice(): - - resp = VoiceResponse() - # Greet the caller by name - resp.say("Hello. It's me. ") - # Play an mp3 - resp.play("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3") - - # Gather digits. - with resp.gather(numDigits=1, action="/handle-gather", method="POST") as g: - g.say( - """To speak to a real person, press 1. - Press 2 to record a message for a Twilio educator. - Press any other key to start over.""" - ) - - return str(resp) - - -@app.route("/handle-gather", methods=['GET', 'POST']) -def handle_gather(): - """Handle key press from a user.""" - - digit_pressed = request.values.get('Digits', None) - if digit_pressed == "1": - resp = VoiceResponse() - # Dial (310) 555-1212 - connect that number to the incoming caller. - resp.dial("+13105551212") - # If the dial fails: - resp.say("The call failed, or the remote party hung up. Goodbye.") - - return str(resp) - - elif digit_pressed == "2": - resp = VoiceResponse() - resp.say("Record your message after the tone.") - resp.record(maxLength="30", action="/handle-recording") - return str(resp) - - # If the caller pressed anything but 1, redirect them to the homepage. - else: - return redirect("/") - - -@app.route("/handle-recording", methods=['GET', 'POST']) -def handle_recording(): - """Play back the caller's recording.""" - - recording_url = request.values.get("RecordingUrl", None) - - resp = VoiceResponse() - resp.say("Listen to your recorded message.") - resp.play(recording_url) - resp.say("Goodbye.") - return str(resp) - - -if __name__ == "__main__": - app.run(debug=True) diff --git a/rest/voice/generate-twiml-record/twiml-record.9.x.java b/rest/voice/generate-twiml-record/twiml-record.9.x.java deleted file mode 100644 index 49da3351a1..0000000000 --- a/rest/voice/generate-twiml-record/twiml-record.9.x.java +++ /dev/null @@ -1,101 +0,0 @@ -import java.io.IOException; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.twilio.twiml.*; -import com.twilio.twiml.voice.Number; - - -public class TwilioServlet extends HttpServlet { - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String message; - // Use the caller's name - message = "Hello. It's me."; - - // Create a TwiML response and add our friendly message. - Say say = new Say.Builder(message).build(); - - // Play an MP3 for incoming callers. - Play play = new Play.Builder("https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3").build(); - - Say sayInGather = new Say.Builder("To speak to a real person, press 1. " - + "Press 2 to record a message for a Twilio educator. " - + "Press any other key to start over.").build(); - - Gather gather = new Gather.Builder().action("/handle-gather").numDigits(1).method(HttpMethod.POST) - .say(sayInGather).build(); - - VoiceResponse twiml = new VoiceResponse.Builder().say(say).play(play).gather(gather).build(); - response.setContentType("application/xml"); - try { - response.getWriter().print(twiml.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} - - -public class TwilioHandleKeyServlet extends HttpServlet { - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String digits = request.getParameter("Digits"); - VoiceResponse twiml; - - if (digits != null && digits.equals("1")) { - // Connect 310 555 1212 to the incoming caller. - Number number = new Number.Builder("+13105551212").build(); - Dial dial = new Dial.Builder().number(number).build() - - // If the above dial failed, say an error message. - Say say = new Say.Builder("The call failed, or the remote party hung up. Goodbye.").build(); - - twiml = new VoiceResponse.Builder().dial(dial).say(say).build(); - } else if (digits != null && digits.equals("2")) { - Say pleaseLeaveMessage = new Say.Builder("Record your message after the tone.").build(); - // Record the caller's voice. - Record record = new Record.Builder().maxLength(30).action("/handle-recording").build(); - - twiml = new VoiceResponse.Builder().say(pleaseLeaveMessage).record(record).build(); - } else { - response.sendRedirect("/twiml"); - return; - } - - response.setContentType("application/xml"); - try { - response.getWriter().print(twiml.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} - - -public class TwilioHandleRecordingServlet extends HttpServlet { - public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { - String recordingUrl = request.getParameter("RecordingUrl"); - - Say sayHello = new Say.Builder("Listen to your recorded message.").build(); - Say sayGoodbye = new Say.Builder("Goodbye").build(); - - VoiceResponse twiml; - - if (recordingUrl != null) { - Play play = new Play.Builder(recordingUrl).build(); - - twiml = new VoiceResponse.Builder().say(sayHello).play(play).say(sayGoodbye).build(); - } else { - response.sendRedirect("/twiml"); - return; - } - - response.setContentType("application/xml"); - try { - response.getWriter().print(twiml.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/rest/voice/generate-twiml-record/twiml-record.php b/rest/voice/generate-twiml-record/twiml-record.php deleted file mode 100644 index 5bec1672d6..0000000000 --- a/rest/voice/generate-twiml-record/twiml-record.php +++ /dev/null @@ -1,54 +0,0 @@ -\n"; -?> - - Hello. It's me. - https://deved-sample-assets-2691.twil.io/ahoyhoy.mp3 - - - To speak with a real person, press 1. - Press 2 to record a message for a Twilio educator. - Press any other key to start over. - - - - -------------------------------------------- - - -\n"; -?> - - - +13105551212 - The call failed or the remote party hung up. Goodbye. - - Record your message after the tone. - - - - --------------------------------------------- - - -\n"; -?> - - Listen to your recorded message. - - Goodbye. - diff --git a/twiml/voice/say/say-1/meta.json b/twiml/voice/say/say-1/meta.json deleted file mode 100644 index f0002982b6..0000000000 --- a/twiml/voice/say/say-1/meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Using attributes in a Say verb", - "type": "server" -} diff --git a/twiml/voice/say/say-1/output/say-1.twiml b/twiml/voice/say/say-1/output/say-1.twiml deleted file mode 100644 index fdbaf31dde..0000000000 --- a/twiml/voice/say/say-1/output/say-1.twiml +++ /dev/null @@ -1,4 +0,0 @@ - - - Chapeau! - diff --git a/twiml/voice/say/say-1/say-1.4.x.js b/twiml/voice/say/say-1/say-1.4.x.js deleted file mode 100644 index 74cd900092..0000000000 --- a/twiml/voice/say/say-1/say-1.4.x.js +++ /dev/null @@ -1,10 +0,0 @@ -const VoiceResponse = require('twilio').twiml.VoiceResponse; - - -const response = new VoiceResponse(); -response.say({ - voice: 'woman', - language: 'fr-FR' -}, 'Chapeau!'); - -console.log(response.toString()); diff --git a/twiml/voice/say/say-1/say-1.6.x.cs b/twiml/voice/say/say-1/say-1.6.x.cs deleted file mode 100644 index 75235d66e1..0000000000 --- a/twiml/voice/say/say-1/say-1.6.x.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using Twilio.TwiML; -using Twilio.TwiML.Voice; - - -class Example -{ - static void Main() - { - var response = new VoiceResponse(); - response.Say("Chapeau!", voice: "woman", language: "fr-FR"); - - Console.WriteLine(response.ToString()); - } -} diff --git a/twiml/voice/say/say-1/say-1.6.x.php b/twiml/voice/say/say-1/say-1.6.x.php deleted file mode 100644 index 21ee2abbc9..0000000000 --- a/twiml/voice/say/say-1/say-1.6.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Chapeau!', ['voice' => 'woman', 'language' => 'fr-FR']); - -echo $response; diff --git a/twiml/voice/say/say-1/say-1.6.x.rb b/twiml/voice/say/say-1/say-1.6.x.rb deleted file mode 100644 index f94f913936..0000000000 --- a/twiml/voice/say/say-1/say-1.6.x.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'twilio-ruby' - -response = Twilio::TwiML::VoiceResponse.new -response.say(voice: 'woman', language: 'fr-FR', message: 'Chapeau!') - -puts response diff --git a/twiml/voice/say/say-1/say-1.7.x.java b/twiml/voice/say/say-1/say-1.7.x.java deleted file mode 100644 index ad64208cb6..0000000000 --- a/twiml/voice/say/say-1/say-1.7.x.java +++ /dev/null @@ -1,18 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Chapeau!").voice(Say.Voice.WOMAN) - .language(Say.Language.FR_FR).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-1/say-1.7.x.php b/twiml/voice/say/say-1/say-1.7.x.php deleted file mode 100644 index 21ee2abbc9..0000000000 --- a/twiml/voice/say/say-1/say-1.7.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Chapeau!', ['voice' => 'woman', 'language' => 'fr-FR']); - -echo $response; diff --git a/twiml/voice/say/say-1/say-1.8.x.py b/twiml/voice/say/say-1/say-1.8.x.py deleted file mode 100644 index 5bac884046..0000000000 --- a/twiml/voice/say/say-1/say-1.8.x.py +++ /dev/null @@ -1,6 +0,0 @@ -from twilio.twiml.voice_response import VoiceResponse, Say - -response = VoiceResponse() -response.say('Chapeau!', voice='woman', language='fr-FR') - -print(response) diff --git a/twiml/voice/say/say-1/say-1.9.x.java b/twiml/voice/say/say-1/say-1.9.x.java deleted file mode 100644 index ad64208cb6..0000000000 --- a/twiml/voice/say/say-1/say-1.9.x.java +++ /dev/null @@ -1,18 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Chapeau!").voice(Say.Voice.WOMAN) - .language(Say.Language.FR_FR).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-2/meta.json b/twiml/voice/say/say-2/meta.json deleted file mode 100644 index 2af6be5813..0000000000 --- a/twiml/voice/say/say-2/meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Using a specific language as an attribute in a Say verb", - "type": "server" -} diff --git a/twiml/voice/say/say-2/output/say-2.twiml b/twiml/voice/say/say-2/output/say-2.twiml deleted file mode 100644 index 6d1ee22fe1..0000000000 --- a/twiml/voice/say/say-2/output/say-2.twiml +++ /dev/null @@ -1,4 +0,0 @@ - - - Chapeau! - diff --git a/twiml/voice/say/say-2/say-2.4.x.js b/twiml/voice/say/say-2/say-2.4.x.js deleted file mode 100644 index 96d9a6ed03..0000000000 --- a/twiml/voice/say/say-2/say-2.4.x.js +++ /dev/null @@ -1,10 +0,0 @@ -const VoiceResponse = require('twilio').twiml.VoiceResponse; - - -const response = new VoiceResponse(); -response.say({ - voice: 'alice', - language: 'fr-FR' -}, 'Chapeau!'); - -console.log(response.toString()); diff --git a/twiml/voice/say/say-2/say-2.6.x.cs b/twiml/voice/say/say-2/say-2.6.x.cs deleted file mode 100644 index 6a14da81cb..0000000000 --- a/twiml/voice/say/say-2/say-2.6.x.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using Twilio.TwiML; -using Twilio.TwiML.Voice; - - -class Example -{ - static void Main() - { - var response = new VoiceResponse(); - response.Say("Chapeau!", voice: "alice", language: "fr-FR"); - - Console.WriteLine(response.ToString()); - } -} diff --git a/twiml/voice/say/say-2/say-2.6.x.php b/twiml/voice/say/say-2/say-2.6.x.php deleted file mode 100644 index ad10b7bd36..0000000000 --- a/twiml/voice/say/say-2/say-2.6.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Chapeau!', ['voice' => 'alice', 'language' => 'fr-FR']); - -echo $response; diff --git a/twiml/voice/say/say-2/say-2.6.x.rb b/twiml/voice/say/say-2/say-2.6.x.rb deleted file mode 100644 index e4c812b4b1..0000000000 --- a/twiml/voice/say/say-2/say-2.6.x.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'twilio-ruby' - -response = Twilio::TwiML::VoiceResponse.new -response.say(voice: 'alice', language: 'fr-FR', message: 'Chapeau!') - -puts response diff --git a/twiml/voice/say/say-2/say-2.7.x.java b/twiml/voice/say/say-2/say-2.7.x.java deleted file mode 100644 index 946b19910a..0000000000 --- a/twiml/voice/say/say-2/say-2.7.x.java +++ /dev/null @@ -1,18 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Chapeau!").voice(Say.Voice.ALICE) - .language(Say.Language.FR_FR).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-2/say-2.7.x.php b/twiml/voice/say/say-2/say-2.7.x.php deleted file mode 100644 index ad10b7bd36..0000000000 --- a/twiml/voice/say/say-2/say-2.7.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Chapeau!', ['voice' => 'alice', 'language' => 'fr-FR']); - -echo $response; diff --git a/twiml/voice/say/say-2/say-2.8.x.py b/twiml/voice/say/say-2/say-2.8.x.py deleted file mode 100644 index 2908a64626..0000000000 --- a/twiml/voice/say/say-2/say-2.8.x.py +++ /dev/null @@ -1,6 +0,0 @@ -from twilio.twiml.voice_response import VoiceResponse, Say - -response = VoiceResponse() -response.say('Chapeau!', voice='alice', language='fr-FR') - -print(response) diff --git a/twiml/voice/say/say-2/say-2.9.x.java b/twiml/voice/say/say-2/say-2.9.x.java deleted file mode 100644 index 946b19910a..0000000000 --- a/twiml/voice/say/say-2/say-2.9.x.java +++ /dev/null @@ -1,18 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Chapeau!").voice(Say.Voice.ALICE) - .language(Say.Language.FR_FR).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-3/meta.json b/twiml/voice/say/say-3/meta.json deleted file mode 100644 index 113c4212db..0000000000 --- a/twiml/voice/say/say-3/meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Say verb defaulting on Alice's voice", - "type": "server" -} diff --git a/twiml/voice/say/say-3/output/say-3.twiml b/twiml/voice/say/say-3/output/say-3.twiml deleted file mode 100644 index ed645bb34a..0000000000 --- a/twiml/voice/say/say-3/output/say-3.twiml +++ /dev/null @@ -1,4 +0,0 @@ - - - Hej! - diff --git a/twiml/voice/say/say-3/say-3.4.x.js b/twiml/voice/say/say-3/say-3.4.x.js deleted file mode 100644 index 0ec2d7a770..0000000000 --- a/twiml/voice/say/say-3/say-3.4.x.js +++ /dev/null @@ -1,9 +0,0 @@ -const VoiceResponse = require('twilio').twiml.VoiceResponse; - - -const response = new VoiceResponse(); -response.say({ - language: 'sv-SE' -}, 'Hej!'); - -console.log(response.toString()); diff --git a/twiml/voice/say/say-3/say-3.6.x.cs b/twiml/voice/say/say-3/say-3.6.x.cs deleted file mode 100644 index 714b8dbbd0..0000000000 --- a/twiml/voice/say/say-3/say-3.6.x.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using Twilio.TwiML; -using Twilio.TwiML.Voice; - - -class Example -{ - static void Main() - { - var response = new VoiceResponse(); - response.Say("Hej!", language: "sv-SE"); - - Console.WriteLine(response.ToString()); - } -} diff --git a/twiml/voice/say/say-3/say-3.6.x.php b/twiml/voice/say/say-3/say-3.6.x.php deleted file mode 100644 index 0b952e0c84..0000000000 --- a/twiml/voice/say/say-3/say-3.6.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Hej!', ['language' => 'sv-SE']); - -echo $response; diff --git a/twiml/voice/say/say-3/say-3.6.x.rb b/twiml/voice/say/say-3/say-3.6.x.rb deleted file mode 100644 index 4926d93ba8..0000000000 --- a/twiml/voice/say/say-3/say-3.6.x.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'twilio-ruby' - -response = Twilio::TwiML::VoiceResponse.new -response.say(language: 'sv-SE', message: 'Hej!') - -puts response diff --git a/twiml/voice/say/say-3/say-3.7.x.java b/twiml/voice/say/say-3/say-3.7.x.java deleted file mode 100644 index d8c4eeacbf..0000000000 --- a/twiml/voice/say/say-3/say-3.7.x.java +++ /dev/null @@ -1,17 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Hej!").language(Say.Language.SV_SE).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-3/say-3.7.x.php b/twiml/voice/say/say-3/say-3.7.x.php deleted file mode 100644 index 0b952e0c84..0000000000 --- a/twiml/voice/say/say-3/say-3.7.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Hej!', ['language' => 'sv-SE']); - -echo $response; diff --git a/twiml/voice/say/say-3/say-3.8.x.py b/twiml/voice/say/say-3/say-3.8.x.py deleted file mode 100644 index 24658521c5..0000000000 --- a/twiml/voice/say/say-3/say-3.8.x.py +++ /dev/null @@ -1,6 +0,0 @@ -from twilio.twiml.voice_response import VoiceResponse, Say - -response = VoiceResponse() -response.say('Hej!', language='sv-SE') - -print(response) diff --git a/twiml/voice/say/say-3/say-3.9.x.java b/twiml/voice/say/say-3/say-3.9.x.java deleted file mode 100644 index d8c4eeacbf..0000000000 --- a/twiml/voice/say/say-3/say-3.9.x.java +++ /dev/null @@ -1,17 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Hej!").language(Say.Language.SV_SE).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-4/meta.json b/twiml/voice/say/say-4/meta.json deleted file mode 100644 index 41462448d3..0000000000 --- a/twiml/voice/say/say-4/meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Hello World", - "type": "server" -} diff --git a/twiml/voice/say/say-4/output/say-4.twiml b/twiml/voice/say/say-4/output/say-4.twiml deleted file mode 100644 index f9e0d59a63..0000000000 --- a/twiml/voice/say/say-4/output/say-4.twiml +++ /dev/null @@ -1,4 +0,0 @@ - - - Hello World - diff --git a/twiml/voice/say/say-4/say-4.4.x.js b/twiml/voice/say/say-4/say-4.4.x.js deleted file mode 100644 index b02dd52ec1..0000000000 --- a/twiml/voice/say/say-4/say-4.4.x.js +++ /dev/null @@ -1,7 +0,0 @@ -const VoiceResponse = require('twilio').twiml.VoiceResponse; - - -const response = new VoiceResponse(); -response.say('Hello World'); - -console.log(response.toString()); diff --git a/twiml/voice/say/say-4/say-4.6.x.cs b/twiml/voice/say/say-4/say-4.6.x.cs deleted file mode 100644 index 78df606ff9..0000000000 --- a/twiml/voice/say/say-4/say-4.6.x.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using Twilio.TwiML; -using Twilio.TwiML.Voice; - - -class Example -{ - static void Main() - { - var response = new VoiceResponse(); - response.Say("Hello World"); - - Console.WriteLine(response.ToString()); - } -} diff --git a/twiml/voice/say/say-4/say-4.6.x.php b/twiml/voice/say/say-4/say-4.6.x.php deleted file mode 100644 index 9ce16d4cb4..0000000000 --- a/twiml/voice/say/say-4/say-4.6.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Hello World'); - -echo $response; diff --git a/twiml/voice/say/say-4/say-4.6.x.rb b/twiml/voice/say/say-4/say-4.6.x.rb deleted file mode 100644 index 1257938269..0000000000 --- a/twiml/voice/say/say-4/say-4.6.x.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'twilio-ruby' - -response = Twilio::TwiML::VoiceResponse.new -response.say(message: 'Hello World') - -puts response diff --git a/twiml/voice/say/say-4/say-4.7.x.java b/twiml/voice/say/say-4/say-4.7.x.java deleted file mode 100644 index fef40ee77c..0000000000 --- a/twiml/voice/say/say-4/say-4.7.x.java +++ /dev/null @@ -1,17 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Hello World").build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-4/say-4.7.x.php b/twiml/voice/say/say-4/say-4.7.x.php deleted file mode 100644 index 9ce16d4cb4..0000000000 --- a/twiml/voice/say/say-4/say-4.7.x.php +++ /dev/null @@ -1,8 +0,0 @@ -say('Hello World'); - -echo $response; diff --git a/twiml/voice/say/say-4/say-4.8.x.py b/twiml/voice/say/say-4/say-4.8.x.py deleted file mode 100644 index 2dbec7953e..0000000000 --- a/twiml/voice/say/say-4/say-4.8.x.py +++ /dev/null @@ -1,6 +0,0 @@ -from twilio.twiml.voice_response import VoiceResponse, Say - -response = VoiceResponse() -response.say('Hello World') - -print(response) diff --git a/twiml/voice/say/say-4/say-4.9.x.java b/twiml/voice/say/say-4/say-4.9.x.java deleted file mode 100644 index fef40ee77c..0000000000 --- a/twiml/voice/say/say-4/say-4.9.x.java +++ /dev/null @@ -1,17 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Hello World").build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-5/meta.json b/twiml/voice/say/say-5/meta.json deleted file mode 100644 index 2921f006f1..0000000000 --- a/twiml/voice/say/say-5/meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Hello, Hello in Brazilian Portuguese", - "type": "server" -} diff --git a/twiml/voice/say/say-5/output/say-5.twiml b/twiml/voice/say/say-5/output/say-5.twiml deleted file mode 100644 index f19093d8c6..0000000000 --- a/twiml/voice/say/say-5/output/say-5.twiml +++ /dev/null @@ -1,4 +0,0 @@ - - - Bom dia. - diff --git a/twiml/voice/say/say-5/say-5.4.x.js b/twiml/voice/say/say-5/say-5.4.x.js deleted file mode 100644 index c034bfc7d6..0000000000 --- a/twiml/voice/say/say-5/say-5.4.x.js +++ /dev/null @@ -1,11 +0,0 @@ -const VoiceResponse = require('twilio').twiml.VoiceResponse; - - -const response = new VoiceResponse(); -response.say({ - voice: 'alice', - language: 'pt-BR', - loop: 2 -}, 'Bom dia.'); - -console.log(response.toString()); diff --git a/twiml/voice/say/say-5/say-5.6.x.cs b/twiml/voice/say/say-5/say-5.6.x.cs deleted file mode 100644 index 9bb6150ed0..0000000000 --- a/twiml/voice/say/say-5/say-5.6.x.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using Twilio.TwiML; -using Twilio.TwiML.Voice; - - -class Example -{ - static void Main() - { - var response = new VoiceResponse(); - response.Say("Bom dia.", voice: "alice", language: "pt-BR", loop: 2); - - Console.WriteLine(response.ToString()); - } -} diff --git a/twiml/voice/say/say-5/say-5.6.x.php b/twiml/voice/say/say-5/say-5.6.x.php deleted file mode 100644 index ea424cdcf3..0000000000 --- a/twiml/voice/say/say-5/say-5.6.x.php +++ /dev/null @@ -1,9 +0,0 @@ -say('Bom dia.', ['voice' => 'alice', 'language' => 'pt-BR', - 'loop' => 2]); - -echo $response; diff --git a/twiml/voice/say/say-5/say-5.7.x.java b/twiml/voice/say/say-5/say-5.7.x.java deleted file mode 100644 index 79ec592558..0000000000 --- a/twiml/voice/say/say-5/say-5.7.x.java +++ /dev/null @@ -1,18 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Bom dia.").voice(Say.Voice.ALICE) - .language(Say.Language.PT_BR).loop(2).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-5/say-5.7.x.php b/twiml/voice/say/say-5/say-5.7.x.php deleted file mode 100644 index ea424cdcf3..0000000000 --- a/twiml/voice/say/say-5/say-5.7.x.php +++ /dev/null @@ -1,9 +0,0 @@ -say('Bom dia.', ['voice' => 'alice', 'language' => 'pt-BR', - 'loop' => 2]); - -echo $response; diff --git a/twiml/voice/say/say-5/say-5.8.x.py b/twiml/voice/say/say-5/say-5.8.x.py deleted file mode 100644 index afed004d7f..0000000000 --- a/twiml/voice/say/say-5/say-5.8.x.py +++ /dev/null @@ -1,6 +0,0 @@ -from twilio.twiml.voice_response import VoiceResponse, Say - -response = VoiceResponse() -response.say('Bom dia.', voice='alice', language='pt-BR', loop=2) - -print(response) diff --git a/twiml/voice/say/say-5/say-5.9.x.java b/twiml/voice/say/say-5/say-5.9.x.java deleted file mode 100644 index 79ec592558..0000000000 --- a/twiml/voice/say/say-5/say-5.9.x.java +++ /dev/null @@ -1,18 +0,0 @@ -import com.twilio.twiml.VoiceResponse; -import com.twilio.twiml.voice.Say; -import com.twilio.twiml.TwiMLException; - - -public class Example { - public static void main(String[] args) { - Say say = new Say.Builder("Bom dia.").voice(Say.Voice.ALICE) - .language(Say.Language.PT_BR).loop(2).build(); - VoiceResponse response = new VoiceResponse.Builder().say(say).build(); - - try { - System.out.println(response.toXml()); - } catch (TwiMLException e) { - e.printStackTrace(); - } - } -} diff --git a/twiml/voice/say/say-5/say-6.6.x.rb b/twiml/voice/say/say-5/say-6.6.x.rb deleted file mode 100644 index b9910ed3df..0000000000 --- a/twiml/voice/say/say-5/say-6.6.x.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'twilio-ruby' - -response = Twilio::TwiML::VoiceResponse.new -response.say(voice: 'alice', language: 'pt-BR', loop: 2, message: 'Bom dia.') - -puts response