Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Phone Communications in Javascript with Tropo Serverless

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 35 Anzeige

Phone Communications in Javascript with Tropo Serverless

Herunterladen, um offline zu lesen

@SteveSfartz nous parlera de la plateforme Tropo Serverless qui permet de créer des assistants vocaux interactifs, ou bien des interactions via SMS au travers de code javascript, déployés en mode Serverless, 100% géré 24/24 7/7 par les équipes Tropo avec un petit zoom sur un petit outil :
https://github.com/ObjectIsAdvantag/tropo-ready-vscode

@SteveSfartz nous parlera de la plateforme Tropo Serverless qui permet de créer des assistants vocaux interactifs, ou bien des interactions via SMS au travers de code javascript, déployés en mode Serverless, 100% géré 24/24 7/7 par les équipes Tropo avec un petit zoom sur un petit outil :
https://github.com/ObjectIsAdvantag/tropo-ready-vscode

Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Andere mochten auch (15)

Anzeige

Ähnlich wie Phone Communications in Javascript with Tropo Serverless (20)

Weitere von Cisco DevNet (20)

Anzeige

Aktuellste (20)

Phone Communications in Javascript with Tropo Serverless

  1. 1. Phone Communications in Javascript Stève SFARTZ API Evangelist - Cisco DevNet stsfartz@cisco.com, @SteveSfartz, github://ObjectIsadvantag
  2. 2. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public /Cisco/DevNet/SteveSfartz • API Evangelist @CiscoDevNet • Cisco Spark Apps & Tropo APIs • code addict, nodejs, love story with #golang • France and all around Europe • hosted @PIRL – Paris Innovation Center & Research Lab • twitter://@SteveSfartz • github://ObjectIsAdvantag “vision without execution is hallucination” -- Thomas Edison stsfartz@cisco.com @SteveSfartz
  3. 3. 3  Taking your Chat bots to the next stage  Zero to advanced Voice Machines with Tropo T so what’s on the menu
  4. 4. Taking your bots to the next stage
  5. 5. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Taking bots to the next stage Hosting • Many options: IaaS, Containers, PaaS • Concerns: Availability, Scalability, Security, Rate Limitation • Pricing balance: who’s willing to pay for the bot, and how much • Heroku PaaS Free Dynos • AWS/Google/Microsoft free plans • Currently testing Serverless Functions
  6. 6. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Google Functions pricing 6
  7. 7. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public The Serverless Functions opportunity 7 https://github.com/ObjectIsAdvantag/devnetexpress-bot Remember? a bot is nothing more than a POST endpoint … with an healthcheck !
  8. 8. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public The Serverless Functions opportunity > gcloud alpha functions deploy sparkbot --entry-point googlefunction --stage-bucket objectisadvantag-functions --trigger-http --memory 128MB --timeout 1s 8 https://github.com/ObjectIsAdvantag/devnetexpress-bot
  9. 9. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public The Serverless Functions opportunity • An easy way to remove the Serverless burden 9 https://github.com/ObjectIsAdvantag/devnetexpress-bot
  10. 10. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Taking bots to the next stage • But who created the bot ? • What is the usage policy ? • How can I contact support, send feedback ? • What about my data privacy ?
  11. 11. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public @CiscoDevNet /about 11
  12. 12. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Taking bots to the next stage Is the bot down ?
  13. 13. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 13 Bot Metadata HealthCheck
  14. 14. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Is the bot down ? a proposal • Register the Bot in a Universal Database • Chat services supported • Healthcheck endpoints • Author, Policies • Metadata again… • chatbot.land domain reserved • who’s in ? twitter://@SteveSfartz 14
  15. 15. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Join the Cisco DevNet code labs https://learninglabs.cisco.com/tracks/collab-cloud
  16. 16. From Zero to advanced Voice Machines with Tropo
  17. 17. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public What is Tropo ? Cloud APIs enabling developers to quickly and easily embed communication capabilities into their applications and business processes.
  18. 18. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public + • Ask • Call • Conference • Hangup • Record • Reject • Say • Transfer 18 Tropo in a nutshell
  19. 19. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public say("hello world"); 19 Text to Speech
  20. 20. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public 20 Play an Audio File say(“http://.../troporocks.mp3");
  21. 21. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Outbound Voice Call call("+14155550100"); say("Tag, you’re it!"); 2
  22. 22. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Send a Text Message call("+14155550100", {network:"SMS"} ); say("Tag, you’re it!"); 2
  23. 23. Asking a Question var result = ask("What's your favorite color? Choose red, blue or green.", { choices:"red, blue, green" }); say("You said " + result.value); log("They said " + result.value); 2
  24. 24. Voicemail Application record("Leave your message. Press pound when finished.", { beep:true, timeout:10, silenceTimeout:7, maxTime:60, terminator:'#', recordFormat:"audio/mp3", recordURI:"ftp://.../file.mp3" }); 2
  25. 25. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public How to setup your own Voice Machine • Signup at http://tropo.com • Create a new Scripting app • Point to an IVR script: http://bit.ly/TROPO-IVR • Pick a phone number • Save the application 25
  26. 26. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Globally available Global Outgoing Calls & Messages Numbers in 42 countries 80 speech languages 26
  27. 27. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Account Types • Free • Low-volume • Restricted use • No production usage • 24x7 support Developer • Pre-paid • Credit Card • Self-service signup • Shared Cloud • one minute billing increments Production 27
  28. 28. Travaux pratiques JS-Republic 07 56 78 01 42
  29. 29. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public How to setup a custom IVR • The IVR is composed of : • a local phone number • a custom script executed by the Tropo Scripting platform dials #1 +07 56 78 01 42 « Welcome » details via SMS calls Voice Machine script 29
  30. 30. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public IVR script highlights • Forking a new session to send a SMS 30
  31. 31. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Join the Cisco DevNet code labs https://learninglabs.cisco.com/tracks/collab-cloud
  32. 32. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Serverless is great • no deployment hurdles, scalability from day 1 … but • tedious dev cycles (commit, push, test) • painful to diagnose (read logs through)  local emulators to the rescue  run and debug locally  integrate in a CI/CD tool chain Lessons learnt
  33. 33. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Tropo Ready! • Tropo Ready! • + URL to the project • Browse the project https://github.com/ObjectIsAdvantag/tropo-ready-vscode
  34. 34. © 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public Tropo Emulator in practice https://github.com/ObjectIsAdvantag/tropo-ready-vscode
  35. 35. Thank you @CiscoDevNet @CiscoSparkDev @SteveSfartz

Hinweis der Redaktion

  • Bots are fun !!!
    Thoughts and lessons learnt building:
    Voice Machines
    Chat Bots
  • You’re in control
  • TODO: Add URL to the VOICE Machine
  • Understand how the Tropo Scripting platform manages your files
    For development, host your scripts on an external URL for changes to reflect instanlty
    Tropo will fetch your script everytime
    Host on Github gist, edit your favorite IDE
    When going live, host your scripts on Tropo Production File Servers
  • Live coding

×