I was privileged to have the opportunity of moderating the Tropo Customer Spotlight session at the Voxeo Customer Summit in Orlando, Florida last week. Six customers each gave a brief presentation on their business followed by a discussion on how they are using Tropo to deliver their Voice, SMS, and Instant Messaging services.
We were fortunate to be able to sit down with Rich Weborg and Heath Phillips of OneReach afterwards to discuss their business in more detail. OneReach provides an easy solution for managing your customer communications using customized voice, text messaging, email and social networking channels to engage your customers with meaningful information in ways they appreciate. Without further ado, here’s our interview.
Tropo just recently partnered with PamFax to deliver faxing capabilities via an API. Jason Goecke wrapped their API with a very simple Ruby gem called pamfaxr available at GitHub and installable using a “gem install pamfaxr” from your command line. Using the PamFaxr Ruby gem, I will demonstrate how to send a simple fax as well as how to build a Tropo Voice to Fax transcription application using our Scripting API!
Getting Started
Before you can start sending faxes, you need to head over to the PamFax site and sign up for a PamFax account. After you fill out and submit the form, you’ll get an email with your login credentials and how to get started.
You also need to install the Ruby gem called pamfaxr on to the system where you are going to run the application that will send the fax. The Ruby gem is available at GitHub and should install simply by typing “gem install pamfaxr” from your command line. You will need to edit the code to have your PamFax username and password.
Sending A Fax From The Command Line
Before we involve Tropo, here is the Ruby/Sinatra code for simply sending a fax from the command line using the PamFaxr gem:
require 'rubygems'
require 'pamfaxr'
# Pass user name and password
pamfaxr = PamFaxr.new :username => 'your_username',
:password => 'secret'
# Create a new FaxJob
faxjob = pamfaxr.create_fax_job
# Add the cover sheet
covers = pamfaxr.list_available_covers
pamfaxr.set_cover(covers['Covers']['content'][1]['id'], 'Chris was here 2!')
# Add files
# pamfaxr.add_remote_file('https://s3.amazonaws.com/pamfax-test/R-intro.pdf')
# pamfaxr.add_file('examples/R-intro.pdf')
# Add a recipient
pamfaxr.add_recipient('+14802191300')
# Loop until the fax is ready to send
loop do
fax_state = pamfaxr.get_state
break if fax_state['FaxContainer']['state'] == 'ready_to_send'
sleep 5
end
# Send the fax
pamfaxr.send_fax
Just copy that code into a text file, edit it to have your information in it and then run it with ruby from your command line. In a short bit you should have a fax waiting for you.
Sending Faxes From Tropo
Now for the fun Tropo Voice to Fax application code! The first code snippet is written in Ruby runs on the Tropo cloud. It greets the caller, asks for your fax number, records your voice/fax message and sends the transcription via a callback to the Ruby/Sinatra application that sends the actual fax. Here’s the Tropo code:
say "Welcome to the Tropo fax demo.", :voice => 'dave'
result = ask "What's your fax number? Please include your country code.", {
:choices => "[11 DIGITS]", :voice => 'dave'}
record "Please say what you would like for me to fax.", {
:beep => false,
:voice => 'dave',
:maxTIme => 60,
:silenceTimeout => 2,
:transcriptionOutURI => "http://web1.tunnlr.com:11053/transcribe?fax=" + result.value
}
say "Your voice is being converted to a facsimily! Go check your fax machine! Goodbye.", :voice => 'dave'
hangup
Here is the complimentary Ruby/Sinatra code that catches the Tropo transcription callback and sends the fax of the transcription to the number specified in the Tropo script using the PamFaxr gem as demonstrated above. This code needs to be run on a publicly-accessible web server to which Tropo can connect and send the data. You have several options including:
Running the code on your own publicly-available webserver
Running the code on your local machine and use a service like Tunnlr to make the service available
Once you have the Ruby/Sinatra code below running in one of those locations, you’ll just update the Tropo code above with the correct URL (on line 11).
The code is here:
require "rubygems"
require "sinatra"
require 'json'
require 'pamfaxr'
pamfaxr = PamFaxr.new :username => 'your_username',
:password => 'secret'
post "/transcribe" do
transcript_json = JSON.parse(request.body.read)
identifier = transcript_json['result']['identifier']
transcript = transcript_json['result']['transcription']
# Create a new FaxJob
faxjob = pamfaxr.create_fax_job
# Add the cover sheet
covers = pamfaxr.list_available_covers
pamfaxr.set_cover(covers['Covers']['content'][1]['id'], transcript)
# Add a recipient
pamfaxr.add_recipient('+' + params[:fax])
# Loop until the fax is ready to send
loop do
fax_state = pamfaxr.get_state
break if fax_state['FaxContainer']['state'] == 'ready_to_send'
sleep 5
end
# Send the fax
pamfaxr.send_fax
end
Wow, that was fun! I hope that you enjoyed this demonstration and I hope that you find both our PamFaxr gem and our Tropo Scripting API useful and powerful.
Diggz and SocialVirgil hit up SuperHappyDevHouse 42 this weekend in San Jose at the tech museum, joining over 300 hackers from all over the bay area. Virgil shot & edited this montage video with some highlights of the day’s fun:
Saturday and Sunday, a bunch of developers wrapped up Seattle Geek Week by participating in an hackathon to build apps with government APIs and data. Here’s what you missed…
Tropo fueled the hacking by providing plenty of food and drink. We had several developers around to help people with their projects, as did Socrata. Amazon stopped by for a bit, and Bill Schrier (Seattle’s CTO) and Sarah Schacht (Executive Director of Knowledge is Power) came by to offer ideas and see what people were working on.
At 4:30pm on Sunday all the teams came up to demo their apps. Troy Davis‘s entry SirenSpotter shows you what police and fire activity is happening near you right now. Russell Branca created an app that shows city-owned landmarks on a map and pulls in nearby photos for each landmark. A team led by Socrata’s Chris Metcalf built Notifyre, a tool that will call you if the fire department responds to a 911 call at your house.
The two apps that won the hackathon were ChatterCast, an entry from Amber Case and Aaron Parecki, and GeoNotify from Max Ogden, Reid Beels, and Russell Branca.
ChatterCast, which won the Socrata prize of an iPad, uses Instamapper to track your phone and compares your location to 911 and other data provided by the City of Seattle using Socrata’s platform. When you enter an area that has something going on, ChatterCast uses Tropo to sends a text message to your phone, alerting you to the activity.
GeoNotify won the Tropo prize, including a Flip Mino HD and a year’s membership to Animoto Pro. Their app allows you to draw a shape on a map and subscribe to SMS alerts for things that happen inside that shape. Get road closure and traffic alerts for things that happen along your commute. Find out when public activities take place at a nearby park. The app uses data from the city of Portland and sends SMS alerts through Tropo.
Congratulations to our winners, and thanks so much for everyone that participated in the Hackathon and helped out with making it a success.
Want to create your own voice and SMS apps? Tropo is simple, powerful and completely free for developer usage. Sign up now.
Last month I gave a talk at the London Web Meetup about how web developers can get applications out of the browser and start communicating in real time with voice, SMS, and IM.
Jose De Castro, Chief Architect of Voxeo Labs and the lead on Tropo, gave a talk at Pivotal Labs in April. Pivotal is one of the premier web app development shops and invites people in to talk about interesting web technologies. Attendance to the the talks are open by invitation only, but Pivotal Labs records the talks on video and makes them available to the public.
In his one hour talk, Jose talks about Tropo; how we built an open communications platform including our open source contributions, how we built the Tropo application stack, and how we’re trying to bring innovation to communications.
In the 5 minute video, I talk about what Tropo is and why it’s a revolutionary platform helping developers build cross channel communications applications.
Miss the Tropo Jam Session yesterday? We’ve got the recording up online now. Watch it embedded below, or on our Blip.tv channel.
In this developer jam session, we present the newly released Tropo Web API. Tropo makes it easy for you to quickly add voice, instant messaging (IM), and SMS to your applications, using the programming languages and tools you already know using a web services API and JSON. We cover how the API works as well as provide examples of how to use this in your communications with robust speech recognition, text to speech, transcription, conferencing, instant messaging, and SMS to your applications.
Back in August at ClueCon in Chicago, Voxeo CTO RJ Auburn gave a talk about how the ways in which we develop voice applications have changed and about how Tropo.com was designed to help in that change. The video of that presentation is now available for viewing:
While they are somewhat visible in the video, RJ’s slides are also available from our Slideshare account:
We hope you enjoy the video and if you feel inspired to create some voice apps of your own using Tropo, please do head on over to Tropo.com and sign up for a free developer account.