Team Blogs

Make your SMS apps scale


A new version of Nuntium, is out and I wanted to share some of the great new features it contains.

Nuntium is an open source and free messaging service, built with Ruby on Rails. It has a simple but powerful API that you can use to integrate your application. You can use Nuntium from InSTEDD's server or deploy it in your own machine. Join our list to get help or discuss your needs.

To put it in a simple way, Nuntium acts as your one-stop for all the messaging needs of your applications, including -but not limited to- SMS, Mail, Twitter and XMPP. It allows you to focus on your functionality without having to deal with all the crazy quirks of telephone companies infrastructure, SMS aggregators or communication protocols.

It also supports the QST protocol defined by the OpenMobile Consortium.

Every single feature built in Nuntium, is the result of a concrete need that we had during our work with messaging systems, mainly in South-East Asia -where Nuntium delivers the daily communications and disease reporting of a few thousands users- and Haiti where it served as the keystone layer for receiving and sending hundreds of thousands of messages from the 4636 shortcode. So, instead of going through the features I'll present some examples.

Share your number among many applications

nuntium-login Once you have created your account in Nuntium, you can add as many applications as you need. Let's imagine that after lots of negotiations you got a 1234 shortcode in Kenya and you need to use it with four applications. We'll call them "Maternal Health", "Road accidents", "Disease Reporting" and "Team chat".

nuntium-app
For the Maternal Health application, you decided you are going to ask your users to prefix their messages with "MH". In the case of "Road accidents", your users are 5 specific individuals and you know their phone numbers. For "Disease Reporting" you are using a mobile application that sends SMS reports in a machine-readable format. And with your "Team chat" app you don't want people to have to prefix their messages.

By using Rules in Nuntium you could configure that scenario, and support 4 different applications, coded in different languages, with a single number for all of them. All that, while keeping the routing logic out of your apps, and making it transparent to each one.

Rules can change properties in the message, like removing a keyword prefix or decide to which application the message should be routed. You can do simple things like matching the start of the body, or use regex expression to target very specific formats or syntaxes.
nuntium-apps
nuntium-rules

Supporting complex, emerging, dynamic ecosystems

haiti ecosystem - phase 6

In many situations you might face a constantly changing environment, in which you need to switch routing rules, deliver messages through different channels according to the carrier of the recipient, or you might have to create an infrastructure by combining plugged-in phones, direct network connections to telephone companies and international aggregators. All that while keeping track of what is going on with each single message.


haiti ecosystem - phase 3.png
Nuntium is packed with lots of tools to do so. You can:
  • Configure any number of SMPP connections to telephone companies
  • Specify an individual throttle number for each connection
  • Create rules to route messages based on their carrier, prefix, country code, or any custom attribute that you want to create
  • Track each single message with a detailed log
  • Define delivery strategies like broadcasting through different channels or choosing the most appropriate channel based on priorities
  • Configure restrictions to the use of channels, based on country, carrier or custom attributes
  • Re-route messages that failed through a specific channel, through another one
  • Track credit consumed by channels.


Tracking your messages

Nuntium gives you detailed logs of what happened to each message:
  • How and when it was received
  • Which channels were available to send it
  • Which was chosen and based on what strategy or priority
  • Errors or warnings in the communication with the telco server
  • Sucessful deliveries


Using Clickatell

Clickatell is the de-facto service for a quick, reliable, international messaging setup. They provide you with one or more numbers that you can use in several countries and carriers.

Nuntium supports the creation of a channel for Clickatell. All you need to configure are your credentials, decide if you want to use it as incoming, outgoing or bi-directional channel and the network that you got your number in. That network determines in which countries and carriers your phone number will work. Nuntium already imports periodically all the coverage tables from Clickatell, so you don't need to worry about that.

After doing the setup, you can either pull the messages using an RSS feed, or you can configure an endpoint in your app, an Nuntium will do a post to that URL for each incoming message. That way you don't even need to code a scheduled recurrent task to check for new messages.


Using a plugged-in phone or a gsm modem

