Archive for the ‘Web API’ Category

Using Tropo WebAPI with ColdFusion

Thursday, June 14th, 2012

Tropo makes it excruciatingly easy to build voice and text applications in just about any programming language.  In fact, every time I do a live coding demo at an event or hackathon, I pick a new language to build a sample app…I try my best not to pick favorites.  But I’ve always had a dark skeleton in my closet that generates snickers and scorn anytime it’s revealed.

I started building E-commerce websites in 1996.  Back then there were only a few options if you wanted to build dynamic web pages that integrated with a database.  Microsoft’s ASP was still years away from being released. PHP was starting to gain popularity but was still very much in its infancy.  Many developers were still writing custom CGI or Perl scripts.  But there was one other option…

In 1995, brothers Jeremy and J.J. Allaire invented a new programming language called ColdFusion (CFML).  By the end of 1996, ColdFusion had already graduated to version 2.0 and had become a full platform that included an IDE in addition to a full scripting language.  I was instantly attracted to CFML because the tag syntax was very similar to HTML (which I already knew), and it integrated seamlessly into Microsoft Access and SQL Server databases (which I already knew as well).  And the ColdFusion Server application ran on Windows, which was my preferred OS.

In very short order, I was spitting out ecommerce sites and dynamically generated content.  Allaire kept adding features and built a very robust community of CFML developers.  When we launched Voxeo in 1999, the very first account management tool, the one that allowed the very first web developers to map phone numbers to a URL, I wrote in ColdFusion.   Jeremy Allaire found the idea of making phones ring with CFML so intriguing that not only did he demo a Voxeo phone app during his keynote at the ColdFusion Developer’s Conference in 2000, he was one of  Voxeo’s earliest Angel investors…along with Eric Schmidt (of Google fame) and  Jeff Pulver (of Voice on the Net, Vonage and 140 Characters Conference)…among others.

As you can see from the above chart, after PHP, ASP.NET and Java, ColdFusion still beats out Perl, Ruby and Python in global server-side programming language usage.  And, despite its historical ties to the ColdFusion community, Tropo has never had any documentation or examples showing how to build Tropo apps using ColdFusion…until now :)

I’m pleased to present the first ColdFusion tools and sample app for building Tropo WebAPI applications.  The first is a CFTropoJSON parser that takes Tropo JSON and converts it to something easily digestible by ColdFusion Code.  You can download the source here:  ColdFusion Tropo JSON

The second is a sample app complete with debugging logger.  The sample app uses CFTropoJSON to play a prompt asking for the caller’s year of birth.   The caller can either say or type the response, and then the code will simply play back the response.  It uses the Tropo “ask” and “say” methods, and also has the ability to capture and store the JSON that your ColdFusion app receives from Tropo (especially helpful when building and debugging apps).   The sample app is located here:  Tropo WebAPI ColdFusion Sample.

Both of these are located in this Tropo WebAPI ColdFusion Github repository.  If you’re a ColdFusion developer and like this kind of stuff I encourage you to test it, fork it, commit new things and make it CFAwesome.

My name is Diggz, and I’m a ColdFusion Developer.  ;)

Special thanks to Shane Smith, who coded the excellent CFTropoJSON parser and pretty much did all the heavy lifting here.

Customer Spotlight: PalmLing

Monday, January 30th, 2012

We are excited to feature PalmLing on this week’s Tropo Customer Spotlight! Today I sat down with Ryan Frankel, one of the co-founders of PalmLing, to discuss their new business and learn more about how they are using Tropo and Phono for their human translation services.

What is PalmLing?

PalmLing is human translation in the palm of your hand. PalmLing is a phone-based platform that enables travelers to use their cell phones to speak with exceptional translators. Translators are available 24/7 and can speak directly to the person with whom you are communicating, or they can provide the information you need to communicate in a foreign language.

PalmLing uses Tropo’s Voice APIs and platform to answer international calls and initiate conferences between callers and translators to provide their service. PalmLing also uses Phono, Tropo’s web phone, to demo their translation service directly from their website. Phono basically initiates a call from the web browser into their Tropo voice application just as if someone dialed their phone number.

To learn more about PalmLing, visit their website at http://palmling.com!

Tropo Teams with Apigee on API Explorer

Friday, January 27th, 2012

Tropo is excited to partner with Apigee on the Tropo API Explorer! The API Explorer allows more developers to explore, learn, and test Tropo’s cloud communications APIs faster than ever before.

