Introducing  Tropo Powered by Voxeo RJ Auburn  CTO
Once upon a time…
Now XML is in the enterprise…
Write apps directly in leading languages Tropo.com Ruby
Simple to Learn <ul><li>answer </li></ul><ul><li>redirect </li></ul><ul><li>reject </li></ul><ul><li>call </li></ul><ul><l...
Simple to Deploy <ul><li>Hosted offering  </li></ul><ul><li>Accessible via </li></ul><ul><ul><li>PSTN numbers </li></ul></...
Simple Business Model <ul><li>No contracts </li></ul><ul><li>No setup costs </li></ul><ul><li>No commitment </li></ul><ul>...
Powerful Capabilities <ul><li>Robust call control </li></ul><ul><li>Play audio, record audio </li></ul><ul><li>Touch-tone ...
Developing with Voxeo XML-based Telephony Voxeo CallXML The easiest telephony markup ever devised    Tool-based Telepho...
So lets get to the code already…
T.1: Hello World JavaScript and PHP answer(); say(&quot;Hello, world!&quot;); hangup(); Ruby answer say &quot;Hello, world...
T.2: Asking for Input - JavaScript // ----------- // asking for input // ----------- answer(); result=ask( &quot;Hi. For s...
T.3: Repeating the Question - Ruby # ----------- # repeating the question # ----------- answer options = { :choices => '1,...
T.4: Changing Timeouts - Groovy // ----------- // changing the default timeout // ----------- answer(); result=ask( &quot;...
T.5: Speech - Python # Using speech input instead of touch-tone answer() result = ask(&quot;Hi. For sales, say sales. For ...
T.6: Speech & DTMF - PHP <?php // ----------- // using both speech and touch-tone input // ----------- answer(); $result =...
T.7: Transfer Time - Ruby # ----------- # connecting the call to another number () # ----------- answer options = { :choic...
T.8: Wrong Choices - Groovy answer(); result=ask( &quot;For sales, say sales or press 1. For support, say support or press...
T.9: Event Handlers - JavaScript answer(); result=ask( &quot;For sales, just say sales or press 1. For support, say suppor...
T.10: Bad Choices - Ruby answer options = { :choices  => 'sales( 1, sales), support( 2, support)', :repeat  => 3, :onBadCh...
T.11: Right choices - Groovy // ----------- // handling good choices with event handlers too // ----------- answer(); ask(...
T.12: onEvent - JavaScript answer(); ask( &quot;Hi. For sales, just say sales or press 1. For support, say support or pres...
T.13: conditional accept - Ruby # ----------- # reject based on callerid # ----------- answer log &quot;*&quot;*100 + curr...
T.14: Bounce the Call - JavaScript // ----------- // redirect // ----------- answer(); if (currentCall.callerID == '407555...
T.15: Branching - Groovy // ----------- // Changing behavior based on number called // ----------- answer(); if (currentCa...
T.16 Recording - JavaScript answer(); event=record(&quot;Leave your message at the beep.  Thanks!&quot;, { beep:true, sile...
Using Language Libraries <ul><li>Tropo programs can use language libraries </li></ul><ul><li>Most libraries supported – Ex...
Mashing Up With Web Services # python app to retrieve and say a text file import urllib number= urllib.urlopen(&quot;http:...
Getting Started with Tropo <ul><li>www.tropo.com </li></ul><ul><li>Login with your Voxeo Evolution ID </li></ul><ul><li>Or...
So How about some Cash?
<ul><li>Write a mashup with Tropo </li></ul><ul><li>Get $100 </li></ul>
Examples <ul><li>Existing examples are posted at  http://tropo.com/examples  and also hosted at  http://github.com/tropo <...
So start writing some code!
Upcoming SlideShare
Loading in …5
×

Tropo eComm 2009 Tutorial

2,440 views

Published on

Slides from RJ Auburn's eComm tutorial session on Tropo - a new service from Voxeo that allows people to create phone applications using common web programing languages. Developers can create applications using ruby, javascript, groovy, php or python.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,440
On SlideShare
0
From Embeds
0
Number of Embeds
218
Actions
Shares
0
Downloads
67
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Tropo eComm 2009 Tutorial

  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 <ul><li>answer </li></ul><ul><li>redirect </li></ul><ul><li>reject </li></ul><ul><li>call </li></ul><ul><li>transfer </li></ul><ul><li>hangup </li></ul><ul><li>ask </li></ul><ul><li>say </li></ul><ul><li>record </li></ul><ul><li>log </li></ul><ul><li>wait </li></ul><ul><li>default </li></ul>
  6. Simple to Deploy <ul><li>Hosted offering </li></ul><ul><li>Accessible via </li></ul><ul><ul><li>PSTN numbers </li></ul></ul><ul><ul><li>SIP URI </li></ul></ul><ul><ul><li>Direct Skype </li></ul></ul><ul><ul><li>iNum – Gizmo5, etc </li></ul></ul><ul><li>Inbound calling </li></ul><ul><li>Outbound calling </li></ul><ul><li>70,000 port capacity </li></ul>
  7. Simple Business Model <ul><li>No contracts </li></ul><ul><li>No setup costs </li></ul><ul><li>No commitment </li></ul><ul><li>Costs as low as 3 cents per minute </li></ul><ul><li>Credit card or PayPal charge in $50 blocks </li></ul><ul><li>Five minutes from sign-up to live deployment </li></ul>+ = GO
  8. Powerful Capabilities <ul><li>Robust call control </li></ul><ul><li>Play audio, record audio </li></ul><ul><li>Touch-tone entry </li></ul><ul><li>High quality speech recognition (ASR) </li></ul><ul><li>High quality speech synthesis (TTS) </li></ul><ul><li>Mashups with web services </li></ul><ul><li>Access to most language libraries </li></ul><ul><li>Soon: Conferencing, call recording, web services, remote API </li></ul>
  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(&quot;Hello, world!&quot;); hangup(); Ruby answer say &quot;Hello, world!” hangup Groovy answer() say 'Hello, world!' hangup() Python answer() say(&quot;Hello, world !&quot;) hangup()
  12. T.2: Asking for Input - JavaScript // ----------- // asking for input // ----------- answer(); result=ask( &quot;Hi. For sales, press 1. For support, press 2.&quot;, {choices:&quot;1, 2&quot;} ); if (result.name=='choice') { if (result.value==&quot;1&quot;) { say( &quot;sales is not available right now.&quot;) } if (result.value==&quot;2&quot;) { say( &quot;support is currently on the other line.&quot; ) } } 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( &quot;For sales, press 1. For support, press 2.&quot;, [choices:&quot;1, 2&quot;,repeat:3, timeout:10 ] ); if (result.name=='choice') { if (result.value==&quot;1&quot;) { say( &quot;sales is not available right now.&quot;) } if (result.value==&quot;2&quot;) { say( &quot;support is currently on the other line.&quot; ) } } hangup();
  15. T.5: Speech - Python # Using speech input instead of touch-tone answer() result = ask(&quot;Hi. For sales, say sales. For support, say support&quot;, {'choices':&quot;sales, support&quot;, 'repeat':3}) if (result.name == 'choice'): 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()
  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 <ul><li>Tropo programs can use language libraries </li></ul><ul><li>Most libraries supported – Except… </li></ul><ul><ul><li>No local file access </li></ul></ul><ul><ul><li>No threads. </li></ul></ul><ul><ul><li>No exec() </li></ul></ul><ul><ul><li>Etc… </li></ul></ul>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 <ul><li>www.tropo.com </li></ul><ul><li>Login with your Voxeo Evolution ID </li></ul><ul><li>Or - Create a new Account for Free </li></ul><ul><li>Account -> Your Applications </li></ul><ul><li>Create New Application </li></ul><ul><li>Option to create a hosted file (or use a URL) </li></ul><ul><li>Account -> Your Hosted Files to edit files </li></ul>
  30. So How about some Cash?
  31. <ul><li>Write a mashup with Tropo </li></ul><ul><li>Get $100 </li></ul>
  32. Examples <ul><li>Existing examples are posted at http://tropo.com/examples and also hosted at http://github.com/tropo </li></ul><ul><li>Examples so far include: </li></ul><ul><ul><li>Auto Attendant </li></ul></ul><ul><ul><li>RPG </li></ul></ul><ul><ul><li>RSS reader </li></ul></ul><ul><ul><li>Yahoo traffic via phone </li></ul></ul><ul><ul><li>Sports scores </li></ul></ul><ul><ul><li>Monty Python quote generator </li></ul></ul><ul><ul><li>Location Data </li></ul></ul><ul><ul><li>Phone Simon </li></ul></ul><ul><ul><li>Etc… </li></ul></ul>
  33. So start writing some code!

×