Archive for the ‘Screencasts’ Category

Dial and SMS your APIs with Tropo

Thursday, December 22nd, 2011

The number of APIs available are increasing by the day and so is the popularity of Node.JS, the server-side event-driven javascript framework. This got me thinking… How cool would it be to be able to call or sms an API with your phone using Node.JS?

This is a pretty simple thing to do with Tropo and Nodester. Tropo has an NPM module available for adding Voice, SMS, and Instant Messaging to Node.JS applications and Nodester has REST APIs available to report on the status of the platform. 25 lines of Node.JS code later, we now have an Node.JS application using the Tropo API to dial and sms the API to retrieve the status of the platform.

Here’s the phone number: (480) 428-8723 to call or SMS.

Install the Tropo WebAPI and Mikeal Rogers’ Request NPM modules:

npm install tropo-webapi -g
npm install request -g

Run this code on localhost or deploy it to a Node.JS hosting service like Nodester.

var http = require('http');
var tropowebapi = require('tropo-webapi');
var request = require('request');

http.createServer(function (req, res) {

	// Create a new instance of the TropoWebAPI object.
	var tropo = new tropowebapi.TropoWebAPI(); 	

	// Fetch Nodester status -> http://api.nodester.com/status
	// returns {"status":"up","appshosted":2878,"appsrunning":1759}
	request('http://api.nodester.com/status', function (error, response, body) {
	     if (!error && response.statusCode == 200) {

	       // console.log(body) // Print status
	       var statusreq = JSON.parse(body);

	       tropo.say('nodester is ' + statusreq["status"] + ' and hosting ' + statusreq["appshosted"] + ' applications with '+ statusreq["appsrunning"] + ' running at the moment ');

	       res.writeHead(200, {'Content-Type': 'application/json'}); 
           res.end(tropowebapi.TropoJSON(tropo));
	     }
	   })

}).listen(13151);

One of the really cool things about the Tropo API is that you can write your app one time and it automatically runs on multiple communications channels such as: Voice, SMS, and Instant Message.

Up in the Air with Tropo and ScraperWiki

Tuesday, December 20th, 2011

ScraperWiki is a powerful cloud-based service that lets you scrape data from online documents and websites.

When you write a scraper – a script to pull information from a web resource and then parse out the bits you want – it will execute inside the ScraperWiki environment.

SMS flight information

You can store the data that is scraped inside a data store and then access the data from outside the ScraperWiki environment using their API. Scrapers can be written in one of several different languages – Ruby, PHP and Python.

ScraperWiki and Tropo operate in a very similar way. The Tropo scripting environment allows you to write scripts in one of several different languages, including Ruby, PHP and Python (Groovy and JavaScript are also supported).

Your script executes inside the Tropo environment, which means you can make direct connections to external resources – like the ScraperWiki API – from within your executing script. There is no need for extra HTTP overhead, and the additional step of posting to a back end server to connect to other APIs or resources.

In the following screencast, I demonstrate how to use Tropo and ScraperWiki to quickly and easily build an airport information system for the Philadelphia International Airport.

All of the code for this example can be found here. If you’d like to view the actual scraper I wrote on ScraperWiki, you can find it here.

This is still a work in progress – I’d like to run this script multiple times per day (ideally, maybe once an hour) to get updates to flight information and ensure that the app has the most up to date flight status. The voice dialog could also use a little tweaking, and I’d like to offer the option of repeating the information.

But even with these refinements aside, it is evident how combining these two powerful cloud resources can generate a pretty useful application in a very short time.

Tropo and ScraperWiki are a powerful combination. Happy flying!

Tropo Jambox Megaphone

Monday, December 19th, 2011

After rocking out to a little White Stripes’ Icky Thump, Chris Matthieu shows you how to build a megaphone using a Jawbone Jambox, an iPhone, and the Tropo Scripting API!

Here’s the Ruby script used in the video:

say "Welcome to the Tropo megaphone app! Please turn on and pair your Jam box now."

while $currentCall.isActive do

record "Record your message at the beep and then switch audio to jam box.", {
        :beep => true,
        :timeout => 10,
        :silenceTimeout => 7,
        :maxTime => 60,
        :onRecord => lambda { |event|
            log "Recording result = " + event.recordURI
            say event.recordURI}
        }

end

Rock on!

Customer Spotlight: Zapier

Friday, December 16th, 2011

We are excited to feature Zapier on this week’s Tropo Customer Spotlight! Today I sat down with Wade Foster, one of the co-founders of Zapier, to discuss their business and learn more about how they are using Tropo for their Instant Messaging services.

What is Zapier?

Zapier allows you to “zap your apps!” You can build unique integrations between your favorite applications, one mouse click at a time without writing a single line of code!

  • Own Your Data: Zapier makes it easy to import and export data automagically with your favorite web apps. Don’t get locked in.
  • No Data Entry: Quit filling out the same information between different applications, and let Zapier do the heavy lifting for you.
  • Fill-in Missing Features: Never be at the mercy of vendors to build features or integrations. Use Zapier to add missing functionality.

Zapier uses Python, Django, and the Tropo Scripting API to deliver Instant Messaging services to users on AIM, GTalk, MSN, and Yahoo!

To learn more about Zapier, visit their website at http://zapier.com!

Here is a screencast of Zapier using Tropo for their Instant Messaging services:

Writing and Deploying a Tropo App with an iPad

Tuesday, September 27th, 2011

I recently found myself at a conference without WIFI and i wanted to write and deploy a new Tropo voice application to the cloud. Armed with my 3g iPad, this task was a snap! See for yourself…

New Fax Library for Pythonistas

Thursday, September 22nd, 2011

Remember the post we did earlier this year with the Ruby gem written by Jason Goecke called pamfaxr for sending and receiving faxes? Well we are excited to announce that there is a new Python library by Jonathan Sweemer to do the same thing! Here’s the source code on GitHub too!

Jailbreaking OpenVBX

Wednesday, September 21st, 2011

Remember when the iPhone was only available on AT&T?   That was true until October 11, 2009 when a young coder named geohot (and friends) released the first iPhone/iPod jailbreak.  Suddenly iPhones weren’t tied to to just AT&T…now you could give AT&T the boot and choose Verizon or T-Mobile as your service provider.  Score!

In the spirit of geohot’s jailbreaking efforts, the rapscallions at Disruptive Technologies took on the the task of “jailbreaking” OpenVBX.

OpenVBX is a web-based open source phone system. It’s essentially a virtual PHP/MySQL PBX  and it’s available for download from GitHub.   Users of OpenVBX can make phone calls, send text messages…all very cool.

The catch is…you’re locked into one service provider: Twilio.  There’s no way to choose to use another cloud telephony provider…until now.

Today we’re pleased to announce a new fork of OpenVBX that adds support for Tropo.  For the first time, users of OpenVBX will have a choice of multiple platforms on which to run it, making it REALLY OpenVBX.

The coders at Disruptive Technologies added full support for the the Tropo API and Phono SIP-based VoIP web phone to the communications layer of the OpenVBX project. Of course, when selecting the Tropo API, users will now get access to all of the more advanced features of the Tropo network: speech recognition and text-to-speech in 24 languages, phone numbers in over 40 countries, international SMS, in/outbound SIP VoIP support, inbound Skype support, multiple phone numbers per callflow script, improved conferencing.

Disruptive Technologies also extended OpenVBX with the VoiceVault API to support Voice Biometrics in password resets. After adding VoiceVault credentials on the API Accounts Tab, the password reset dialog will provide an option to request a phone call to reset your OpenVBX account password.

The OpenVBX fork with Tropo can be found on GitHub.  We have sent the maintainer of the OpenVBX project a pull request to merge these updates into the project. The following features and bugfixes have been added to the OpenVBX package:

  • Fixed a redirect bug. OpenVBX no longer incorrectly redirects users to 404 pages.
  • Fixed bug in Twilio client. 60 seconds after the user has been “inactive”, the client is no longer able to be called for that user. This prevents calling the client if the user has closed their browser. (This also works for the Phono Client)
  • Added support for the Tropo API. You can now add a “Tropo API account” on the system settings page, and from the installer. Either a Tropo or Twilio account is required. Included in the new Tropo API additions are:
    1. Support for Tropo domestic and international phone numbers, on the “numbers” page.
    2. All applets in the “flows” page now support Tropo JSON as well as TwiML. Any number can be assigned any flow – so a tropo number and a twilio number can both be assigned the same flow.
    3. Support for existing Tropo numbers & applications. If the user prefers to set up their numbers initially in Tropo.com, the application will see these numbers and they can be assigned a flow within the application.
    4. Recordings, and Voicemail, as well as outbound dialing with Tropo.
  • Several theme changes. The OpenVBX logo has been modified to include both the Tropo and Twilio logo. If only one of the accounts is active, only that logo will show in the VBX logo – so if a user only has a Twilio account, only the Twilio logo will show, and vice versa. Other minor theme changes:
    1. Several pages in the System Settings tabs have been reworked.  Notibly the API accounts page, which now has each API accounts logos.
    2. Step 3 of the installation has been reworked.
    3. Several Twilio-specific content has been changed to be more ambiguous.
  • Added support for “Phono” browser phone, in addition to the Twilio Client. Any non-Twilio based numbers will use the new Phono browser phone.

This project has since been renamed to TropoVBX. Please refer to the updated blog post and new source code repository on GitHub.

Telephony Black Magic with Tropo, Node.js and Redis

Tuesday, June 28th, 2011

In a previous post and screencast on this blog, I demonstrated an example application that highlights some of the more unique features of Tropo to support realtime applications.

Tropo’s unique ability to write to, and read from persistent socket connections during the execution of a call sets it apart from other platforms, and creates opportunities to do things that other platforms can only dream of.

In this screencast, I build upon and extend my earlier example using Redis, Node.js and jQuery to allow a user to inject text into a running Tropo session and have it read out over the phone using Text-to-Speech.

Here is an overview of the technical components of this example application (opens in new window).

What I get really excited about in this demo application – the code for which can be found on GitHub – is the ability to send TTS output to multiple subscribers. Redis’ PubSub functionality will send a message published on a channel to all subscribers, so if you have multiple people called in to your app, every one of them will get the message sent from a single publisher.

How cool is that?!?

if you’re building a realtime application that requires voice, SMS or IM functionality, look no further than the Tropo platform.

With Tropo and powerful tools like Redis and Node.js, you can make telephony black magic.

Have fun!

Realtime Conferencing Dashboard with Tropo and Chloe

Wednesday, June 22nd, 2011

In yet another installment on this blog demonstrating how to build realtime applications with Tropo, I walk you through the process of creating a conferencing dashboard with Tropo and the Chloe realtime web server from Mashion.

Chloe is a great open source project that works extremely well with the Tropo platform. With Chloe and some modest Tropo and jQuery code, you can build a sophisticated and powerful conferencing dashboard.

You can get executables for Chloe by visting the Chloe GitHub repo, and you may also download the source and build on your local machine as well.

The sample code that I demonstrate in this screencast is also available on GitHub.

This example demonstrates yet again how ideal Tropo is for building powerful realtime communication applications. Chloe is easy to work with, powerful and open source, making it an excellent compliment to the apps you can build with the Tropo platform.

Check out the Chloe project and stay tuned to this blog for more posts in the future about building realtime apps with Tropo.

Routing GoogleVoice to Tropo and OpenVoice

Wednesday, April 27th, 2011

Do you have a GoogleVoice phone number?  Would you like to route it to your Tropo application?  

You can permanently port your GoogleVoice phone number to your Tropo application by submitting a ticket to our Provisioning team via the GetHelp link in the Tropo portal but I would like to show you how to temporarily route your GoogleVoice number to Tropo.

In this screencast, I use a few unnecessary (but fun) geeky apps like Skype (to place PSTN calls) and Blink (for receiving SIP calls).  I also route my GoogleVoice number to @Zlu’s OpenVoice application.  OpenVoice is an open source GoogleVoice clone that runs on Tropo and also integrates with our Phono webphone!  It’s built using Ruby on Rails and its source code is available on Github at http://github.com/openvoice.  (OpenVoice also has an Android app available so check it out!)