Tropo provides an API and cloud communications platform for building powerful Voice applications with speech recognition and text-to-speech in 24 languages, call recording, conferencing, SIP/VoIP, and phone numbers in 41 countries. Tropo also provides international SMS services.

The API Explorer makes this integration easier, helping developers authenticate and test our API in seconds, view the full surface area of an API, view request/response pairs in only a few clicks and share what they are seeing with others.

Now you can use the Apigee API explorer to experiment with our REST API without writing a single line of code! It is built with Apigee To-Go, a free product to let users build, skin and embed their own API Console. The Tropo API Explorer is embedded below or you can jump to this full screen version.

Node.JS Magic 8 Ball Voice App

Friday, December 23rd, 2011

Remember the Magic 8 Ball game from yesteryear?

How would you like to have the game with you in your pocket when difficult answers are required.

I built this Magic 8 Ball game using Node.JS and the Tropo WebAPI. If you roll the array up to a single line of code, you’re only looking at a 25-line Node.JS application!

You can call this application at 415-889-8684!

Here is the Node.JS source code that runs the application.

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

// http://en.wikipedia.org/wiki/Magic_8-ball
var answers = [
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes – definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
"Outlook good",
"Signs point to yes",
"Yes",
"Reply hazy, try again",
"Ask again later",
"Better not tell you now",
"Cannot predict now",
"Concentrate and ask again",
"Don't count on it",
"My reply is no",
"My sources say no",
"Outlook not so good",
"Very doubtful"
];

http.createServer(function (req, res) {

	// Create a new instance of the TropoWebAPI object.
	var tropo = new tropowebapi.TropoWebAPI(); 	
	var answer = answers[Math.floor(Math.random()*answers.length)];

	tropo.say("Welcome to the tropo node J S magic 8 ball.");

	var say = new Say("Ask your question now after the beep.");
    var choices = new Choices(null, null, "#");

    // Action classes can be passed as parameters to TropoWebAPI class methods.
    // use the record method https://www.tropo.com/docs/webapi/record.htm
    tropo.record(3, false, null, choices, "audio/wav", 5, 60, null, null, "recording", null, say, 5, null, "http://example.com/tropo", null, null);

    tropo.say(answer);

	tropo.say("Please call back to play again!");

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

}).listen(13188);

Be careful what you ask for…

LA Holiday Hackathon :: Results

Monday, December 12th, 2011

Approximately 30 Los Angeles .NET, Ruby, PHP, and Javascript developers attended this Saturday’s LA Holiday Hackathon at Outlook Amusements sponsored by RightNow Technologies and Tropo. The theme of the event consisted of building a Voice, SMS, or Instant Messaging holiday application based on the Tropo Scripting or Web API. Here is a photo of everyone hard at work hacking on their holiday Tropo application.

I love the sound of phones ringing in the morning! By noon, the applications were starting to take shape with some definite front runners in the competition. In addition to Tropo APIs, many of the teams also used Phono, SMSified, RightNow, Wolfram Alpha, and Google’s Shopping APIs to deliver their new applications.

Here are the winners of the LA Holiday Hackathon listed in order:

First place goes to Gift Finder winning an iPad2 compliments of RightNow Technologies. This application allows the user to enter a phone number, name, and email address to place an outbound call to someone to recommend gifts for loved ones. Speech recognition was used to ask the user for their zip code, gender, price range range, and category of the gift. The application uses the Google Shopping API to find gifts in their area for the gender and age of the recipient and reads them off one by one using text to speech. This application was built using Ruby and Sinatra and hosted on Heroku as well as using the Javascript Tropo Scripting API.

Second place goes to Santa’s Book winning a Kindle Fire compliments of RightNow Technologies. This application asks for two phone numbers and starts by calling the first number to ask a series of five questions using speech recognition to determine if the person is naughty or nice along with asking them to record the present that they would like to receive. The application proceeds to call the second number to relay the naughty/nice determination and playback their gift recording. The application also sends an SMS text message to the second number with the naughty/nice determination along with the transcribed gift request. This application also used RightNow’s CRM API to log the call and data related to the surveys. This application was built using PHP and the Tropo WebAPI along with RightNow’s CRM API.

Third place goes to Santa Hack winning a $75 Fry’s Electronics gift card compliments of Outlook Amusements. This application used Phono and Tropo to schedule and bridge appointments to speak with Santa. This application was built using C# and the Tropo WebAPI.

