Posts Tagged ‘rest’

Ruby on Rails Conference Caller

Friday, February 24th, 2012

Have you ever wanted to initiate a conference call and have it dial everyone’s phone numbers and invite them into a standup conference call? I will show you how to do this using Ruby on Rails and the Tropo Scripting API. The following Rails application is running version 3.2.1 powered by Twitter Bootstrap for the sweet CSS styling plus Gritter jQuery alerts (like Growl) with a little AJAX mixed in to liven things up.

Here is a screencast to show off my conference caller app!

The Rails application uses the Ruby Rest-Client gem to kick off the Tropo conference caller script while passing the Tropo script a comma delimited string of numbers to dial. The Rails Rest-Client call looks like:

response = RestClient.get "http://api.tropo.com/1.0/sessions?
action=create&token=0e0a2a5742a75c...e01102c8f745818848
&phones=#{phonenumbers}"

Here is the Tropo Ruby script: (more…)

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.

New at Tropo: SSL and REST APIs for provisioning & remote control

Monday, December 20th, 2010

Some of the most-requested features for Tropo have arrived. APIs to manage applications, add and remove numbers, and remotely control a running Tropo session are now available. If I were a cliched hack, I’d call this a Christmas gift for Tropo users. But I’m not, so I won’t. 

Provisioning – For managing applications, Tropo has a set of new REST APIs that allow you to do with code anything you can do with the Tropo UI. Create applications, add and remove phone numbers, fetch all the contact methods for your application, change URLs. If you’ve set up billing information, you can even move applications to production. All from your code. Even some things you can’t do in the UI can be done from the API (like moving a number between apps or switching an app from Scripting to WebAPI).

Read more…

Remote Control – A common request is to allow a developer to break a caller out of a conference call, stop hold music, or cancel some long-running operation. Our new event API allows you to send an “exit” signal to any running session and have it interrupt any Tropo function. You can even target that signal at a specific piece of code, useful if you have 10 different say() functions in your app, but only want to stop the one that’s playing hold music.

The event API is available on the servers powering the free development applications now and will be promoted to production applications in about two weeks.

Read more…

These two new APIs are added to the REST API we already offered for launching new sessions and the RESTful WebAPI for running a Tropo application over HTTP. And we’re not done. Look for more RESTful interaction with your Tropo applications soon.  Check out the Full REST documentation for more info.

SSL – All APIs are now available over SSL and all examples are being updated to show https urls. Using non-SSL encrypted connections will continue to be available, but we strongly encourage that all API calls be made over SSL. We’ve also added SSL certificates to our WebDAV servers, allowing you to securely update application code over WebDAV.

In addition to these new features, Tropo still offers:

  • Free developer accounts – Try out Tropo without adding a credit card or keeping track of limited developer credits. Tropo is free for developer usage, including phone numbers around the world.
  • 24×7 Support – Our support team is available around the clock if you have any questions while working on your application.
  • Worldwide Platform – Phone numbers in 41 countries. Voice recognition and text to speech in 9 languages. Calls and SMS to anywhere in the world. International telephony is hard. We make it easy.
  • Skype, SIP, iNum, XMPP, and more – Tropo’s way more than just phone numbers. Send text messages, interact over IM, call into your app with Skype or SIP. We provide you with multiple communications channels and the tools to use them.

So get cracking. Build something great with Tropo. We can’t want to see what you do. Don’t have an account? Sign up free.

Ruby on Rails Example for Tropo Web API without port forwarding!

Friday, February 12th, 2010

Zhao Lu (aka @zlu) has shared a tutorial he has done using Ruby on Rails and our recently released Tropo Web API. The tutorial shows how to add, or build, the Tropo features to your Rails application in 15 minutes using our REST/JSON API. All of this deployed to Heroku for easy application deployment.

Another great thing that Zhao goes on to show, is the ability to use the Tropo Web API behind a firewall where you can not open or forward ports. For this he shows using Tunnlr to establish a remote SSH tunnel. With this tunnel you obtain a port on Tunnlr’s public IP address that forwards via your SSH tunnel to your application inside your firewall. This is great when you are on a company or university network where opening and forwarding a port through a firewall is not an option.

For more details have a look at the README. The full source code example is available on Github @ http://github.com/zlu/tropo-tutorial. A big thanks to Zhao for showing how easy it is to use the Tropo Web API!

Using Persistent Sockets in Tropo.com Applications

Thursday, September 10th, 2009

While Tropo supports RESTful Web Services as a form of moving data to and from the communication cloud, it may not always be fast enough for all applications. There are apps that require the lowest possible latency, for example, when mobile devices become input devices. The unique approach of Tropo, allowing developers to host scripts in our cloud, allows you the ability to write applications that take direct advantage of persistent sockets. This means that you may open the socket once and then stream data to your remote application in realtime without having to establish HTTP connections each time.

I recently created an example of this using Ruby to serve a socket using EventMachine, and then writing a script on Tropo that opens a socket and sends touch-tones (DTMF) down the socket immediately as they come in. Here it is in action:

The code examples may be found here.