Tropo eComm 2009 Tutorial

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    Tropo eComm 2009 Tutorial - Presentation Transcript

    1. Introducing Tropo Powered by Voxeo RJ Auburn CTO
    2. Once upon a time…
    3. Now XML is in the enterprise…
    4. Write apps directly in leading languages Tropo.com Ruby
    5. Simple to Learn
      • answer
      • redirect
      • reject
      • call
      • transfer
      • hangup
      • ask
      • say
      • record
      • log
      • wait
      • default
    6. Simple to Deploy
      • Hosted offering
      • Accessible via
        • PSTN numbers
        • SIP URI
        • Direct Skype
        • iNum – Gizmo5, etc
      • Inbound calling
      • Outbound calling
      • 70,000 port capacity
    7. Simple Business Model
      • No contracts
      • No setup costs
      • No commitment
      • Costs as low as 3 cents per minute
      • Credit card or PayPal charge in $50 blocks
      • Five minutes from sign-up to live deployment
      + = GO
    8. Powerful Capabilities
      • Robust call control
      • Play audio, record audio
      • Touch-tone entry
      • High quality speech recognition (ASR)
      • High quality speech synthesis (TTS)
      • Mashups with web services
      • Access to most language libraries
      • Soon: Conferencing, call recording, web services, remote API
    9. Developing with Voxeo XML-based Telephony Voxeo CallXML The easiest telephony markup ever devised    Tool-based Telephony Voxeo Designer Easy web-based, Visio- like rapid app dev tool   VoiceObjects Sophisticated service creation environment, personalization, analytics VoiceXML The only 100% compliant browser CCXML The world’s most proven CCXML engine A Voxeo Company API-based Telephony Tropo Mash-up style API in multiple language    Java Media Control JSR 309 Java SIP Servlets JSR 116/289 A Voxeo Company Simpler apps, all skill levels Sophisticated apps
    10. So lets get to the code already…
    11. T.1: Hello World JavaScript and PHP answer(); say("Hello, world!"); hangup(); Ruby answer say "Hello, world!” hangup Groovy answer() say 'Hello, world!' hangup() Python answer() say("Hello, world !") hangup()
    12. T.2: Asking for Input - JavaScript // ----------- // asking for input // ----------- answer(); result=ask( "Hi. For sales, press 1. For support, press 2.", {choices:"1, 2"} ); if (result.name=='choice') { if (result.value=="1") { say( "sales is not available right now.") } if (result.value=="2") { say( "support is currently on the other line." ) } } hangup();
    13. T.3: Repeating the Question - Ruby # ----------- # repeating the question # ----------- answer options = { :choices => '1, 2', :repeat => 3 } result = ask 'For sales, press 1. For support, press 2.', options if result.name == 'choice' case result.value when '1' say 'sales is not available right now.' when '2' say 'support is currently on the other line.' end end hangup
    14. T.4: Changing Timeouts - Groovy // ----------- // changing the default timeout // ----------- answer(); result=ask( "For sales, press 1. For support, press 2.", [choices:"1, 2",repeat:3, timeout:10 ] ); if (result.name=='choice') { if (result.value=="1") { say( "sales is not available right now.") } if (result.value=="2") { say( "support is currently on the other line." ) } } hangup();
    15. T.5: Speech - Python # Using speech input instead of touch-tone answer() result = ask("Hi. For sales, say sales. For support, say support", {'choices':"sales, support", 'repeat':3}) if (result.name == 'choice'): if (result.value == "sales"): say("Sales is not available right now") if (result.value == "support"): say("Support is currently on the other line.") hangup()
    16. T.6: Speech & DTMF - PHP <?php // ----------- // using both speech and touch-tone input // ----------- answer(); $result = ask( &quot;For sales, just say sales or press 1. For support, say support or press 2.&quot;, array( &quot;choices&quot; => &quot;sales( 1, sales), support( 2, support)&quot; , &quot;repeat&quot; => 3 ) ); if ($result->name==&quot;choice&quot;) { if ($result->value==&quot; sales &quot;) say( &quot;sales is not available right now.&quot; ) ; if ($result->value==&quot; support &quot;) say( &quot;support is currently on the other line.&quot; ) ; } hangup(); ?>
    17. T.7: Transfer Time - Ruby # ----------- # connecting the call to another number () # ----------- answer options = { :choices => 'sales( 1, sales), support( 2, support)', :repeat => 3 } result = ask 'For sales, say sales or press 1. For support, say support or press 2.', options if result.name == 'choice' case result.value when 'sales' say 'Ok, let me transfer you to sales.' transfer '14075551212' when 'support' say 'Sure, let me get support. Please hold.' transfer '14085551212' end end hangup
    18. T.8: Wrong Choices - Groovy answer(); result=ask( &quot;For sales, say sales or press 1. For support, say support or press 2.&quot;, [choices:&quot;sales( 1, sales), support( 2, support)&quot;, repeat:3] ); if (result.name=='choice') { if (result.value==&quot;sales&quot;) { say( &quot;Ok, let me transfer you to sales.&quot;); transfer( &quot;14075551212&quot;); } if (result.value==&quot;support&quot;) { say( &quot;Sure, let me get support. Please hold.&quot; ); transfer( &quot;14085551212&quot;); } } if( result.name=='badChoice') { say( &quot;I'm not sure what you wanted. Goodbye.&quot;) }
    19. T.9: Event Handlers - JavaScript answer(); result=ask( &quot;For sales, just say sales or press 1. For support, say support or press 2.&quot;, { choices:&quot;sales( 1, sales), support( 2, support)&quot;, repeat:3, onBadChoice: function() { say(&quot;I'm sorry, I didn't understand what you said.&quot;) } } ); if (result.name=='choice') { if (result.value==&quot;sales&quot;) { say( &quot;Ok, let me transfer you to sales.&quot; ); transfer( &quot;14075551111&quot;); } if (result.value==&quot;support&quot;) { say( &quot;Sure, let me get support. Please hold.&quot; ); transfer( &quot;14085552222&quot;); } }
    20. T.10: Bad Choices - Ruby answer options = { :choices => 'sales( 1, sales), support( 2, support)', :repeat => 3, :onBadChoice => lambda { say ‘I did not understand what you said.' }, :onTimeout => lambda { say 'Hm. I did not hear anything.' } } result = ask 'For sales, just say sales or press 1. For support, say support or press 2.', options if result.name == 'choice' case result.value when 'sales' say 'Ok, let me transfer you to sales.' transfer '14075551212' when 'support' say 'Sure, let me get support. Please hold.' transfer '14085551212' end end hangup
    21. T.11: Right choices - Groovy // ----------- // handling good choices with event handlers too // ----------- answer(); ask( &quot;Hi. For sales, just say sales or press 1. For support, say support or press 2.&quot;, [ choices:&quot;sales( 1, sales), support( 2, support)&quot;, repeat:3, onBadChoice: { say(&quot;I'm sorry, I didn't understand what you said.&quot;) }, onTimeout: { say(&quot;Hm. I didn't hear anything.&quot;) }, onChoice: {event-> if (event.value=='sales') { say( &quot;Ok, let me transfer you to sales.&quot; ); transfer( &quot;14075551212&quot;); } if (event.value=='support') { say( &quot;Sure, let me get support. Please hold.&quot; ); transfer( &quot;14085551212&quot;); } } ] );
    22. T.12: onEvent - JavaScript answer(); ask( &quot;Hi. For sales, just say sales or press 1. For support, say support or press 2.&quot;, { choices:&quot;sales( 1, sales), support( 2, support)&quot;, repeat:3, onEvent: function( event ) { if (event.name=='badChoice') { say( ”I didn't understand what you said.&quot;) } if (event.name=='timeout') { say( &quot;Hm. I didn't hear anything.&quot;) } if (event.name=='choice') { if (event.value=='sales') { say( &quot;Ok, let me transfer you to sales.&quot; ); transfer( &quot;14075551111&quot;); } if (event.value=='support') { say( &quot;Sure, let me get support. Please hold.&quot; ); transfer( &quot;14085551111&quot;); } } transfer( &quot;14075552222&quot;); } } );
    23. T.13: conditional accept - Ruby # ----------- # reject based on callerid # ----------- answer log &quot;*&quot;*100 + currentCall.inspect if currentCall.callerID == ’4078675309' answer say 'Hello there and goodbye' hangup else reject end
    24. T.14: Bounce the Call - JavaScript // ----------- // redirect // ----------- answer(); if (currentCall.callerID == '4075551111') answer() else redirect( &quot;14075552222&quot;);
    25. T.15: Branching - Groovy // ----------- // Changing behavior based on number called // ----------- answer(); if (currentCall.calledID == '4075551111') say( &quot;Hello Andrew.&quot;); if (currentCall.calledID == '4075552222') say( &quot;Hello Brian. &quot;); hangup();
    26. T.16 Recording - JavaScript answer(); event=record(&quot;Leave your message at the beep. Thanks!&quot;, { beep:true, silenceTimeout: 5, maxTime:60, timeout:10, onRecord:function(event ) { say(&quot;you said &quot; + event.recordURI ) } } ); log( &quot;event.recordURI = &quot; + event.recordURI ); hangup();
    27. Using Language Libraries
      • Tropo programs can use language libraries
      • Most libraries supported – Except…
        • No local file access
        • No threads.
        • No exec()
        • Etc…
      from random import * number = randint(1,1000) answer() say(&quot;Hello. Your magic number today is %s. Goodbye.&quot; % number) hangup()
    28. Mashing Up With Web Services # python app to retrieve and say a text file import urllib number= urllib.urlopen(&quot;http://blog-files.voxeo.com/media/test.txt&quot;).read() answer() say(&quot;Welcome to Tropo. Your magic number is %s. Goodbye.&quot; % number) hangup() // Groovy app to retrieve and say top ten hits from Yahoo music def musicbase = &quot;http://us.music.yahooapis.com/track/v1&quot; def appid = &quot;KgtDvNrV34Eavq_dUF81vBlVLKAOq7o1tj7Tzvu_kYbKsCtBW190VmrvVHK_0w--” say( &quot;, Top 10 Chart Toppers!&quot; ) def toptracksxml = new XmlSlurper().parseText( &quot;${musicbase}/list/published/popular?count=10&appid=${appid}&quot;.toURL().text ) toptracksxml.Track.each { track ->   say( &quot;, Number &quot; + track.ItemInfo.ChartPosition[&quot;@this&quot;] + &quot;, &quot; + track[&quot;@title&quot;] + &quot;, by &quot; + track.Artist[0][&quot;@name&quot;] ) } say( &quot;, Goodbye!&quot; ) hangup()
    29. Getting Started with Tropo
      • www.tropo.com
      • Login with your Voxeo Evolution ID
      • Or - Create a new Account for Free
      • Account -> Your Applications
      • Create New Application
      • Option to create a hosted file (or use a URL)
      • Account -> Your Hosted Files to edit files
    30. So How about some Cash?
      • Write a mashup with Tropo
      • Get $100
    31. Examples
      • Existing examples are posted at http://tropo.com/examples and also hosted at http://github.com/tropo
      • Examples so far include:
        • Auto Attendant
        • RPG
        • RSS reader
        • Yahoo traffic via phone
        • Sports scores
        • Monty Python quote generator
        • Location Data
        • Phone Simon
        • Etc…
    32. So start writing some code!

    + Voxeo CorpVoxeo Corp, 9 months ago

    custom

    1218 views, 3 favs, 1 embeds more stats

    Slides from RJ Auburn's eComm tutorial session on T more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1218
      • 1146 on SlideShare
      • 72 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 35
    Most viewed embeds
    • 72 views on http://blogs.voxeo.com

    more

    All embeds
    • 72 views on http://blogs.voxeo.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories