Posts Tagged ‘cloud’

Deploying Tropo based applications to CloudFoundry with Grails

Tuesday, July 5th, 2011

Cloud Foundry is a Platform-as-a-Service platform that lets you deploy Spring, Grails, Rails and Node.js applications in the cloud. We’ve already shown in previous blog posts how you could easily create Tropo-powered Grails applications with Tropo’s Grails webapi plugin. However, in this blog post I’m going to show you an screencast in which you will learn how to deploy your applications to CloudFoundry.

As you will see in the screencast, deploying your Tropo applications with Grails to CloudFoundry is really easy. A few commands and you get your application not only in one, but in two cloud platforms!! So, you’ve got on one hand Tropo’s cloud platform which lets you run voice powered applications that can quickly scale and on the on the other hand you run all the business logic in CloudFoundry’s cloud platform. So you don’t have to worry about server and resources provisioning and you can take advantage of CloudFoundry’s infrastructure to scale.

So, here is the screencast:

Also, be sure to check these links to get extra information:

Hope you like it!!

Join Tropo, Rackspace, SendGrid & Dyn at CloudCamp Austin

Wednesday, March 9th, 2011

Tropo is joining Rackspace, SendGrid, Dyn, Austin PHP Meetup and Austin Python Meetup groups for the first CloudCamp App Workshop during SXSW Interactive in Austin, Texas on 3/14/2011.

The CloudCamp App Workshop is a new event organized by CloudCamp where Cloud App Developers can learn how to develop scaleable, reliable Cloud-based Applications. Whether you are building a consumer app, mobile app, an B2B app, or an application for your own company, the CloudCamp App Workshop will help you learn about the tools & services you need to get started in the Cloud.

Register: http://cloudworkshopaustin.eventbrite.com/

Price: Free

LocationValhalla Lounge 710 Red River Austin, TX 78701

Schedule:

2:00pm Networking & Drinks

2:30pm Lightning Talks

- Rackspace

- SMS & Voice Apps- Johnny Diggz of Tropo

- Cloud Email Delivery – Robert Phillips of SendGrid

3:00pm Workshop

4:00pm Hands on Labs

5:00pm 5 minute demos

6:00pm Wrap-up

Tropo Coming to CloudCamp Phoenix

Tuesday, November 2nd, 2010

Tropo will be attending CloudCamp Phoenix this weekend 11/6 and available to answer your cloud communications questions.  The event is being held at:

Apollo Group 4025 S Riverpoint Pkwy, Phoenix, AZ 85040

CloudCamp is an unconference where early adopters of Cloud Computing technologies exchange ideas. With the rapid change occurring in the industry, we need a place where we can meet to share our experiences, challenges and solutions. At CloudCamp, you are encouraged to share your thoughts in several open discussions, as we strive for the advancement of Cloud Computing. End users, IT professionals and vendors are all encouraged to participate.

Bring your cloud communications to this event so that we can help you with our Voice, SMS, IM, and Twitter communication strategies.

Asterisk & Tropo and a Single Adhearsion Dialplan

Friday, October 8th, 2010

A key goal of Tropo AGItate is to allow you to use Tropo seamlessly with an existing Asterisk server. With AGItate you may add any Tropo feature to your existing Asterisk server without installing additional Asterisk modules and using the AGI protocol you already know. These features include:

  • Speech Synthesis/TTS in 7 languages and 2 dialects
  • Speech Recognition/ASR in 7 languages and 2 dialects
  • Transcription of audio messages, like voicemail
  • Multi-channel support for SMS, Instant Messaging and Twitter
  • Conferencing
  • and more

The ease of interoperability between Asterisk and the Tropo cloud highlights exactly why we run and make available an open SIP network. Every application created gets a SIP address automatically:

To show this in action I have chosen Adhearsion as the framework to serve diaplans for both Asterisk and Tropo to process a single caller on an Asterisk server. Here is a quick overview of how it works:

Through the use of SIP, SIP headers and call tagging in Adhearsion, you may write a single dialplan that handles the call and interaction between the Asterisk and Tropo cloud seamlessly. Here is a quick walkthrough of the dialplan itself and the dialplan taking calls in action:

The entire dialplan may be seen here:

# Serves up FastAGI to your Asterisk server
asterisk_agi {
  # Add a custom SIP Header to the session so that when we send to
  # Tropo we may know which Asterisk call the Tropo call is
  # servicing
  execute 'SIPAddHeader', "x-ahn-id: #{channel}"

  # Send the call to your Tropo AGItate app on Tropo
  # option 'g' is required in order for the call to come back
  # to the dialplan
  dial 'SIP/9991479110@sip.tropo.com', { :options => 'g' }

  # After the call comes back find this call and then
  # grab the tag of the result we are looking for
  this_call = Adhearsion.active_calls.find(channel)
  favorite_muppet = ''
  this_call.tags.each do |tag|
    hash = JSON.parse tag
    favorite_muppet = hash['favorite_muppet'] if hash['favorite_muppet']
  end

  # Play back the appropriate audio file based on the user's input by passing the appropriate value
  # in a custom SIP header
  case favorite_muppet
  when 'kermit'
    # Tropo supports wav/mp3 playback, so pass it a link
    execute 'SIPAddHeader', "x-ahn-mp3file: http://downloads.members.tripod.com/Tiny_Dancer/beingreen.mp3"
  when 'swedish chef'
    execute 'SIPAddHeader', "x-ahn-mp3file: http://dl.dropbox.com/u/25511/Voxeo/TTS-Example/SwedishChef.mp3"
  else
    execute 'SIPAddHeader', "x-ahn-choice: bad"
  end
  dial 'SIP/9991479110@sip.tropo.com', { :options => 'm(silence)' }
}

# Serves up FastAGI to your Tropo AGItate application
tropo_agi {
  # Grab the SIP headers from the Tropo cloud delivered in the first message over AGI and made
  # available in Adhearsion as 'tropo_headers'
  headers = JSON.parse tropo_headers

  if headers['x-ahn-mp3file']
    # If we have the mp3file header, then lets play the fileback, otherwise ask for the input
    play headers['x-ahn-mp3file']
  elsif headers['x-ahn-choice']
    # If the bad choice header is here, we know they did not choose a Muppet they should have
    play 'You silly muppet fan, the best muppets are kermit or the swedish chef. Try again another time. Goodbye.'
  else
    # Invoke the Tropo Speech Synthesis/TTS to speak to the caller
    # https://www.tropo.com/docs/scripting/say.htm
    play 'Welcome to the Muppetorium.'
    # Invoke the Tropo Speech Recognition/ASR to ask the caller for input
    # https://www.tropo.com/docs/scripting/ask.htm
    result = execute 'ask', { :prompt   => 'Which is your favorite muppets character?',
                              :choices  => 'kermit, fozzie, statler, waldorf, oscar, bert, ernie, swedish chef',
                              :attempts => 3,
                              :timeout  => 10 }.to_json

    # Parse the result from Tropo into a Ruby hash
    result = JSON.parse result.split('200 result=')[1]

    # Find the active Adhearsion call object based on the SIP header passed into Tropo
    call = Adhearsion.active_calls.find headers['x-ahn-id']

    # Tag that call object with the value of the speech recognition, hangup the call between Asterisk and Tropo
    # so that Asterisk may continue handling it on its own
    call.tag({ :favorite_muppet => result['interpretation'] }.to_json)
  end
}

Or downloaded here. Thats it! You now have a fully featured Asterisk instance leveraging the best of what the cloud has to offer without adding or purchasing any additional software for your Asterisk box.

To get started with AGItate we created a howto walkthrough that you may see here. Tropo is free for development use, so there is no reason not to give it a try. Enjoy!

