This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// POST https://api.recast.ai/v2/request | |
// Authorization=Token YOUR_RECAST_TOKEN | |
// { | |
// "text" : "I need somone speaks swedish", | |
// "language" : "en" | |
// } | |
function invokeRecast(token, text, language) { | |
try { | |
// Open Connection | |
var url = "https://api.recast.ai/v2/request"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// QUICK START GUIDE | |
// | |
// 1. Create a Cisco Spark bot account, named 'bridge' for example, and store its token | |
// 2. Create a room, named 'SMS Bridge', store its roomId, and add your 'bridge' bot to the room | |
// 3. Create a Cisco Spark Chatops bot account, and store its token | |
// 4. Create 2 Chat rooms, 1 for Logs and 1 for Debug, and add your Chatops bot in there | |
// 5. Clone this gists and make it private, and edit it | |
// 6. Replace the bridge bot token and room, as well as the chatops bot token and chat rooms | |
// 7. Create a Tropo scripting application pointing to your gist raw URL (and remove the revision number to point to the latest version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait(1000); | |
say("Welcome to TechCrunch Disrupt 2016"); | |
wait(1000); | |
say("Join the Cisco Cloud Collaboration Challenge, play with our Communications APIs (Chat, Voice, SMS, Video, Meetings) and win Four Thousands dollars in cash"); | |
wait(1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// QUICK START GUIDE | |
// | |
// 1. Create a Cisco Spark bot account, named 'bridge' for example, and store its token | |
// 2. Create a room, named 'SMS Bridge', store its roomId, and add your 'bridge' bot to the room | |
// 3. Create a Cisco Spark Chatops bot account, and store its token | |
// 4. Create 2 Chat rooms, 1 for Logs and 1 for Debug, and add your Chatops bot in there | |
// 5. Clone this gists and make it private, and edit it | |
// 6. Replace the bridge bot token and room, as well as the chatops bot token and chat rooms | |
// 7. Create a Tropo scripting application pointing to your gist raw URL (and remove the revision number to point to the latest version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var csvFile = loadFile("http://hosting.tropo.com/5051540/www/data/numbers.csv"); | |
var numbersToDial = csvJSON(csvFile); | |
for (var i = 0; i<numbersToDial.length-1; i++){ | |
var callee = numbersToDial[i]; | |
call(callee.number, { network: "SMS" }); | |
say("Hi, " + callee.name); | |
hangup(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say("Thank you for calling the random strategies hotline"); | |
ask("Please enter your phone number followed by the pound sign", { | |
choices: "[9-12 DIGITS]", | |
terminator: "#", | |
mode: "dtmf", | |
onChoice: function(event) { | |
var quote = pickRandomQuote (); | |
message(quote, { | |
to: event.value, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2009 - 2015 Tropo, now part of Cisco | |
* Released under the MIT license. See the file LICENSE | |
* for the complete license | |
*/ | |
// -------------------------------------------- | |
// Simple example of recording | |
// -------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!currentCall) { // No tropo session yet => this is an outgoing call initiated via Tropo token url | |
var offset = +2; // CET+2 | |
var now = new Date(Date.now() + (3600000 * offset)); | |
call(phonenumber); | |
say("it is now " + now.getHours() + ":" + now.getMinutes() + " in Paris, Rome, Madrid, Berlin, Zurich and Amsterdam."); | |
wait(500); | |
offset = +1; // CET+1 | |
now = new Date(Date.now() + (3600000 * offset)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!currentCall) { // No tropo session yet => this is an outgoing call initiated via Tropo token url | |
var offset = +2; // CET+2 | |
var now = new Date(Date.now() + (3600000 * offset)); | |
call(phonenumber); | |
say("it is now " + now.getHours() + ":" + now.getMinutes() + " in Paris, Rome, Madrid, Berlin, Zurich and Amsterdam."); | |
wait(500); | |
offset = +1; // CET+1 | |
now = new Date(Date.now() + (3600000 * offset)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create an account on Tropo.com | |
- this will be the longest task | |
create a script | |