Tropo is part of CiscoLearn More

DevOps with Cisco Spark: Follow your Tropo calls and SMS activity in real-time

Posted on June 13, 2016 by Steve Sfartz

Integrating phone calls and SMS into your applications can be done in a snap with Tropo’s unique Scripting platform. A few lines of Javascript, PHP, Python, Groovy or Ruby, and you’re ready to run your phone call or SMS with a custom integration. Check this javascript snippet which implements a SMS subscription service. Try it yourself: text your email address to +1 414-882-4773

Try it by yourself at +1 438–448–3585 (text or call)

Now comes the time to support and grow your application: you want to track user activity in real-time and regularly check that your script executes properly on Tropo servers. To do this you’ ll have to create a custom dashboard, or dig into Tropo script logs (which can be detailed).

This is where Cisco Spark can help. We’ll show you how to push your Tropo script activity into a Cisco Spark room in (near) real-time. At the end of the article, you’ll have your INFO and DEBUG log levels pushed to Spark.


Tropo DevOps with Cisco Spark

If you care about DevOps, you’ve already connected most of your critical backend applications and strategic delivery processes to your favorite real-time messaging platform to raise alerts or to simply share information instantly with colleagues. Let’s extend your DevOps practices to Tropo in 3 steps:

“We’ll leverage the Cisco Spark API from Tropo’s Javascript Runtime. Note that the same principles apply to the all languages supported by the Tropo Cloud Platform (Javascript, Ruby, Python, PHP, and Groovy). As of now, example code is only provided in Javascript, and your contributions are welcome.”

1. Create a Spark incoming webhook

From the Spark Web client, create a room to be used exclusively for Tropo Logs or pick an existing room.

In the right hand panel of the Spark Room, click “add Integrations” and choose “incoming integration”.

“If you do not see the “incoming integration panel”, there’s good chance you are not in the Spark WEB client, but a Desktop or Mobile Spark client.”

Name your integration. Tis name will be used to publish messages to the Spark Room as new log entries are created by your Tropo script.

Finally, copy your webhook URI suffix.

1. Create a Spark incoming webhook

2. Add the Spark4Tropo Javascript library to your script

Copy/paste the Spark4Tropo.js code snippet at the top of your Tropo script.

Insert your Spark integrations suffix into the “YOUR_INTEGRATION_SUFFIX” placeholder. You may also want to identify your logs as they are pushed to the Spark room by changing the APPNAME.

2. Copy and customize the Spark4Tropo.js snippet

3. Enhance your Script Business Logic

Replace your script’s logs by the debug() and info() functions provided by the Spark4Tropo.js code snippet.

3. turn your logs to the provided log & debug functions

Now run your code again, and watch Tropo logs showing up in Spark as your script gets executed.

Future thoughts

You may create 2 Spark Rooms : one to follow Business activity (info logs in the example above), and the other one for Debugging Purposes (fine grained logs).

Spark4Logs configuration to send logs to several Spark Rooms

Spark Haus by Cisco - Dublin, Ireland

Posted on June 8, 2016 by Phil Bellanti

We just got back from an amazing popup event held in Ireland on June 1st & 2nd. For this one, we brought ‘Spark Haus by Cisco’ to one of Dublin’s most unique venues for two-days of tech talks, demos and a hackathon, featuring the Spark and Tropo APIs. The venue was inside Dogpatch Labs, a co-working facility located in the heart of the historic Dublin Docklands. What’s really unique about this particular event space is it’s located inside a 200-year old redeveloped wine and whiskey vault, downstairs from Dogpatch’s main offices. It was an extraordinary setting to say the least. Our distinguished Technical Marketing Manager for Collaboration APIs, Adam Kalsey, was the MC for the event.

After breakfast on the first day, we started off with some tech talks on the Spark and Tropo APIs, presented by Cisco’s Jonathan Field and yours truly. The sessions were mainly geared towards the developers participating in the hackathon and coding challenges, so they can get familiarized with the technologies. Next, one of our amazing partners,, provided an awesome live demo of how they’ve integrated Spark and Tropo into a solution for insurance agents to provide quotes to visitors online. You can view a short video of Altocloud’s demo here:

Two other great Cisco partners who sponsored the event and, also held sessions on their respective offerings.

After the tech talks concluded in the afternoon, the actual hackathon kicked into high gear. We ended up with four teams in the hackathon, all developing applications using the Spark and/or Tropo APIs. The developers were definitely eager to get coding since the list of prizes to be awarded were very enticing:

  • 1st Place Team – 4 x Galaxy Visitor 7 Quadcopters
  • 2nd Place Team – 4 x Bose ® SoundLink Bluetooth Speaker III – Silver
  • 3rd Place Team – 4 x Plantronics Premium Headsets

As a side contest, those who completed some Tropo and Spark coding challenges were awarded a tech gadget (courtesy of Exertis) from a prize grab bag.

On day two, the hackathon teams submitted and presented a demo of their applications. All of the submissions were very creative and quite frankly, some of the most advanced applications we’ve seen at a Spark/Tropo hackathon. The winning submissions are as follows:

Third place went to the “Purple Pi”  team, who presented a mobile expense management application. In their app, credit card transactions appear in a Spark conversation, allowing you to categorize expenses, post receipts, and mark each expense as personal or reimbursable.

Second place went to the “Meeting Insights” team.  Their application aimed to improve the efficiency of meetings by reminding every attendee and speaker right before their time to talk comes up and provide a text backchannel (using Tropo) for every meeting. The app also automatically judged the mood and the contents of the conversation and posted to the backchannel for archiving.

The grand prize winning team was “Soteria” who put together a very neat real-time collaboration solution for a paperless healthcare application using Spark. The app allows medical providers to discuss a patient’s medical chart and have that discussion automatically update the chart by identifying health-related keywords from the chat.

After the event concluded, we had a hearty celebration aboard the Boat Restaurant & Bar – MV Cill Airne, where a good time was had by all.  We received a lot of positive feedback from the attendees and definitely hope to return to Dublin again soon. Many thanks to the Cisco team in the Dublin and Galway offices, who truly helped make this Spark Haus event a successful one!

How Gists can help for Tropo Scripting Development

Posted on June 2, 2016 by Steve Sfartz

When you go to production, you want the Tropo Scripting Platform to host your scripts so that you get all the scalability and robustness for free as these lay on Tropo operations’ shoulders, 24/7. This is the best practice to handle heavy workload, and this makes Tropo unique for serious communications business logic.

For that to happen, your scripts are deployed at several locations, and synchronized behind the scenes. This is how Tropo delivers communications worldwide, any mobile phone, any country, bi-directional, both calls and SMS.

When you’re developing, however, you are constantly changing your code, and this distribution feature means that any change to your script will take from a few dozen to hundreds of seconds to be active.

Now, let’s see how to reflect your changes immediately at development time.

Tropo downloads your script from a public web server and executes it on our servers. Each time Tropo runs your app, it will fetch the latest version of your script. So a best practice for development is to host your script on a public address, allowing Tropo to skip the distributing the file across our entire network.

I find it very practical to leverage gists for Developement, here’s how.

  1. Create a secret gist, with an extension that reflects the language you’re using (Tropo uses this information to run your script on the right env). A secret gist is publicly available, but doesn’t show up in Github’s search, so adds a bit of privacy.
  2. Grab the URL of your gist, and append /raw/<your-gistname>. For the sake of this example, we’ll go with
  3. In your Tropo application, reference the URL above. Your changes will be immediately reflected (…or in a matter of seconds).