Archive for the ‘Web API’ Category

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…)

Sending outbound SMS with Java

Friday, May 6th, 2011

Tropo’s Java API allows you to send SMS messages from your Java applications with little or no effort. In this blog post I’ll go through a very simple application that sends an SMS message with very few lines of code.

To make it a little bit more exciting I will use Quartz‘s latest version. If you are not familiar with it, Quartz is a task scheduler library that you can use in Java to schedule and execute tasks. It is a very powerful library that has tons of different configuration options and integrates quite well with different application servers. Java veterans know it very well as it has been there almost from the very beginning. As Quartz was releasing a major upgrade this March, I decided to test how it works. I also thought that delivering scheduled messages would be a great real-life example of how Tropo can be useful for you. Imagine for example you can use to do SMS broadcasting, send advertisements, send alerts on health monitoring applications and many more exciting use cases.

So let’s start. The first step is to create your application. If you are familiar with Tropo’s WebApi model and in particular with the Java library ( if not, you can have a look to this introductory screencast ) you may expect that we would create a WebApi based application. But this is not the case. We are going to take advantage of Tropo’s Java API REST implementation to make it super-easy to send SMS messages. What we are going to do is to create a script in Tropo that will send the SMS message, get a session token, and invoke that tropo script from our Java application using the session token. So, let’s go. The first step is to create a Scripting based application:

Next, give it a name, like for example QuartzTest and click on the “use a Hosted File” link and next click on the “Create a new hosted file for this application” option, like is shown in the screenshot below:

Ok, we are almost there. Now you need to enter the script contents. This script will send the actual SMS outbound message. I will use the message function and pass the message text and the phone number as parameters. At the docs section you will find plenty of information about all the functions and cool actions you can execute from Tropo scripts. As you can see in the screenshot below, our script is super simple:

Ok, so once you have created your application the last step you need to do is to get your Session API token. We will use that token from Java to run the script that we just have created. So, to get access to your token you only need to go to your application screen and click on the Voice link (message token is also valid) at the bottom of your application. A new window will pop up showing your token information:

And that is it. Let’s go now to the Java world. I’ve created a very simple Java project that uses Quartz and invokes our new and shiny tropo script. I’ve uploaded this project to Github. You can find the source code on this link. Feel free to browse the project sources. As you will see, we are using Tropo’s Java Webapi binary libraries that you can find here. And there is just only two classes. One is the scheduler that creates a quartz job and sends it (I wont go into this code, as it is just some Quartz specific stuff). And the second class is the actual job that sends the SMS message using Tropo. Lets have a look to that class:

public class LongJob implements Job {

	@Override
	public void execute(JobExecutionContext arg0) throws JobExecutionException {

		try {
			// This coude launches your Tropo application. You can configure your tropo application to 
			// do things like sending an SMS, calliing a phone, etc. 
			String token = "f46f1f14bdd7684d9195ad83e1bbce021d0f024ad5e56e8c99cbd10e9cf3b2b026cb68749b41cb487dd09a5d";
			Tropo tropo = new Tropo();
			Map<String, String> params = new HashMap<String, String>();
			params.put("message","This is an SMS message");
			params.put("numberToDial", "+34637710708");
			tropo.launchSession(token, params);		

		} catch (InterruptedException e) {
			e.printStackTrace();
		}		
	}
}

That is all the code you need to send an SMS message from Java. Isn’t it cool? Lets go through the different parts of that snipped:

  1. First we create a new Tropo instance. The Tropo class drives all the interactions with the Tropo cloud.
  2. Next, we build a set of parameters. If you remember our script, we need to pass the message and the number that we are sending the message to. All the keys that you put on that params map will be accessible from your script.
  3. And finally we launch the session using the launchSession method. That method will use our token to launch remotely the Tropo script that we created previously. The script will fetch the parameters from the map and will send the SMS message.

Feel free to download and run the example. One word of caution though. Tropo supports international SMS delivery which is very cool. But it could happen that your country could have not been enabled yet. So, if you find that the SMS messages aren’t getting into your phone then let us know about it because we would have to enable SMS delivery to that country through one of our multiple carrier agreements.

And that is it. Hope you have fun with Tropo and Java!