A very common scenario in a mobile app deployment is that the use of international numbers for SMSing is either cost-prohibitive or just doesn't work. Getting a local telephone company to provide you with a cheap number and a machine-friendly interface to read and receive messages can take some time in many countries.

The default choice in this cases is to buy a local simcard, get a cheap phone and just interface through a computer.

You can also do that with Nuntium by configuring another type of channel and downloading our mobile gateway application. It's a java app, so you can run it under Windows, Linux or OSX.

The nice thing is that whenever you need to scale up and you have your short-code or long-code ready with a carrier or aggregator, you just add another channel and without changing a single line in your application, you are ready to go from a few messages per minute, to hundreds or thousands.


Allowing your apps to interact with users through Twitter, Email and Chat

Nuntium does more than sending SMS. You can use it for any other messaging channel you can think of. Mail is supported through POP3 and SMTP, so you can just create a gmail account and start sending and receiving mails from your app. Or create a twitter account and set it up. If you want your users to be able to chat with your application or receive notifications in their GTalk, Adium, or any other XMPP (ex-Jabber) client, you can also do it.

And all of this through only ONE interface. Your application doesn't have to worry if it's an SMS, email, twitter or instant message what it want to send. Just adding a prefix like "xmpp://" or "sms://" to the recipient address will tell Nuntium everything it needs to know to dispatch the message. You will also get all the incoming messages in exactly the same way.


Summary

If you need to SMS-enable your apps, or if you want to switch to something that will allow you to scale both horizontally and vertically, get in touch, we would love to help you out build a world-class app with world-class messaging powers.
Posted August 11th, 2010 by Nicolás di Tada

IT without Software



During August 2009, we went on a number of field trips to health centers in remote areas of Thailand and Cambodia. The idea was to conduct a few usability tests on Geochat syntax alternatives that we were exploring. Our goal was to simplify the interaction between health workers and the system to ultimately allow them to report disease cases in a semi-structured way.


The case information always originates at the local health center level - this is where the patient comes and gets diagnosed. Most of the case reports are made through phone calls to the district level (the higher administrative level). Case details get lost when the district level summarizes the information by disease and reports the quantity of each to the provincial level.


During our visits to provincial offices, we received useful feedback which ultimately led to the design of the current syntax. However, in health centers we found a few issues that needed to be solved before any syntax at all could be used:


  • Most people do not know how to send SMS.

  • Some of them do not know how to read an incoming SMS.

  • Support for Khmer and Thai characters is not common in the handsets and carriers most people use.

  • Even if there is support for the characters, writing SMS using them is much more difficult than writing in English due to the amount of letters in the alphabet.


These posed a huge barrier to solve even before the reports could be collected. It was not about simplifying a syntax.


Reinventing the Wheel


On our way back from the visits, feeling discouraged over the challenges ahead, an idea arose. What if we decouple the process of structuring the report from the channel through it was sent? If you ask someone to send a telegraph, he does not need to know Morse code. In the same way, we could allow health workers to create the report outside the constraints of the tool being used to transmit it.



The reporting wheel has 3 concentric circles. The material can be paper, card-stock or plastic. The circles turn independently, so you can combine any set of values of each ring. On the left side is the value to be selected, on the right side a code that represents that value.


The cover of the wheel allows you to see the values you are selecting and the number you need to report. Once the user has selected the day of the month, the disease and the number of cases he wants to report, a 9 digits number is formed on the right side which represents the 3 values selected.


