Successfully reported this slideshow.
Your SlideShare is downloading. ×

Twilio を使えば簡単にできる アプリケーションと電話/SMS連携

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 31 Ad

More Related Content

Viewers also liked (17)

Similar to Twilio を使えば簡単にできる アプリケーションと電話/SMS連携 (20)

Advertisement

More from Masashi Shinbara (20)

Twilio を使えば簡単にできる アプリケーションと電話/SMS連携

  1. 1.  @shin1x1 2015/07/04 Innovation Egg Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
  2. 2. Agenda (c) 2015 Masashi Shinbara @shin1x1 • Twilio とは • Twilio との連携 • 新しい機能
  3. 3. Twilioとは
  4. 4. Twilio (c) 2015 Masashi Shinbara @shin1x1 • 電話、SMSなどコミュニケーションツールに
 特化したサービス • Web アプリケーション、アプリと簡単連携
 => HTTP / REST API / XML
 => 各言語、プラットフォーム用 SDK • 従量課金(電話番号は固定課金)
  5. 5. Twilioのサービス (c) 2015 Masashi Shinbara @shin1x1 • 電話をかける、電話を受ける、匿名通話 • SMSの送受信 • IVR • 通話録音 • 複数人による通話(カンファレンス) • IP ベースの Voice チャット(WebRTC) などなど
  6. 6. 主なユースケース (c) 2015 Masashi Shinbara @shin1x1 • 2要素認証(SMS) • 電話での予約(IVR)、リマインダー(SMS) • 配送通知(SMS) • 電話番号を通知せずに通話 • トラッキング(カスタマーサポート等)
  7. 7. 事例、ビジネスなどは (c) 2015 Masashi Shinbara @shin1x1 http://twilio.kddi-web.com/case/
  8. 8. 事例、ビジネスなどは (c) 2015 Masashi Shinbara @shin1x1 http://www.slideshare.net/twilioforkwc/presentations
  9. 9. Twilioとの連携 (Webアプリケーション)
  10. 10. Twilio との連携 (c) 2015 Masashi Shinbara @shin1x1 • REST API
 (アプリケーション -> Twilio) • TwiML / HTTP リクエスト
 (Twilio -> アプリケーション)
  11. 11. REST API (c) 2015 Masashi Shinbara @shin1x1 • Twillo の REST API を実行 • SDK を利用 • REST API を実行できれば、何でも良い
 (curlコマンドでも可)
  12. 12. 電話をかける(curl) $ curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ ACdf02ee81427160677a16baf79c6d0f6e/Calls.json -d "Url=http://demo.twilio.com/docs/voice.xml" -d "To=%2B14155551212" -d "From=%2B14158675309" -u 'ACdf02ee81427160677a16baf79c6d0f6e:{AuthToken}'
  13. 13. 電話をかける(PHP) $twilio = new Services_Twilio('sid', 'token');
 $twilio->account->calls->create( "+14158675309", "+14155551212", "http://demo.twilio.com/docs/voice.xml"
 );
  14. 14. 電話をかける [DEMO] (c) 2015 Masashi Shinbara @shin1x1 Twilio 図図 - twilio Webサーバ 図図 - twilio REST API 090-xxxx-xxxx
  15. 15. TwiML (c) 2015 Masashi Shinbara @shin1x1 • Twilio への処理を記述 • XML の独自拡張 <Response>
 <Say language="ja-JP">こんにちは!</Say>
 </Response>
  16. 16. TwiML タグの例 (c) 2015 Masashi Shinbara @shin1x1 • Say = テキストを音声読み上げ • Play = 音声ファイル再生 • Sms = SMS / MMS 送信 • Dial = 電話をかける • Record = 通話録音 • Gather = キーパッド入力受付
  17. 17. 電話を受ける (c) 2015 Masashi Shinbara @shin1x1 図図 - twilio 図図 - twilio Webサーバ 050-xxxx-xxxx
  18. 18. 電話を受ける (c) 2015 Masashi Shinbara @shin1x1 図図 - twilio 図図 - twilio Webサーバ HTTPリクエスト POST
  19. 19. 電話を受ける (c) 2015 Masashi Shinbara @shin1x1 図図 - twilio 図図 - twilio Webサーバ 処理を実行 TwiML生成
  20. 20. 電話を受ける (c) 2015 Masashi Shinbara @shin1x1 図図 - twilio 図図 - twilio Webサーバ TwiMLを返す
  21. 21. 電話を受ける (c) 2015 Masashi Shinbara @shin1x1 図図 - twilio 図図 - twilio Webサーバ 音声を流す 入力受付 SMS 送信 匿名電話
  22. 22. 電話を受ける [DEMO] (c) 2015 Masashi Shinbara @shin1x1 図図 - twilio 図図 - twilio Heroku 音声を流す 入力受付 SMS 送信 匿名電話 050-xxxx-xxxx
  23. 23. Twilio と ChatWork 連携 (c) 2015 Masashi Shinbara @shin1x1 http://www.1x1.jp/blog/2013/12/send-voice-message-from- twilio-to-chatwork.html • 留守番電話
  24. 24. 新しい機能
  25. 25. Task Router (c) 2015 Masashi Shinbara @shin1x1 https://www.twilio.com/taskrouter
  26. 26. Twilio Video (c) 2015 Masashi Shinbara @shin1x1 https://www.twilio.com/video
  27. 27. Twilio Video (c) 2015 Masashi Shinbara @shin1x1 • ビデオチャットを手軽に実現 • WebRTC ベース • ファイル転送も可能 • IP Messaging
  28. 28. まとめ
  29. 29. まとめ (c) 2015 Masashi Shinbara @shin1x1 • Twilio は、コミュニケーションツールに
 特化したサービス • 誰もが持っている「電話」を繋げる • HTTP という標準技術で簡単連携
  30. 30. @shin1x1 (c) 2015 Masashi Shinbara @shin1x1
  31. 31. Twilio-UG 大阪 イベント開催! (c) 2015 Masashi Shinbara @shin1x1 • 2015/9月頃 • 大阪市内 • Twilio に関するセッション https://twiliojp-ug.doorkeeper.jp

×