Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Twilio Deep Dive in Supporo

Twilio Deep Dive in Supporo

2017/7/29に開催された、SIGNAL報告会 in 札幌の高橋担当分資料となります。

5448f8c3e8571ba245c70536e9c8cd9a?s=128

Katsumi Takahashi

July 31, 2017
Tweet

More Decks by Katsumi Takahashi

Other Decks in Business

Transcript

  1. 4*(/"-ใࠂձ 5XJMJP%FFQ%JWF ,%%*΢Σϒίϛϡχέʔγϣϯζ 5XJMJPࣄۀ෦ɹߴڮࠀݾ

  2. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 2

    ࣗݾ঺հ ߴڮࠀݾ גࣜձࣾ,%%*΢Σϒίϛϡχέʔγϣϯζ 5XJMJPࣄۀ෦
 ιϦϡʔγϣϯΞʔΩςΫτ GBDFCPPLLBUTVNJUBLBIBTIJ
  3. © 2009 - 2014 Twilio, Inc. All rights reserved. ΞδΣϯμ

    Channels Proxy Functions Speech Recognition & Understand Wireless Global Connectivity FAX
  4. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 0WFSMPPLJOH5XJMJP

  5. 5 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Individuals Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER PROXY SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS UNDERSTAND
  6. ৽ػೳͷ͝঺հɹˌ̍

  7. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 7

  8. 8 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS CHANNELS Individuals PROXY UNDERSTAND
  9. © 2009 - 2014 Twilio, Inc. All rights reserved. CHANNELS

    •ಡ·Εͳ͍௨஌͸ૹΒΕ͍ͯͳ͍ͷͱಉ͡ •ٸ͗ͷ௨஌͸SMS΍LINEɺFacebook Messengerͷํ͕ ྑ͍ •੥ٻͳͲɺޙͰৼΓฦΔՄೳੑ͕ߴ͍௨஌͸ϝʔϧ͕ ྑ͍ Developer Preview Dear Mr. MUELEER, The departure gate for your flight LH935, London - Frankfurt/ Main, 20.02.2017 has changed. The new gate is: 003. Please also check airport information or online flight status. → Flight status ސ٬ʹ࠷దͳνϟωϧͰΞϓϩʔν͢Δ"1*
  10. Copyright (C) KDDI Web Communications Inc. All Rights Reserved curl

    -X POST https://notify.twilio.com/v1/Services/ ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications \ -d 'Identity=00000001' \ -d 'Title=Generic loooooooong title for all Bindings' \ -d 'Body=This is the body for all Bindings' \ -d 'Fcm={"notification":{"title":"New alert","body":"Hello Bob!"}}' \ -d 'Apn={"aps":{"alert":{"title":"New alert","body":"Hello Bob!"}}}' \ -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' 1SPHSBNNBCMF4.4ɺ/PUJGZɺ 1SPYZ͔Βར༻͕Մೳ
  11. DEMO https://www.facebook.com/ Twilioforkwc-279350755742918

  12. ৽ػೳͷ͝঺հɹˌ̎

  13. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 13

  14. 14 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS PROXY Individuals PROXY UNDERSTAND
  15. © 2009 - 2014 Twilio, Inc. All rights reserved. PROXY

    •͓ޓ͍ͷి࿩൪߸Λ஌Βͤͣʹ௨࿩͍ͨ͠ •ҟͳΔϝοηʔδΞϓϦಉ࢜Ͱ΍ΓऔΓ͍ͤͨ͞ •ඇ௨஌Ͱ͸ͳ͘ɺંΓฦ͠ʹ΋ରԠ͍ͨ͠ •Ұఆظ͚ؒͩར༻͍ͨ͠ Developer Preview ސ٬ͱͷϓϥΠόγʔίϛϡχέʔγϣϯΛ ࣮ݱ͢Δ"1*
  16. Copyright (C) KDDI Web Communications Inc. All Rights Reserved wૉૣ͘؆୯ͳߏங

    wεέʔϥϏϦςΟ wϦΞϧλΠϜͷ୅ཧ൪߸ઃఆ w୅ཧ൪߸ͷࣗಈߪೖ wϚϧννϟωϧରԠ wظؒݶఆͷηογϣϯ wςΩετϑΟϧλϦϯά + ᶃ ᶄ ᶅ ଠ࿠ Ֆࢠ ଠ࿠ Ֆࢠ 08012345678 09098765432 5XJMJP1309:ͷಛ௕
  17. Copyright (C) KDDI Web Communications Inc. All Rights Reserved ηογϣϯΛ࡞੒

    ηογϣϯʹϢʔβͷి࿩൪߸Λ௥Ճ ηογϣϯʹׂΓ౰ͯΒΕͨి࿩൪߸ͰϓϥΠόγʔ௨࿩Λ։࢝ + ᶃ ᶄ ᶅ ଠ࿠ Ֆࢠ ଠ࿠ Ֆࢠ 08012345678 09098765432 5XJMJP1309:ͷ͘͠Έ # A session is an instance of two people communicating session = ProxyService.sessions.create( unique_name='ORDER-10003912', ttl=3600 # This session should last 1 hour ) # Add our first participant participant_a = session.participants.create( identifier='+12345678901' ) # Add our second participant participant_b = session.participants.create( identifier='+19876543210' ) # That’s it! Our proxied conversation, complete with masked phone numbers, has been created. # Each participant will now have a Twilio proxy number assigned.
  18. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 18

    https://trustalk.io/
  19. DEMO https://guiltless-ghost-6573.twil.io/

  20. ৽ػೳͷ͝঺հɹˌ

  21. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 21

  22. 22 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS FUNCTIONS Individuals PROXY UNDERSTAND
  23. © 2009 - 2014 Twilio, Inc. All rights reserved. FUNCTIONS

    •TwilioαʔϏεΛߏங͢Δʹ͸αʔόʔ͕ඞཁ •ύϒϦοΫωοτϫʔΫʹ͓͚ΔηΩϡϦςΟରࡦ •Մ༻ੑɺεέʔϥϏϦςΟͳͲͷӡ༻ෛ୲ •̑̌̎Τϥʔରࡦ Public Beta ηΩϡΞͰαʔόʔίετ࡟ݮʹߩݙ͢Δαʔ όʔϨε؀ڥ Πϯλʔωοτ ௨࿩ & SMS Webαʔό εϚϗ
  24. Copyright (C) KDDI Web Communications Inc. All Rights Reserved wΞΫηεՄೳͳυϝΠϯ

    wؔ਺୯ҐͷΞΫηε੍ޚ w๛෋ͳςϯϓϨʔτ w3&45"1*$MJFOU wఆ਺ͷઃఆ w"TTFUTͷఏڙ wϦΞϧλΠϜϩά '6/$5*0/4ͷಛ௕ Πϯλʔωοτ ௨࿩ & SMS εϚϗ
  25. Functionsͷ͘͠Έ • ΞΧ΢ϯτຖʹϢχʔΫͳυϝΠϯΛੜ ੒ • FunctionຖʹACLΛઃఆՄೳ • ݴޠ͸Node.jsʢཪ͸AWS Lambdaʣ •

    contextΛ࢖ͬͯ؀ڥม਺ͷಡΈࠐΈ • context͔ΒgetTwilioClientʹΞΫηεՄೳ ʢRestAPIΛ࣮ߦՄೳʣ • eventΛ࢖ͬͯHTTPύϥϝʔλΛऔಘ • TwilioͷNodeϔϧύϥΠϒϥϦΛར༻Մ
  26. ม਺؅ཧ • KEYͱVALUEʹΑΔ૊Έ߹Θͤ • ίʔυ಺͔Β͸contextܦ༝Ͱࢀর • Enable ACCOUNT_SID and AUTH_TOKEN

    ΛνΣοΫ͢Δ͜ͱͰAccountSidͱ AuthToken΋contextܦ༝ͰऔಘՄೳ ʢgetTwilioClientͷݺͼग़࣌͠͸ඞਢʣ
  27. Assets • ੩తϑΝΠϧͷอଘ৔ॴ • 4MB·ͰͷϑΝΠϧΛΞοϓϩʔυՄೳ • Webίϯςϯπʢhtml, css, jsʣ΋ϗετ Մೳ

    • Functionsͱಉ͡υϝΠϯΛར༻ • ACL͸ར༻ෆՄ • ݱ࣌఺Ͱ͸APIܦ༝ͰΞοϓϩʔυ͸Ͱ ͖ͳ͍
  28. ςϯϓϨʔτ

  29. ར༻ՄೳͳϥΠϒϥϦ Ϟδϡʔϧ όʔδϣϯ ղઆ UXJMJP BQMIB /PEFKT༻ͷ5XJMJPϔϧύʔϥΠϒϥϦ HPU ? ܰྔͳIUUQϥΠϒϥϦͰɺ֎෦ͷ"1*ݺͼग़͠ͳͲʹར༻Մೳ

    MPEBTI ? ഑ྻͷૢ࡞Λ؆୯ʹ͢ΔͨΊͷϥΠϒϥϦ YNMEPN ? 8$%0.MFWFMʹ४ڌͨ͠%0.ύʔαʔ
  30. © 2009 - 2014 Twilio, Inc. All rights reserved. Functionsͷྉۚ

  31. DEMO ઌఔͷProxyσϞͷཪଆ

  32. ৽ػೳͷ͝঺հɹˌ

  33. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 33

  34. 34 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS UNDERSTAND Individuals PROXY UNDERSTAND
  35. © 2009 - 2014 Twilio, Inc. All rights reserved. Speech

    Recognition & ɹɹUnderstand •ैདྷͷTranscription͸ਫ਼౓͕௿͍ʢ೔ຊޠඇରԠʣ •Ի੠ೝٕࣝज़ͷ޲্ •ࣗવݴޠղੳ͢Δ͜ͱͰ࠶ར༻͕Մೳ •จࣈσʔλͰ͋Ε͹ɺ͋ΒΏΔνϟωϧͰར༻Ͱ͖Δ Public Beta ίϛϡχέʔγϣϯʹίάχςΟϒͳཁૉΛ ૊Έ߹ΘͤΔ͜ͱ͕Ͱ͖Δ Speech Recognition Voice Coming Soon { “key”:”value”, “key”:”value” } Understand Messages
  36. Copyright (C) KDDI Web Communications Inc. All Rights Reserved w(BUIFSಈࢺͷJOQVUλά

    wձ࿩Λܧଓ͠ͳ͕ΒԻ੠ೝࣝ w೔ຊޠΛؚΉΧࠃͷݴޠʹର Ԡ wώϯτʹΑΔਫ਼౓޲্ w̏ԁม׵ͷैྔ੍՝ۚ 4QFFDI3FDPHOJUJPO Public Beta
  37. Gatherಈࢺʹ௥Ճ͞Εͨύϥϝʔλ • inputύϥϝʔλ • dtmf / speech / dtmf speech

    ʢলུ࣌͸ dtmfʣ • languageύϥϝʔλ • BCP-47 language tagʢ೔ຊޠ͸ ja-JP লུ࣌͸ en-usʣ • hintsύϥϝʔλ • ม׵ͤ͞΍͘͢͢ΔͨΊͷ୯ޠ
  38. Copyright (C) KDDI Web Communications Inc. All Rights Reserved wࣗવݴޠ෼ੳʢ/-6ʣ

    wಠࣗͷ෼ੳϞσϧΛઃఆՄೳ wྲྀΕͷதͰͷݺͼग़͠ 5XJMJP6OEFSTUBOE "I would like to fly from San Francisco to Detroit on December 6th" { "intent": "book_flight", "departure": "San Francisco", "arrival": "Detroit", "time": "December 6th" } Coming Soon
  39. DEMO 050-3196-9150

  40. ৽ػೳͷ͝঺հɹˌ̑

  41. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 41

  42. 42 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS WIRELESS Individuals PROXY UNDERSTAND
  43. © 2009 - 2014 Twilio, Inc. All rights reserved. Wireless

    Global Connectivity •IoTࢢ৔ͷ֦େ •3G/LTEͷधཁ •ॊೈͰϦʔζφϒϧͳྉۚମܥ͕ඞཁ •ϫϯετοϓʹΑΔӡ༻ •ϓϩάϥϚϒϧʹ੍ޚ Preview ੈքதͲ͜Ͱ΋࢖͑Δɺίϯτϩʔϥ ϒϧͳ௨৴Πϯϑϥ"1* Voice SMS </> Command ࠃࡍϩʔϛϯά DATA
  44. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 4JNT

    6TBHF3FDPSET $PNNBOET %JBM4JN 4NTUPbTJN` 8JSFMFTT(MPCBM$POOFDUJWJUZ Preview 4*.Χʔυͷ஫จɺΞΫςΟϕʔγϣϯɺ؅ཧ ௨৴ྔͷ্ݶઃఆɺར༻ྔͷ؅ཧ ..ઐ༻ͷ4.4ૹड৴ػೳ Ի੠௨࿩ͷαϙʔτʢ$PNNJOHTPPOʣ 4.4ͷαϙʔτʢ$PNNJOHTPPOʣ Twilio Wirelessʹ͸ి࿩൪߸ͱ͍͏֓೦͕͋Γ·ͤΜ
  45. SIMͷঢ়ଶ ग़ՙঢ়ଶ New Ready ίʔυʹΑΔ Ϩδετ RatePlan΍ UniqueNameΛઃఆ Active Suspended

    Deactivated Canceled खಈͰҠߦ or 250Kb௨৴ or 3ϲ݄ܦա 72࣌ؒܦա खಈͰҠߦ or 3ϲ݄ܦա Activeͳঢ়ଶͷ࣌ͷΈֹ݄جຊྉ͕ඞཁ खಈ खಈ
  46. Rate Plan Service Data / Voice / Messaging Command͸Messagingʹؚ·Ε·͢ DATA

    Metering Pooled / Individual ྉۚϓϥϯͷҧ͍ https://jp.twilio.com/wireless/pricing Monthly limit (MB) ݄ؒ௨৴ྔͷ্ݶΛઃఆ Roaming NATIONAL / INTERNATIONAL 7PJDF4.4͸ɺ೔ຊͰ͸·ͩ αϙʔτ͞Ε͍ͯ·ͤΜɻ
  47. Data • εϚϗͳͲʹૠͯ͠ɺσʔλ௨৴͕Մೳɻ • APN͸ɺwireless.twilio.comʢϢʔβೝূͷઃఆ ͸ෆཁʣɻ • 100GB·Ͱ͸15ԁ/MBͷैྔ੍ɻֹ݄جຊྉ ʢ300ԁʣ͕ඞཁɻ

  48. Command • M2M༻ͷSMSΛར༻ͨ͠ίϚϯυͷૹड৴Λ࣮ݱ • RestAPIܦ༝ͰσόΠεʹίϚϯυΛૹ৴ • σόΠε͔Β͸ɺి࿩൪߸ʮ2936ʯʹSMSΛૹ৴͢ΔͱSIMʹઃ ఆ͓͍ͯͨ͠Webhook͕ൃՐ • ૹड৴ͱ΋8ԁ/command

    curl -X POST https://wireless.twilio.com/v1/Commands \ -d 'Sim=SIM01' \ -d 'Command=on' \ -d 'CallbackUrl=https://xxxxxx.com/callback' \ -u 'ACxxxxxxxxxxxxxxxxxxxxxxxxx:your_auth_token' ίϚϯυൃߦAPI
  49. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 8JSFMFTT(MPCBM$POOFDUJWJUZ

    Preview σʔλ௨৴ྉ ίϚϯυൃߦྉ ֹ݄جຊྉ ֹ݄ར༻ྔ .#͋ͨΓ୯Ձ ʙ(# ԁ ʙ(# ԁ (#ʙ5# ԁ ʙ5# ԁ ʙ5# ԁ ʙ5# ԁ ʙ5# ԁ 5#ʙ ԁ 300ԁ/SIM 8ԁ/ίϚϯυɹ˞ૹड৴ͱ΋
  50. DEMO RaspberryPi x Twilio Wireless

  51. ৽ػೳͷ͝঺հɹˌ

  52. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 52

  53. 53 Engagement Cloud Programmable Communications Cloud Super Network Runtime Systems

    Departments Intelligent services Communications APIs AUTHY NOTIFY TASKROUTER SMS COPILOT SMS PRIVACY CALL CONTROL MEDIA ENGINE INSIGHTS PROG. SMS PROG. VOICE PROG. VIDEO PROG. CHAT PROG. FAX PHONE NUMBERS SHORT CODES SIP TRUNKING WIRELESS CHANNELS Global coverage Elastic capacity Network learning Instant provisioning Clean numbers FUNCTIONS DEBUGGER ASSETS USERS CREDENTIALS SYNC ADD-ONS Programmable FAX Individuals PROXY UNDERSTAND
  54. © 2009 - 2014 Twilio, Inc. All rights reserved. Programmable

    FAX •೔ຊͱυΠπ͸FAXΛΑ͘࢖͏ •ड৴ͨ͠FAXΛεΩϟϯͯ͠อଘͨ͠ΓɺϓϦ ϯτͨ͠ࢴΛFAXૹ৴͢Δख͕ؒ໘౗ •OCRͳͲΛ׆༻ͨ͠ۀ຿ޮ཰Խ 1%'σʔλΛ'"9ΠϯϑϥΛ௨ͯ͡ૹड ৴͢ΔͨΊͷ"1* </> APP ૹ৴ Public Beta ड৴ 050൪߸
  55. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 1SPHSBNNBCMF'"9

    Public Beta </> TwilioͷετϨʔδ 1. ண৴ 2. ண৴௨஌ 3. TwiML 4. PDFอଘ 5. URL௨஌ </> ϢʔβͷετϨʔδ 1. ૹ৴ࢦࣔ 2. PDFऔಘ 3. ૹ৴ 4. ݁Ռ௨஌ wૹ৴͸छྨͷղ૾౓ʹରԠ w1%'อଘظؒ͸೔ wαΠζ͸"͔64ϦʔΨϧ wૹड৴༻ʹ'"9ઐ༻ͷ൪߸͕ඞ ཁ
  56. ར༻ྉۚ ׬શैྔ՝ۚʢ੫ࠐΈʣ ԁʗϖʔδ ௨৴ྉʢΤϥεςΟοΫ4*1τϥϯΩϯάͷྉۚʹ ४͡·͢ɻ೔ຊͰ͸ݻఆి࿩Ѽૹ৴͕ԁʗ෼ɺ൪߸Ѽͷड৴͕ ԁʗ෼ʣ ݄͋ͨΓϖʔδ·Ͱແྉʢ௨৴ྉ͸͔͔Γ·͢ʣ ͳ͓ɺྉۚ͸࢑ఆͰ͋Γɺ঎༻αʔϏε։࢝࣌ʹ͸มߋ͞ΕΔՄೳੑ ͕͋Γ·͢ɻ

  57. fax2zendesk • 050൪߸ʹண৴ͨ͠Βɺड৴FAXΛPDFʢఴ෇ϑΝΠϧʣ ͱͯ͠Zendeskͷఴ෇ϑΝΠϧొ࿥ • ఴ෇ϑΝΠϧͷλάΛऔಘͯ͠ɺ৽نνέοτΛొ࿥ • ετϦʔϛϯάAPIΛར༻͠ɺTwilio͔Β௚઀Zendeskαʔ όʔʹσʔλΛૹ৴ •

    ZendeskͷAPI͸ɺgotϥΠϒϥϦΛ׆༻ • https://github.com/twilioforkwc/fax2zendesk </> 1. ண৴ 2. Functions 3. PDFಡΈग़͠ 4. ఴ෇ొ࿥ 5. νέοτ
 ొ࿥
  58. Copyright (C) KDDI Web Communications Inc. All Rights Reserved 5IBOLZPV

    %PZPVIBWFBOZRVFTUJPOT