SlideShare a Scribd company logo
1 of 33
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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simple to Deploy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simple Business Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],+ = GO
Powerful Capabilities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
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
So lets get to the code already…
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()
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();
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
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();
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()
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(); ?>
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
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;) }
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;); } }
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
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;); }  }  ] );
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;);  } } );
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
T.14: Bounce the Call - JavaScript // ----------- // redirect // ----------- answer(); if (currentCall.callerID == '4075551111')  answer() else redirect( &quot;14075552222&quot;);
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();
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();
Using Language Libraries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],from random import * number = randint(1,1000) answer() say(&quot;Hello. Your magic number today is %s. Goodbye.&quot; % number) hangup()
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()
Getting Started with Tropo ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
So How about some Cash?
[object Object],[object Object]
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
So start writing some code!

More Related Content

Similar to Tropo eComm 2009 Tutorial

Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Coursemussawir20
 
What Is Php
What Is PhpWhat Is Php
What Is PhpAVC
 
Voicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.comVoicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.comVoxeo Corp
 
Php Training
Php TrainingPhp Training
Php Trainingadfa
 
Pseudocode used in IMP-35 course
Pseudocode used in IMP-35 coursePseudocode used in IMP-35 course
Pseudocode used in IMP-35 courseJussi Pohjolainen
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan Maulana
 
Php Loop
Php LoopPhp Loop
Php Looplotlot
 
XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARStephan Schmidt
 
REST, HTTP, and the PATCH verb (with kittens)
REST, HTTP, and the PATCH verb (with kittens)REST, HTTP, and the PATCH verb (with kittens)
REST, HTTP, and the PATCH verb (with kittens)almostobsolete
 
Php Calling Operators
Php Calling OperatorsPhp Calling Operators
Php Calling Operatorsmussawir20
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for DesignersMatthew Turland
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationAnkush Jain
 
Phone calls and sms from php
Phone calls and sms from phpPhone calls and sms from php
Phone calls and sms from phpDavid Stockton
 
LocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputsLocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputsSuite Solutions
 
Testing Adhearsion Applications
Testing Adhearsion ApplicationsTesting Adhearsion Applications
Testing Adhearsion ApplicationsLuca Pradovera
 
Dti2143 chap 4 control statement part 2
Dti2143 chap 4 control statement part 2Dti2143 chap 4 control statement part 2
Dti2143 chap 4 control statement part 2alish sha
 

Similar to Tropo eComm 2009 Tutorial (20)

Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
Voicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.comVoicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.com
 
Php Training
Php TrainingPhp Training
Php Training
 
Pseudocode used in IMP-35 course
Pseudocode used in IMP-35 coursePseudocode used in IMP-35 course
Pseudocode used in IMP-35 course
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Php Loop
Php LoopPhp Loop
Php Loop
 
XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEAR
 
REST, HTTP, and the PATCH verb (with kittens)
REST, HTTP, and the PATCH verb (with kittens)REST, HTTP, and the PATCH verb (with kittens)
REST, HTTP, and the PATCH verb (with kittens)
 
Php Calling Operators
Php Calling OperatorsPhp Calling Operators
Php Calling Operators
 
PHP Basics for Designers
PHP Basics for DesignersPHP Basics for Designers
PHP Basics for Designers
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
Phone calls and sms from php
Phone calls and sms from phpPhone calls and sms from php
Phone calls and sms from php
 
Web development
Web developmentWeb development
Web development
 
LocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputsLocalizingStyleSheetsForHTMLOutputs
LocalizingStyleSheetsForHTMLOutputs
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
Testing Adhearsion Applications
Testing Adhearsion ApplicationsTesting Adhearsion Applications
Testing Adhearsion Applications
 
Dti2143 chap 4 control statement part 2
Dti2143 chap 4 control statement part 2Dti2143 chap 4 control statement part 2
Dti2143 chap 4 control statement part 2
 
Testing Merb
Testing MerbTesting Merb
Testing Merb
 

More from Voxeo Corp

Voxeo Summit Day 2 -What's new in CXP 14
Voxeo Summit Day 2 -What's new in CXP 14Voxeo Summit Day 2 -What's new in CXP 14
Voxeo Summit Day 2 -What's new in CXP 14Voxeo Corp
 
Voxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKsVoxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKsVoxeo Corp
 
Voxeo Summit Day 2 - Voxeo CXP - IVR on Steroids
Voxeo Summit Day 2 - Voxeo CXP - IVR on SteroidsVoxeo Summit Day 2 - Voxeo CXP - IVR on Steroids
Voxeo Summit Day 2 - Voxeo CXP - IVR on SteroidsVoxeo Corp
 
Voxeo Summit Day 2 - Using CXP hotspot analytics
Voxeo Summit Day 2 - Using CXP hotspot analyticsVoxeo Summit Day 2 - Using CXP hotspot analytics
Voxeo Summit Day 2 - Using CXP hotspot analyticsVoxeo Corp
 
Voxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactionsVoxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactionsVoxeo Corp
 
Voxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTCVoxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTCVoxeo Corp
 
Voxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business usersVoxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business usersVoxeo Corp
 
Voxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fansVoxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fansVoxeo Corp
 
Voxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topicsVoxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topicsVoxeo Corp
 
Voxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsessionVoxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsessionVoxeo Corp
 
Voxeo Summit Day 1 - Extending your IVR investment to mobile
Voxeo Summit Day 1 - Extending your IVR investment to mobileVoxeo Summit Day 1 - Extending your IVR investment to mobile
Voxeo Summit Day 1 - Extending your IVR investment to mobileVoxeo Corp
 
Voxeo Summit Day 1 - The Art of The Possible
Voxeo Summit Day 1 - The Art of The PossibleVoxeo Summit Day 1 - The Art of The Possible
Voxeo Summit Day 1 - The Art of The PossibleVoxeo Corp
 
