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

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

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!