Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Twilioハンズオン!電話の自動音声応答を作ってみよう
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
friendtree16
September 02, 2021
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Twilioハンズオン!電話の自動音声応答を作ってみよう
以下イベントのハンズオンで利用した資料です。
https://kaishi-fc.connpass.com/event/220524/
friendtree16
September 02, 2021
More Decks by friendtree16
See All by friendtree16
Watsonを使ってVoiceControllerを作る
friendtree16
0
74
bluemixユーザー会発表資料
friendtree16
1
1.6k
Other Decks in Programming
See All in Programming
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
33k
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Performance Optimization With LLMs
xleitix
0
140
Railsバージョンを4倍にした話
optim
0
450
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
980
golang-bob.pdf
iwatsukayura
0
130
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.6k
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Docker and Python
trallard
47
4.2k
How to make the Groovebox
asonas
2
2.5k
Skip the Path - Find Your Career Trail
mkilby
1
260
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Raft: Consensus for Rubyists
vanstee
142
7.8k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Into the Great Unknown - MozCon
thekraken
41
2.8k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
540
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Transcript
5XJMJPϋϯζΦϯʂ ిͷࣗಈԠΛ࡞ͬͯΈΑ͏
ࣗݾհ ໊લɿᷤɹஐلʢ͔ͭɹͱ͖ʣ ॴଐɿKDDIΣϒίϛϡχέʔγϣϯζ ɹɹɹTwilioຊ෦ɹϚʔέςΟϯάνʔϜ ܦྺɿ 2014ΑΓiOSɺAndroidͷωΠςΟϒΞϓϦέʔγϣϯ։ൃɺAngularLaravelΛ༻͍ͨΣϒΞϓϦέʔ γϣϯ։ൃʹैࣄɻ20205݄ΑΓTwilioࣄۀ෦ʹδϣΠϯ͠ɺTwilioͷ࠷৽ใͷൃ৴TwilioΛ༻͍ͨ Ҭ՝ղܾΛ୲ɻ 2021ʙɿTwilio Champion
ஶॻɿʢ2021/3ʣʰ͡ΊͯͷTwilioʱֶࣾ
ΞδΣϯμ 1. Twilioʹ͍ͭͯ 2. TwilioΞΧϯτͷ࡞ 3. ి൪߸ͷߪೖ 4. ిͷࣗಈԻԠͷ࡞ʢൃ৴ɾண৴ʣ 5.
SMSૹ৴ 6. Twilio Questͷհ
Twilio ʹ͍ͭͯ
Twilioͱ
Twilio͕ఏڙ͍ͯ͠ΔϓϩμΫτҰཡ
Twilioͷར༻ྫ
Twilioͷར༻ྫ
Twilioͷར༻ྫ
Twilioͷར༻ྫ
KDDIΣϒίϛϡχέʔγϣϯζͱTwilio
TwilioΞΧϯτͷ࡞
TwilioΞΧϯτͷ࡞
TwilioΞΧϯτͷ࡞
ి൪߸ͷߪೖ
ి൪߸ʹ͍ͭͯ • TwilioͰఏڙ͍ͯ͠Δి൪߸ͷࠃ • 100ΧࠃҎ্ • ຊͷ൪߸Ͱఏڙ͍ͯ͠Δి൪߸ͷछྨ • 050൪߸ʢిͷडൃ৴ͷΈɾSMSૹ৴ෆՄʣ •
0120/0800൪߸ʢண՝ۚํࣜʣ • ຊ൪߸ߪೖʹ͋ͨͬͯཹҙࣄ߲ • ຊਓ֬ೝ͕ඞཁ • https://cloudapi.kddi-web.com/magazine/twilio-lesson/how-to-buy-a-telephone-number • 0120൪߸Λߪೖ͢Δʹɺฐࣾ·Ͱ͓͍߹Θ͍ͤͩ͘͞ɻ
ి൪߸ͷߪೖ
ిͷࣗಈԻԠͷ࡞ʢൃ৴ʣ
TwilioͰࣗಈԻԠΛ࡞Δ࣌ͷߏ IBM Cloud
IBM CloudίϚϯυͷ४උ curl -fsSL https://clis.cloud.ibm.com/install/osx | sh iex(New-Object Net.WebClient).DownloadString('https://clis.cloud.ibm.com/ install/powershell')
ࢀরϖʔδ https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli&locale=ja Mac Windows PowerShell Login Ibmcloud login
IBM Cloud FunctionsΛ༗ޮԽ͢Δ 1.IBM CloudͷΞΧϯτʹϩάΠϯ 2.Cloud FunctionsμογϡϘʔυΛදࣔ 3.໊લۭؒΛબ
ιʔείʔυͷ४උ https://github.com/friendtree16/TwiMLServer-IBMCloud-Functions
ιʔείʔυͷ४උ Index.js
ιʔείʔυͷ४උ ύοέʔδΠϯετʔϧ WebpackόϯυϧΛϏϧυ IBM Cloud FunctionsʹσϓϩΠ npm install npm run
build npm run deploy
IBM Cloud FunctionsΛ४උ
IBM Cloud FunctionsΛ४උ
IBM Cloud FunctionsΛ४උ
IBM Cloud FunctionsΛ४උ ύεɿ’/twiml’ͱೖྗ͠·͢ verbɿPOSTΛબ͠·͢ ΞΫγϣϯΛؚΉύοέʔδɿσϑΥϧτΛબ͠·͢ ΞΫγϣϯɿhello-twilioΛબΛબ͠·͢ ԠίϯςϯπɾλΠϓɿΞΫγϣϯ͔Β”Context-Type” ϔομʔΛ༻͠·͢Λબ͠·͢
IBM Cloud FunctionsΛ४උ
IBM Cloud FunctionsΛ४උ URLܦ࿏ͷޙΖʹ/twimlΛ͚ͭͨͷʹͳΓ·͢ɻ ྫɿhttps://xxxxxxxx.us-south.apigw.appdomain.cloud/api/twiml
ిΛൃ৴ʢAPIʣ curl -X POST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Calls.json \ --data-urlencode "Url=https://xxxxxxxx.us-south.apigw.appdomain.cloud/api/twiml" \ --data-urlencode
"To=+819012345678" \ (ൃ৴͢Δઌͷి൪߸) --data-urlencode "From=+15017122661" \ (ൃ৴͢Δݩͷి൪߸) -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
ిΛൃ৴ʢAPI Explorerʣ ൃ৴ઌి൪߸ ൃ৴ݩి൪߸ TwiMLͷURL
ిͷࣗಈԻԠͷ࡞ʢண৴ʣ
ి൪߸ʹURLΛઃఆ ͜͜ʹURLΛઃఆ͢Δ
TwiML Appͷ࡞
TwiML Appͷ࡞ ҙͷ໊લ URL
ண৴ςετ
ϏδϡΞϧϓϩάϥϛϯάͰϑϩʔΛ࡞
Twilio Studio • ίϛϡχέʔγϣϯϫʔΫϑϩʔͷ࡞͔ΒཧΛɺશͯϒϥβ্Ͱߦ͏͜ͱ͕Ͱ͖·͢ ༻్ʹԠͨ͡ίϛϡχέʔγϣϯϫʔΫϑϩʔΛ࡞͠ɺͦΕΒΛҰݩཧ͢Δ͜ͱ͕Ͱ͖·͢ɻϒϥβ ্Ͱ࡞͢ΔίϛϡχέʔγϣϯϫʔΫϑϩʔͷ࣮ߦճʹର͢Δ੍ݶ͋Γ·ͤΜɻ • దͳίϛϡχέʔγϣϯνϟωϧͰͷ௨৴ Twilioɺ༷ʑͳίϛϡχέʔγϣϯνϟωϧΛ༻ҙ͓ͯ͠Γ·͢ɻ ిɺSMSɺFacebook
MessengerLINE ͳͲɺ͓͖ͳίϛϡχέʔγϣϯνϟωϧͱ࿈ܞ͠ɺίϛϡχέʔγϣϯϫʔΫϑϩʔΛߏங͢Δ͜ͱ͕ ՄೳͰ͢ɻ • γʔϜϨεͳσʔλ࿈ܞ ࣗࣾͰطʹ༻͍ͯ͠ΔαʔυύʔςΟγεςϜγεςϜج൫ͱ࿈ܞͰ͖·͢ɻ͜ΕʹΑΓɺγʔϜϨ εͳσʔλͷ࿈ܞ͕ՄೳʹͳΓ·͢ɻ
Twilio StudioͰϑϩʔΛ࡞
Twilio StudioͰϑϩʔΛ࡞ ͢͜ͱ ݴޠͷछྨ Իͷछྨ
ి൪߸ʹϑϩʔΛઃఆ Studio FlowΛબ ࡞ͬͨFlowΛઃఆ
TwiML AppʹURLΛઃఆ ίϐʔ ϖʔετ
ண৴ςετ
SMSͷૹ৴
Programmable SMSͷಛ • SMSΛૹ৴͢ΔࡍΞϝϦΧͷ൪߸Λར༻ • ΦϓγϣϯͰࠃऩϧʔτఏڙ • ૹ৴ݩͱͯ͠ɺΞϧϑΝϕοτΛઃఆ͢Δ͜ͱՄೳ • SMSΛड৴͢Δ͜ͱͰ͖Δ͕ɺૹ৴ऀଆ͕ࠃࡍSMSʹͳͬͯ͠·͏ͨΊɺҙ
SMSૹ৴ curl -X POST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json \ --data-urlencode “Body=͜͜ͰຊจΛࢦఆ͠·͢ɻ" \ --data-urlencode
"From=+15017122661" \ (ૹ৴ݩి൪߸) --data-urlencode “To=+819012345678" \ʢૹ৴ઌి൪߸ʣ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
Twilio Questͷհ
Twilio Questͷհ https://www.twilio.com/quest/ja
͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