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
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
520
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
App Intentsのビルドプロセスを支える技術
kntkymt
0
360
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
1k
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
110
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
870
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
6
1.8k
Building an Out-of-Order CPU
latte72
1
770
AHC070解法紹介
eijirou
0
120
Family mrubyの進捗
kishima
1
120
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
110
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
4k
The Curious Case for Waylosing
cassininazir
1
510
Speed Design
sergeychernyshev
33
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
What's in a price? How to price your products and services
michaelherold
247
13k
Side Projects
sachag
456
43k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Typedesign – Prime Four
hannesfritz
42
3.2k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
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
͝ࢹௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