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. Clone this gists and make it secrete | |
// 2. Create an incoming integratin in a Spark Room from the Spark Web client : http://web.ciscospark.com | |
// 3. Replace INCOMING_INTEGRATION_SUFFIX by the integration id, example: Y2lzY29zcGFyazovL3VzL1dFQkhPT0svZjE4ZTI0MDctYzg3MS00ZTdmLTgzYzEtM2EyOGI1N2ZZZZZ | |
// 4. Create your Tropo application pointing to your gist URL, append /raw/tropodevops-sample.js to the gist URL | |
// | |
// Cisco Spark Logging Library for Tropo | |
// |
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 the alphabet recognizer"); | |
wait(1000); | |
ask("Please spell your word, and press # when done", { | |
choices:"https://gist.githubusercontent.com/ObjectIsAdvantag/fdd65dcff2b6518fa741130b36060870/raw/mygrammar.xml", | |
terminator:"#", | |
attempts:3, |
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
<?xml version="1.0"?> | |
<grammar xmlns="http://www.w3.org/2001/06/grammar" root="main"> | |
<rule id="main" scope="public"> | |
<item repeat="1-16"> | |
<ruleref uri="#alphabet"> | |
<tag>out.concept = out.concept + rules.alphabet;</tag> | |
</ruleref> | |
</item> |
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) { | |
say("Welcome to Zurich"); | |
wait(500); | |
say("See you at the hackathon"); | |
} | |
else { | |
call(phonenumber, { "network":canal }); | |
//call(phonenumber); | |
say(msg); | |
} |
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' in locals(): | |
msg = currentCall.initialText | |
if msg == "yes": | |
say("go get some") | |
else: | |
say("I am not a big coffee drinker myself neither") | |
else: | |
call(phonenumber, {"network":"SMS"}) | |
say("do you want coffee ?") |
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) { | |
choice = currentCall.initialText.toLowerCase(); | |
if ((choice.startsWith("yes")) || (choice.startsWith("yep")) || (choice.startsWith("sure")) || (choice.startsWith("oui"))) { | |
say("go get some !"); | |
} | |
else { | |
if ((choice.startsWith("no")) || (choice.startsWith("non"))) { | |
say("well, I am not a big coffee drinker myself neither..."); | |
} | |
else { |
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. Clone this gists and make it private | |
// 2. Create an incoming integratin in a Spark Room from the Spark Web client : http://web.ciscospark.com | |
// 3. Replace YOUR_INTEGRATION_SUFFIX by the integration id, example: Y2lzY29zcGFyazovL3VzL1dFQkhPT0svZjE4ZTI0MDctYzg3MS00ZTdmLTgzYzEtM2EyOGI1N2ZZZZZ | |
// 4. Create your Tropo application pointing to your gist URL, append /raw/tropodevops-sample.js to the gist URL | |
// | |
// Cisco Spark Logging Library for Tropo | |
// |
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 a Group room | |
- from Spark API | |
- or from Web client with 2 people + you | |
- change the name of the room to Chatops | |
- add a message stating this is where my logs will go | |
add an integration | |
- create it as an incoming webhook | |
- name if "from my server" |
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 | |
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)); |