Voxeo Summit Day 1 - Prophecy log search
Voxeo Summit Day 1 - Prophecy log searchVoxeo Summit Day 1 - Prophecy log search
Voxeo Summit Day 1 - Prophecy log searchVoxeo Corp
 
Voxeo Summit Day 1 - Customer experience analytics
Voxeo Summit Day 1 - Customer experience analyticsVoxeo Summit Day 1 - Customer experience analytics
Voxeo Summit Day 1 - Customer experience analyticsVoxeo Corp
 
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)Voxeo Corp
 
Voxeo Summit Day 1 - A view into the Voxeo cloud
Voxeo Summit Day 1 - A view into the Voxeo cloudVoxeo Summit Day 1 - A view into the Voxeo cloud
Voxeo Summit Day 1 - A view into the Voxeo cloudVoxeo Corp
 
Voxeo Summit Day 1 - Lessons learned from large scale deployments
Voxeo Summit Day 1 - Lessons learned from large scale deploymentsVoxeo Summit Day 1 - Lessons learned from large scale deployments
Voxeo Summit Day 1 - Lessons learned from large scale deploymentsVoxeo Corp
 
Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?
Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?
Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?Voxeo Corp
 
How Do You Hear Me Now?
How Do You Hear Me Now?How Do You Hear Me Now?
How Do You Hear Me Now?Voxeo Corp
 
CCXML For Advanced Communications Applications
CCXML For Advanced Communications ApplicationsCCXML For Advanced Communications Applications
CCXML For Advanced Communications ApplicationsVoxeo Corp
 

More from Voxeo Corp (20)

Voxeo Summit Day 2 -What's new in CXP 14
Voxeo Summit Day 2 -What's new in CXP 14Voxeo Summit Day 2 -What's new in CXP 14
Voxeo Summit Day 2 -What's new in CXP 14
 
Voxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKsVoxeo Summit Day 2 -Voxeo APIs and SDKs
Voxeo Summit Day 2 -Voxeo APIs and SDKs
 
Voxeo Summit Day 2 - Voxeo CXP - IVR on Steroids
Voxeo Summit Day 2 - Voxeo CXP - IVR on SteroidsVoxeo Summit Day 2 - Voxeo CXP - IVR on Steroids
Voxeo Summit Day 2 - Voxeo CXP - IVR on Steroids
 
Voxeo Summit Day 2 - Using CXP hotspot analytics
Voxeo Summit Day 2 - Using CXP hotspot analyticsVoxeo Summit Day 2 - Using CXP hotspot analytics
Voxeo Summit Day 2 - Using CXP hotspot analytics
 
Voxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactionsVoxeo Summit Day 2 - Securing customer interactions
Voxeo Summit Day 2 - Securing customer interactions
 
Voxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTCVoxeo Summit Day 2 - Real-time communications with WebRTC
Voxeo Summit Day 2 - Real-time communications with WebRTC
 
Voxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business usersVoxeo Summit Day 2 - Voxeo CXP for business users
Voxeo Summit Day 2 - Voxeo CXP for business users
 
Voxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fansVoxeo Summit Day 2 - Creating raving fans
Voxeo Summit Day 2 - Creating raving fans
 
Voxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topicsVoxeo Summit Day 2 - Advanced CCXML topics
Voxeo Summit Day 2 - Advanced CCXML topics
 
Voxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsessionVoxeo Summit Day 2 - The science of customer obsession
Voxeo Summit Day 2 - The science of customer obsession
 
Voxeo Summit Day 1 - Extending your IVR investment to mobile
Voxeo Summit Day 1 - Extending your IVR investment to mobileVoxeo Summit Day 1 - Extending your IVR investment to mobile
Voxeo Summit Day 1 - Extending your IVR investment to mobile
 
Voxeo Summit Day 1 - The Art of The Possible
Voxeo Summit Day 1 - The Art of The PossibleVoxeo Summit Day 1 - The Art of The Possible
Voxeo Summit Day 1 - The Art of The Possible
 
Voxeo Summit Day 1 - Prophecy log search
Voxeo Summit Day 1 - Prophecy log searchVoxeo Summit Day 1 - Prophecy log search
Voxeo Summit Day 1 - Prophecy log search
 
Voxeo Summit Day 1 - Customer experience analytics
Voxeo Summit Day 1 - Customer experience analyticsVoxeo Summit Day 1 - Customer experience analytics
Voxeo Summit Day 1 - Customer experience analytics
 
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
Voxeo Summit Day 1 - Communications-enabled Business Processes (CEBP)
 
Voxeo Summit Day 1 - A view into the Voxeo cloud
Voxeo Summit Day 1 - A view into the Voxeo cloudVoxeo Summit Day 1 - A view into the Voxeo cloud
Voxeo Summit Day 1 - A view into the Voxeo cloud
 
Voxeo Summit Day 1 - Lessons learned from large scale deployments
Voxeo Summit Day 1 - Lessons learned from large scale deploymentsVoxeo Summit Day 1 - Lessons learned from large scale deployments
Voxeo Summit Day 1 - Lessons learned from large scale deployments
 
Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?
Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?
Voxeo Jam Session: What's New in Prophecy 11 and VoiceObjects 11?
 
How Do You Hear Me Now?
How Do You Hear Me Now?How Do You Hear Me Now?
How Do You Hear Me Now?
 
CCXML For Advanced Communications Applications
CCXML For Advanced Communications ApplicationsCCXML For Advanced Communications Applications
CCXML For Advanced Communications Applications
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

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.
  • 6.
  • 7.
  • 8.
  • 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.
  • 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.
  • 30. So How about some Cash?
  • 31.
  • 32.
  • 33. So start writing some code!