Fourth place goes to Tropo WA (Wolfram Alpha) winning a $50 Tropo production credit. This application was a Wolfram Alpha and Tropo SMS mashup written in PHP using the Tropo Scripting API. You can ask the application various questions via SMS on the following number 661-206-2681.

LA .NET Hackathon 2011

Monday, December 5th, 2011

Tropo is partnering with the LA .NET Developers Group and Outlook Amusements to sponsor this weekend’s LA (Burbank) Hackathon at Outlook Amusements on Saturday, December 10, 2011 from 9:00 AM to 6:30 PM (PT).

Here’s the address: Outlook Amusements 2900 W. Alameda Ave suite 400 Burbank, CA 91505

The theme of the LA Hackathon is “Build Voice/SMS apps for Holidays”! Here are a few ideas to get you thinking:

  • Santa Caller (similar to http://santacall.us) – Build a website that allows a parent to schedule a call to their kids from Santa. Have Santa ask the kid what they would like for Christmas and then email the parents their kid’s recorded message and/or transcribe the message for the email.
  • Santa Tag (similar to http://www.bloggingbistro.com/jc-penney-comes-up-with-a-new-use-for-qr-codes-video/) – Build a website that calls someone to record a message then associates the message with a QR code that plays when scanned.
  • Holiday Greetings Hotline – Build a holiday greetings hot line where user can leave a voice message that will be transcribed into text and posted to “Holiday Greetings” twitter account.

Even though this event is sponsored by the .NET Developers Group, we will be supporting all development languages and will have Tropo expertise onsite in .NET, PHP, Ruby/Rails, and Javascript, and Node.JS!

Register today!

Customer Spotlight: Radish Systems

Friday, November 11th, 2011

We are proud to feature Radish Systems on this week’s Tropo Customer Spotlight. I sat down with Theresa Szczurek and Dick Davis to discuss their ChoiceView platform and how they are using Tropo.

Choice View from Radish Systems is a giant step forward in enhancing traditional voice-powered IVR calls. In fact, they may have coined the term “Visual IVR” because you can now see and interact with the IVR call flow from your smart phone. ChoiceView is available today and runs on iPhone and Android-powered devices.

In addition to automated Visual IVR calls, customer service and support agents can interact with callers live during the call and even push web pages or order forms to the device while the caller is on the phone call. Here is a video of a call center agent upselling Theresa on a larger bouquet of flowers.

Radish Systems also discusses their new REST API in the works that will allow any voice-powered Tropo application to add a ChoiceView Visual IVR dimension to their existing IVR application to help drive customer interaction costs down while improving customer experience and increasing revenues! Sounds like a win-win-win for everyone involved.

To learn more about ChoiceView from Radish Systems, visit their website at http://radishsystems.com.

Customer Spotlight: FetchNotes

Friday, November 4th, 2011

We finally got a chance to catch up with the guys (@_chaselee and @alexschiff) behind the popular new notes service called FetchNotes!

What makes FetchNotes so cool? For one, it has a super simple web UI. The entire site behaves like an app and leverages Python’s Tornado Webserver and AJAX to add and tag notes without lifting your fingers from the keyboard. Tags are basically hashtagged keywords in the note that allow the app to categorize notes by topic.

Secondly, FetchNotes leverages Tropo to deliver a truly multichannel communications experience. Today FetchNotes extensively leverages Tropo’s SMS services but the team has already started working on adding Tropo’s Voice with transcription service as well as Tropo’s Instant Messaging services on all of the IM networks including: GTalk, Yahoo!, MSN, AOL, and Jabber! We may even see support in the near future for in-browser, voice-powered note taking using Tropo’s Javascript Phone API, Phono.

Thirdly, Chase and Alex are working to add groups and third-party integration into other services such as GitHub or Google Calendar. This would allow developers, testers, and users to take a note about a #feature or #bug and tag it accordingly and watch the note get pushed to other services as GitHub issues or even calendar entries on Google!

The FetchNotes service is still in private beta but the first 50 new subscribers that click on fetchnotes.com/invite/tropo will be allowed to register for the service and check out the new coolness first hand!

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.

Hello, Python World (Django Edition)

Sunday, May 29th, 2011

I’ve been doing my Python Tropo development on top of Google App Engine, for the past couple of years. Out of the box, App Engine uses the webapp framework. But for my current “Hello, World” project, I decided to leave my App Engine comfort zone, and gain a different perspective. I took up the task of writing a “Hello, World”, Tropo Web API app, using the Django framework for Python.

(more…)