The user can then make a call to a reporting hotline and enter the number or send it through an SMS (it's usually much easier to train people to text numbers than letters).


Additional instructions can be written on the cover to make the tool "self-documented."



This tool is very easy to build and can be done locally; it's cheap without being fragile; can be shared and does not requires batteries. Best of all, it can be created for any language while still being language independent, that is, different wheels in different languages can contain the same codes and thus be used to report the same values. Some initial usability tests indicate that it's intuitive and easy to learn. In one particular case, a health worker was explaining how to use it to a colleague after just 5 minutes of training.


Codification


There are two issues in the codification process:

  1. Mistakes in the typing of the numbers: a typo could cause a Malaria report to be mistaken for Dengue.

  2. If multiple groups want to use the same reporting hotline for different kinds of reports such as veterinary diseases or crop yields, the recipient of the reports needs to know which kind of wheel it came from.



The solution for both problems happens to lie in the same trick. The codes for each reported value are selected in a way that not only allows the detection of errors in the typing, but also enables the detection of the kind of wheel used to report. With the method we developed, a total of more than 600k different wheels can be created and each can be uniquely identified with no additional information - only the 9-digit number reported is required. That means the same reporting hotline can be used to receive reports from a wide variety of sources.



At the moment we are conducting pilots in Thailand and Cambodia. We will soon have more to report on this.


Posted June 18th, 2010 by Nicolás di Tada

Hans Rosling at the InSTEDD iLab!

Just a quick note to mention that Hans Rosling, one of the most interesting medical statisticians alive, came by the InSTEDD Innovation Lab on the day of our Buddhist Blessing Ceremony to offer a few thoughts about Cambodia to our iLab staff.

Hans, a medical doctor out of the Karolinska Institute in Sweden, has developed a set of tools for visualizing data in a simple, intuitive, and informative way, and he ruptures a lot of myths in his moving bubble diagrams. His work on HIV, on investments in the developing world, the relationships between education and child health, and more, has affected thinking - and policy - at national and international levels. He's a phenomenal teacher, and to have him spend two hours at our iLab, talking about Cambodia to our Cambodian staff (and lots of visitors for the occasion), was a wonderful stroke of good fortune.

You'll get the idea below that his work with his software, Gapminders, visualizing data from statistical databases at WHO, the World Bank, and elsewhere, was engaging, thought-provoking, and a real kick-start to the Dynamic Resource Mapping capabilities we're just now moving out into the world (see the Dynamic Resource Mapping blog below). Great timing for us, explaining why REALLY knowing what you have out there is critically important.

To get a flavor of his hours spent with us, I recommend any one of the talks that Hans has given at TED. You can see his most recent, at TEDIndia last summer, here. Other TED talks include a little sword-swallowing. He's an interesting man.

Thanks, Hans. It was a terrific day.




Posted February 22nd, 2010 by Eric Rasmussen

Dynamic Resource Mapping

iLab team started working on project “Dynamic Resource Mapping” . This project is aim to provide mapping of any facility or resource and be able to update and query the resource availability via SMS, Web interface. The scope of this project is:

  1. Support multiple source of information (Eg. Cambodia Health facility, Myanmar Health facility, ..etc)
  2. View , filter, add facility and resource availability on the map
  3. Export resource and facility to KML file for view on Google earth or for other use
  4. Update resource availability via SMS
  5. Query to get resource availability information via SMS
  6. Provide more visualization information such as present the availability of resource information as heat map
  7. Can include other KML layer source of information (eg. Census population by provinces/region)

Future directions:

· Export/import KML

· Ways of visualizing the information

· Query and update the information via ODK

Below are screenshot of the current status of development

(Map view: facility and its latest resource information)

(Add or remove type of resource)

(View facility information)

online add and edit facility/resource (Here taking clinic as an example)

Update new resource availability via SMS (Example in screenshot, Submit update information to clinic id=1 as availability of bed=10, doctor = 5, Xray=2 and ambulance = 2)

Posted February 22nd, 2010 by Phnom Penh Lab

Prince Mahidol of Songla, Magic Wheels, and the iLab

The second half of January was a blur of collaborative activity around the earthquake in Haiti. As many of our readers know, InSTEDD, with a collection of competent, attentive, and collegial partners around the world, had a team on the ground at the Port au Prince airfield within about 72 hours after the quake. We accomplished some significant and continuing good and I’ll discuss that elsewhere. February, though, began in Bangkok.

Prince Mahidol of Songla

Each year the Prince Mahidol Award Conference selects one or more global leaders in public health for recognition of their lifetime achievements. The ceremony, in Thailand, serves as a useful opportunity to hold one of the better Public Health conferences of the year. More than 1,000 attendees from dozens of countries converge on Bangkok for three days of presentations and conversations, and this year InSTEDD had a very strong presence.

Press Conference

 

 

The week began with a separate Press Conference led by the Thai Health Promotions Foundation. It included recognition of our implementing partners in Thailand (Change Fusion and OpenDream), our most prominent funder in the Mekong (Google.org) and our new relationship with a Thai communications company (DTAC).



After a lively few months spent shaping a business relationship with DTAC around SMS messaging in humanitarian support, we all found some common ground and a good first step at lowering the financial thresholds for disease reporting and outbreak surveillance. Our goal is to provide a free SMS shortcode for GeoChat use everywhere in Thailand and we’re getting there. We’re now confident that we can continue to refine our new relationship into a model for other areas of the developing world that need a reporting and alerting capability for emergencies. This media gathering, just before the opening of the Prince Mahidol Conference, was to explain what we’ve done together thus far and what we intend for Thailand over the next few months.


Based on the later media coverage it was apparently a very successful press conference, conducted mostly in Thai, with DTAC explaining what they've done with our partnerships, and Change Fusion demonstrating a few of the new capabilities in GeoChat. I’ve just heard this week that InSTEDD and our partners made it to the front page of the newspapers in Bangkok, and I’d already seen video from television broadcasts of the event. Although it’s all in Thai, I’ll share them here at Thai TV Video 1 and Thai TV Video 2.

Channe Suy

A day or so later Channe Suy, InSTEDD’s Product Manager from our Innovation Lab in Phnom Penh, presented to a large Prince Mahidol audience our ideas around InSTEDD’s Innovation Lab concept, and specifically why we have one in Cambodia. She touched on the value of the open and shared space for innovative technical work that we’ve provided since 2008, and she spent some time describing our focus on capacity building, local teams working in local languages, interoperability, integration with existing workflow and tools, and how InSTEDD works toward an intersection of grassroots needs and national priorities. Channe gave a terrific talk, well delivered and well received, and I heard great comments about it throughout the rest of the conference.

Magic Wheel

One topic Channe addressed was our Magic Wheel – a physical object – that helps minimally-literate Community Health Workers report disease outbreaks in a consistent, reproducible, error-correcting fashion using a tool we’ve designed that looks a little like a circular slide rule. It received rave reviews for its simplicity, clever, intuitive, and robust mathematical structure, and its adaptability across languages. We'll talk more about it when the field testing is a little further along.


Policy and Tech

I, too, spoke at the conference. My topic was policy and technology in Health Information Systems and I spoke about the need for better guidelines around cloud computing, the challenges between transparency (public safety) and privacy (personal safety) in an emergency, a little about interoperability (as always...), code-escrows, telco contracts, capacity building, and deliberate exit strategies that leave new capabilities properly in the hands of responsible agencies. I was drawing on our work in Haiti and elsewhere (with photographs for illustration), and it was probably a bit much for a 20-minute talk, but you can judge for yourself here.

A few days later in Phnom Penh, we were all able to reconnect in the iLab, getting together as the largest single gathering of the InSTEDD team in a year, and sharing in a gorgeous and moving Buddhist Blessing Ceremony for our place and our work. It was a nice moment in the history of the lab and I think it bodes very well for the coming year.


iLab model

We had several days in Cambodia, and it was great to see the new faces as people join us, and to watch how well the iLab has moved forward to address concrete problems identified by local staff. It’s a terrific model for developing a local brain trust within a neutral space, addressing local cross-sectoral problems, and it’s getting better constantly as we learn.

We intend to adapt the iLab idea to new sites and new needs over the coming years, and we’re watching now for locations where this capacity building might be most useful. Suggestions are welcome! Drop a note to me at Rasmussen@InSTEDD.org or, if you're really excited about a possibility, call me on my cell at +1-360-621-3592.

 

Posted February 18th, 2010 by Eric Rasmussen