Technical challenges in delivering emergency SMS in diverse regions

Ushahidi
Mar 19, 2018

TenFour is Ushahidi's newly announced service, aiming to be the easiest way to reach your team in an emergency, on any device. With TenFour, your organization has a single, simple tool to contact your team members during a crisis and allows managers to clearly see who has or has not responded to an emergency check-in request.

TenFour employs multiple channels to contact team members - in-app, email, slack, voice and of course SMS. 

This article describes some of the technical challenges in delivering SMS messages to team members in diverse regions.

TenFour - A Use Case

In order to understand the context of this article, it is useful to describe an example use case of the TenFour service.

During an emergency, a team manager signs in to TenFour to create a new "Check-In". That is, they will request that all (or some subset of) team members respond to a message asking are they ok.

From the end-user point of view, they may be somewhere in the field during a emergency and should receive an SMS message saying something like:

Are you ok? Respond with "yes" or "no".

The team member then sends a normal SMS response with "yes" or "no" to the phone number they received the check-in on. Their team manager is able to see their response in their TenFour dashboard.

SMS Delivery Reports

Delivery reports are a feature of the SMS system indicating whether a sent SMS has been received by the handset of the end-user. 

Initially, this seems like a good indicator of whether a SMS has been read by a team member. However, on closer reflection it may not be entirely accurate. If a delivery report is received it is a indication that it has been delivered, not necessarily read. The handset may have received it, but your team member may not have physically laid eyes on it - the phone may be lost or the human may be incapacitated.

Furthermore, it is possible to disable delivery reports on some handsets. Additionally, some regions (notably U.S.) have little network support for such reports, and the problem is exacerbated when delivering SMS across international networks.

For this reason, TenFour does not rely on delivery reports in any form.

Local vs International Numbers

Another factor to examine is whether to use a local number or an international number for SMS delivery. 

Delivery to multiple regions using an international number appears to be the simplest option in terms of configuration - you would only need to maintain one or more international (say U.S.) numbers and then deliver to any country using that number.

However, this poses some problems:

Your end users would incur international SMS fees when responding to the message. They may also incur fees to receive an international SMS.

Not all virtual numbers are able to receive inbound international SMS messages. This could mean that a team member's SMS response is not received by the gateway and will not appear in the TenFour dashboard.

For these reasons, we decided it is essential that TenFour maintains local inbound SMS phone numbers in the regions that are supported.

SMS Gateway Providers

There are many established SMS gateway providers, such as Nexmo and Twilio. These gateways provide an API to send and receive SMS messages in multiple international regions.

However, those regions do not cover the entire planet and each provider has varying level of support in each region. For example, the main players do not provide very good coverage in Ushahidi's home territory of Kenya and East Africa, whereas a local gateway, Africa's Talking, does.

So what is the answer? Well, while developing TenFour, it was necessary to add support for multiple SMS gateway providers. This adds a level of complexity to configuration, but allows for very good coverage across multiple regions.

There is also the option of running your own gateway, e.g. Ushahidi's SMSSync.

Rate Limits

An important consideration when sending SMS is the restriction on sending large numbers of messages in some regions. For example, when sending from U.S. long virtual numbers, you are restricted to to 1 SMS per second. This is a regulatory restriction intended to reduce SMS spam.

For example, if your organization has 10,000 members in the U.S., sending a check-in to everyone would take 10,000 seconds = nearly 3 hours! This is clearly not ideal during a crisis as there is an urgency to reach all team members.

To reduce this delay, TenFour uses a virtual number pool. In this above example, a virtual number pool of 100 U.S. numbers would allow the check-in to be sent to 10,000 team members in only a couple of minutes.

TenFour is built on the Laravel framework and we use rate limiting in our SMS queues to ensure that we don't exceed these SMS restrictions.

Short Codes

A short code is a short phone number - typically 4 or 5 digits - usually used for automated services because they are easier to display and remember. 

TenFour supports short codes, but there are a couple of things to consider:

Messages sent to a short code can be billed at a higher rate than a standard SMS.

If using a shared short code, a keyword is necessary at the beginning of the response so the message is routed correctly.

When configured with a shared short code, TenFour will send an SMS like so:

Are you ok? Respond with "tenfour" followed by "yes" or "no".

To which the user must respond:

tenfour yes

This adds an extra step to the response. This seems trivial, but consider that your end user may be operating in "crisis mode" and even a tiny extra cognitive effort may mean the user does not respond correctly. For this reason, it is worth considering the extra cost to purchase a dedicated short code and avoid the need for a keyword.

Conclusion

This article covered some of the inherent difficulties in sending and receiving automated SMS internationally. It can been seen that there are many variables to consider when operating a service that needs to support diverse regions. An additional concern is operating such a service during crisis times, when delivery is essential for team welfare and the peace of mind.

Extra diligence should be afforded to the correct configuration of gateways. No assumptions should be made about the region you want to support. Full manual testing on a real device should take place in the targeted country.

Stay safe out there.