Building Tropo Apps with Grails
Upcoming SlideShare
Loading in...5
×
 

Building Tropo Apps with Grails

on

  • 1,234 views

Building IVR applications with Tropo, a cloud-based telephony and messaging system, is easy. This presentation details support for Tropo in Grails using the tropo-webapi-grails plugin.

Building IVR applications with Tropo, a cloud-based telephony and messaging system, is easy. This presentation details support for Tropo in Grails using the tropo-webapi-grails plugin.

Statistics

Views

Total Views
1,234
Views on SlideShare
1,226
Embed Views
8

Actions

Likes
0
Downloads
13
Comments
0

4 Embeds 8

http://us-w1.rockmelt.com 3
https://www.linkedin.com 3
https://si0.twimg.com 1
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Building Tropo Apps with Grails Building Tropo Apps with Grails Presentation Transcript

  • Building Tropo Appswith GrailsChristopher Bartling
  • Summary 2■ What is Tropo?■ How do I integrate Tropo with Grails?■ Tropo WebAPI overview■ Lessons learned
  • Terminology 3■ IVR: Interactive Voice Response■ VoiceXML or VXML:■ CCXML: Call Control XML■ TTS: Text to Speech View slide
  • What is Tropo? 4■ Cloud-based services for telephony and messaging ■ Make and receive phone calls ■ Use voice recognition ■ Messaging via SMS, IM, or Twitter■ Backed by Voxeo.com ■ Industry leader in IVR and VoIP solutions View slide
  • Why should I care? 5■ Many applications benefit from voice and messaging user interfaces■ Tropo provides telephony and messaging infrastructure and APIs for integrating these services into your applications ■ Traditionally this was hosted in-house■ APIs insulate developers from needing to write in VoiceXML, CCXML, and other markups
  • How do I use it with Grails? 6■ Install the Tropo WebAPI Grails plugin (version 0.21) ■ tropo-webapi-grails ■ Provides the TropoBuilder object for building standard Tropo JSON documents ■ TropoService for provisioning and servicing Tropo applications
  • TropoBuilder 7■ Builds Tropo JSON response documents■ Provides an array of JSON objects to control the Tropo-based applications hosted in the cloud ■ ask, call, conference, hangup, message, on, record, redirect, reject, result, say, session, startRecording, stopRecording, transfer
  • TropoService 8■ Grails service for administering Tropo applications ■ Abstraction around Tropo’s REST API ■ Create, update, and delete Tropo applications ■ Provision phone numbers, IM addresses, tokens ■ Retrieve information about applications
  • Tropo.com 9■ Web-based administration UI ■ Create, update, and delete Tropo applications in the cloud ■ Provision telephone numbers (both local and toll- free) and IM accounts for your applications ■ Application debugging tool ■ Billing profile
  • Tropo Development 10■ Create your Grails application■ Add tropo-webapi-grails Grails plugin■ Create your starting endpoint in your Grails app■ Create application on tropo.com ■ Need externally available starting endpoint for your Grails app ■ Provision local phone number
  • Tropo WebAPI 11■ Use the TropoBuilder object to create Tropo-compliant JSON objects■ Tropo calls back to your application for instructions on how to power the IVR infrastructure in the Tropo cloud■ You application is a collection of interconnected endpoints, rendering Tropo JSON objects to control the IVR infrastructure in the Tropo cloud
  • Tropo WebAPI JSON objects 12
  • session 13■ Sent to your application in the first Tropo request■ The callId field identifies this request body to a unique call in Tropo ■ You will use the callId as the correlation identifier for all requests■ https://www.tropo.com/docs/webapi/session.htm
  • result 14■ Sent to your application in all subsequent requests from Tropo■ The callId field identifies this request body to a unique call in Tropo ■ You will use the callId as the correlation identifier for all requests■ https://www.tropo.com/docs/webapi/result.htm
  • say 15■ Say something to the caller ■ Can be TTS or pre-recorded audio ■ Does not wait for user response■ https://www.tropo.com/docs/webapi/say.htm
  • ask 16■ Say something to the caller and wait for a response from the caller ■ Can be TTS or audio file for say ■ Response can be collected speech or touch-tone keypad (DTMF) ■ The choices object specifies how Tropo handles user input■ https://www.tropo.com/docs/webapi/ask.htm
  • on 17■ Specifies event handling ■ continue ■ error ■ incomplete ■ hangup■ https://www.tropo.com/docs/webapi/on.htm
  • hangup 18■ Hangs up the current call.■ https://www.tropo.com/docs/webapi/hangup.htm
  • record 19■ Plays a prompt and then waits for a response from the caller, which it records■ Responses may be speech recognition or touch-tone keypresses (DTMF)■ At the conclusion of the recording, the collected audio file is sent to FTP or HTTP POST/Multipart Form endpoint
  • transfer 20■ Transfer an in-progress call to another destination or phone number ■ Can be a phone number or a SIP address■ https://www.tropo.com/docs/webapi/transfer.htm
  • startRecordingstopRecording 21■ Start and stop recording a call session■ Resultant recording can be sent via FTP or HTTP POST/Multipart form to a URL■ You have to provide an endpoint or FTP server to receive the binary file■ https://www.tropo.com/docs/webapi/startrecording.htm■ https://www.tropo.com/docs/webapi/stoprecording.htm
  • Lessons Learned 22■ Testing ■ Test call flow in isolation by using a testing Tropo application and a testing endpoint to bootstrap the call session appropriately ■ In the future, look to building an automated test runner that can be scripted and exercise the Grails app through HTTP calls
  • Lessons Learned 23■ The ask noinput and timeout APIs don’t work well ■ Issues with audio getting played out of sequence ■ Build this functionality into our call flow explicitly using on events
  • Lessons Learned 24■ Call recording is all or nothing ■ Unable to start and stop recording to allow for omission of sensitive data recording ■ We toggle recording for debugging call flow ■ Keep it off for production usage
  • Lessons Learned 25■ Call duration can be difficult to determine ■ Maintain a last Tropo callback timestamp on call session domain object ■ Update the timestamp on each Tropo callback invocation ■ Allows approximation of the call duration
  • Lessons Learned 26■ Abandoned calls can be difficult to determine ■ We used a Quartz job in Grails ■ Periodically inspect in-progress calls ■ If last Tropo callback timestamp is beyond a specified threshold, set the call session to abandoned
  • Contact Information 27■ Twitter: @cbartling■ Blog: http://bartling.blogspot.com■ https://bitbucket.org/cebartling/tropo-presentations