Meet Tropo at CloudCamp Vancouver

Wednesday, March 10th, 2010

Tropo will be at Cloud Camp Vancouver this Saturday talking cloud communications APIs. We’re sponsoring the event and Adam Kalsey will be there, participating in sessions and showing off Tropo’s services for voice, IM, and SMS in the cloud.

If you’re in the Vancouver area and interested in cloud computing, come on by this free event.

What will you do at Cloud Camp? You will learn how to take advantage of cloud computing to do things you could not do before, to save money, to be more flexible and agile. You can get your questions answered about security, privacy, and compliance. You can learn about and understand the differences between public cloud, private cloud, and hybrid clouds. Hear from your peers who are building and developing on the cloud about how they have stopped buying and installing and maintaining physical servers.

CloudCamp is a free full-day “unconference” where early adopters of Cloud Computing technologies exchange ideas. With the rapid change occurring in the industry, we need a place where we can meet to share our experiences, challenges and solutions. At CloudCamp, you are encouraged to share your thoughts in several open discussions, as we strive for the advancement of Cloud Computing.

Details and free registration on the CloudCamp site.

Talking to the Cloud, and the Cloud Talking Back

Friday, August 28th, 2009

One of the great things about Tropo is that it has a speech recognition and text to speech engine built right in. This allows a user to speak commands to your voice application and respond to them with dynamically generated content. We make every effort to make these features robust and yet simple to use for developers.

In the first case, we will ask the user to provide their zipcode and then play it back to them:

  answer
  options = { 'choices'     => '[5 DIGITS]',
              'repeat'      => 3,
              'onBadChoice' => lambda { say 'That is not a zip code, please try again.'} }
  choice = ask 'Please enter your zip code.', options

  # Add spaces to speak back individual digits, rather than one number
  zipcode = String.new
  choice.value.split(//).each { |char| zipcode << char + ' ' }
  say "Your zip code is #{zipcode}. Goodbye."

The key to this is the option ‘choices’, which is where we may pass our simple grammar to prompt the user. In this case we are asking the speech recognition engine to ask for up to [5 DIGITS] and the user may then either use their phone’s touch tone keypad or speak their response. We then take that response, which comes back as a string, and add spaces in between the numbers so that it is spoken back as you would a zipcode as opposed to a single number.

Now that is for digits, of course one may always use their telephone to enter digits you say. Now lets look at asking our customer questions:

  
answer
  options = { 'choices'     => 'cheese, pepperoni, vegetarian',
              'repeat'      => 3,
              'onChoice'    => lambda { |choice| say "We will send you a #{choice.value}
                                                      pizza. Goodbye." },

              'onBadChoice' => lambda { say 'We do not have that kind of pizza,
                                             please try again.'} }
  choice = ask 'Which pizza would you like to order?', options

In this case we are passing the ‘choices’ option a string that provides multiple spoken choices that the user may speak to have a valid response. We are then playing that response back to the user when we recognize it as the value is populated in ‘choices.value’.

That was for simple multiple choice, what if more than one phrase may qualify for a single response?:

  
answer
  options = { 'choices'     => 'denver broncos(broncos, denver, denver broncos),
                                dallas cowboys(cowboys, dallas, dallas cowboys)',
              'repeat'      => 3,
              'onChoice'    => lambda { |choice| say "A so you like the #{choice.value}
                                                      do you?. Goodbye." },
              'onBadChoice' => lambda { say 'We do not have that team, please try again.'} }
  choice = ask 'Who is your favorite football team?', options

First off, I am not making any statements about NFL teams here, just shortening the choices for the purposes of brevity.  In this case we are passing the ‘choices’ option a string that contains the responses we expect (ie – denver broncos) with a series of possible spoken phrases inside the parenthesis that could qualify. When one of those phrases is recognized, the qualifying value gets populated in the ‘choices.value’.

So what are you waiting for? Start talking with your users. There are many more examples in multiple languages may be found here.