Get phone numbers directly from Telerivet (Android not required)

Using Telerivet's Android app as an SMS gateway is certainly more convenient than alternatives like connecting a GSM modem to a computer. 

However, using Telerivet's Android app does require some care on your part. You need to:

  • keep the Android phone powered on,
  • make sure it has internet connectivity, and
  • refill the phone's credit before it runs out. 

Not difficult… yet still not as easy as it would be if you didn't need your own device at all. 

A service that provides SMS-enabled phone numbers "in the cloud" would be even easier.

Since the beginning, Telerivet has supported Twilio, a service that offers SMS-enabled phone numbers in the United States, United Kingdom, and Canada. By connecting a Twilio phone number to Telerivet, you can send and receive SMS messages with your Telerivet account, and easily build SMS services without needing programming expertise or your own servers. Diagram_twilio2
Until now, using a Twilio phone number with Telerivet used to mean that you had to set up your own account with Twilio and pay them separately for your SMS usage.

But now, we're happy to announce that you can get SMS-enabled phone numbers directly from Telerivet. There's no need to set up your own Twilio account (or even know what Twilio is!). Just sign up for Telerivet, find a phone number that you like, and start sending and receiving SMS. It's that easy.

As you send and receive messages, we simply deduct the cost of each message from your Telerivet account balance ($0.01 for incoming SMS and most outgoing SMS). 

For a limited time, we're even offer a small amount of credit to new users to let you get your own phone number and try sending and receiving SMS for free.

What if you want a phone number in another country besides the U.S., U.K., and Canada? 

Of course, Telerivet's Android app still lets you send and receive SMS with a local phone number in any country.

In the coming months, we look forward to working with other SMS gateway providers (in addition to Twilio) so that we can offer cloud-based phone numbers in as many countries as possible. Stay tuned!

What we did when all the other SMS tools didn’t work

Welcome to Telerivet's new blog!

In the coming weeks/months/years, we'll be using this space to introduce new features and service updates, share tips and tutorials, profile organizations using Telerivet in interesting ways, and discuss our thoughts on the mobile ecosystem in general.

As we post new updates here, we'll tweet about them too — follow us on Twitter to stay updated!

To kick off our new blog, let's introduce how Telerivet fits into the huge ecosystem of SMS tools and services, as we tell the story of why we created Telerivet in the first place.

In 2010, we wanted to set up a SMS service so that grassroots non-profit organizations in Tanzania could publish news to, interact with other organizations, and receive notifications, even if they didn't have internet access.

Here's what we tried, and how we ended up building Telerivet instead.

Attempt #1: Online SMS APIs

If we had wanted to set up this SMS service in North America or Europe, instead of East Africa, it would have been simple.

There are a lot of great online SMS gateway API services out there, like Twilio, Clickatell, Nexmo, and Tropo, which allow software developers to easily send and receive SMS messages from their own applications.

However, most of these services only offer phone numbers in a few countries, such as the U.S., U.K., and Canada.

This meant that our users in Tanzania would have to pay extra to send international SMS messages, instead of paying cheaper domestic SMS rates using one of the SMS bundles offered by their mobile network.

And although many of these services were able to send SMS to other countries, we found that international SMS was often unreliable  and sometimes wouldn't reach users on particular mobile networks in East Africa.

Attempt #2: Buy a SMS shortcode

To avoid the problem of sending international SMS, we tried to get a phone number in Tanzania that would let us send and receive SMS domestically.

Unfortunately, in Tanzania there aren't yet any companies like Twilio where you can get an inexpensive "longcode" virtual mobile number with an API for sending and receiving SMS.

However, there are a number of mobile networks and resellers that offer SMS shortcodes.

Often these companies do not offer transparent pricing, and instead negotiate private contracts.

We negotiated with one of them, and they offered a year-long contract amounting to over $5,000, in addition to about 3 cents for each message sent or received.

The non-profit organization we were volunteering for couldn't justify spending that much on a SMS shortcode.

To reduce the cost of SMS shortcodes, many companies offer shared shortcodes, which allow multiple users to build services on top of the same shortcode and reserve different keywords for their applications.

For some uses, shared shortcodes are often an economical option. However, shared shortcodes have the limitation that each incoming SMS message must begin with the user's unique keyword, and we decided they wouldn't work for us.

Attempt #3: Download software to send and receive SMS with a GSM modem

Free downloadable software tools like FrontlineSMS and RapidSMS have proven popular among many non-profits in developing countries.

With these tools, you connect a GSM modem or a basic feature phone to a computer running the software, turning your computer into a SMS gateway.

Tools like FrontlineSMS are indeed useful in some scenarios, especially because you can use them in remote areas where you don't have internet access.

But as we explored using them for our SMS service in Tanzania, it soon became clear that they would prove expensive, unreliable, and unmaintainable in practice.

Connecting a phone or GSM modem to our computer to send and receive SMS was the first challenge.

These software tools interact with phones and GSM modems by using a protocol called the Hayes command set (also known as AT commands), essentially the same way computers interacted with analog modems in the 1990s and earlier, complete with archaic settings like baud rate and COM ports. However, each phone and GSM modem implements a different subset of the protocol, and only a small fraction of current devices are compatible with the software.

None of the phones we already had proved to be compatible with the software, so we ordered one of the devices known to be compatible.  But when it arrived and we tried to connect it, the device drivers wouldn't install correctly on our computer.

As we struggled with connecting the GSM modem, we realized that even if we got it to work correctly, running a SMS gateway on a PC in Tanzania was not going to be maintainable.

In order to provide a SMS service 24/7, we'd need to dedicate a computer to it, make sure the software is always running and doesn't crash, and make sure the computer always has electricity – no easy task in developing countries like Tanzania.

And although software like FrontlineSMS and RapidSMS don't require internet access themselves, we would need reliable internet access in order to integrate with Since the non-profit's office in Dar es Salaam often has power outages that take the network down, this did not seem promising.

And if we wanted to access this computer from elsewhere, even just to send SMS notifications, we would need to host it somewhere where it would have a public IP address.

It was clear that the model of using PC and GSM modem as an SMS gateway was not going to work.

Attempt #4: Use a phone as an SMS gateway

We realized that since phones can send and receive both SMS messages and internet packets, that we could use a phone as a standalone SMS gateway without needing to be connected to a PC.

We started by exploring the possibility of building a J2ME (mobile Java) app that would work on the cheap feature phones common in countries like Tanzania. However, it didn't take long to discover that it simply wasn't possible to build apps that access the necessary SMS functionality on cheap feature phones.

Then, we discovered that on Android, a few SMS gateway apps had already been created — including KalSMS, APK SOFT SMS Gateway, and Ushahidi SMSSync.

We realized that using an Android phone as an SMS gateway was a great solution: sub-$100 Android phones such as the Huawei IDEOS are rapidly proliferating throughout developing countries (and are much less expensive than a computer and GSM modem); they're easy for non-technical people to maintain, and have built-in battery backup and redundant networking (Wi-Fi and mobile data) to stay operational in challenging environments.

Unfortunately, our testing showed that the existing Android apps were quite limited and not very robust. For example, all were limited by Android's restriction of 100 outgoing SMS messages per hour per app, and would freeze if you attempted to send more than 100 SMS per hour. Also, they all struggled with the problem of how to send outgoing SMS — since the Android phone generally does not have a public IP address, it has to constantly poll the server for outgoing messages, using bandwidth and battery life. They also didn't make it easy to figure out what was wrong if the phone was having problems.

Since none of the other Android SMS gateway apps were good enough for us, we built a vastly improved SMS gateway app ourselves, deployed it in Tanzania to power Envaya's SMS interface in October 2011, and shared it with other software developers.

Attempt #5: Start a company

Soon, other people began using our Android SMS gateway app, and non-developers started asking for our help because they didn't have the technical skills to set up servers, or to implement the complex developer API provided by the Android app.

Then we realized our opportunity: to provide a service to make it easy for anyone to build their own services and applications on top of SMS anywhere in the world, even if they didn't have the technical expertise (or didn't want to spend the time, money, or effort) to implement a complex API or run their own servers.

By building a service that combined an Android app with our own servers (aka "the cloud"), we could build something that non-technical users could use to send and receive SMS in developing countries, without all the issues of using a GSM modem with software on a PC.

A couple months of hacking later, we quietly released Telerivet in beta on Leap Day 2012. Telerivet lets people easily create and deploy custom mobile services anywhere in the world, letting them focus on the high-level aspects of creating and running mobile services without getting bogged down by technical barriers.

The response has been amazing.  Spreading mostly by word-of-mouth, leading non-profits and businesses are already using Telerivet to send SMS in many countries around the world, such as:

  • Kiva to facilitate communication between borrowers in Kenya and lenders around the world
  • myAgro (2012 Echoing Green winner) to allow farmers in Mali to save for agricultural supplies (even throughout a coup-d'etat)
  • InVenture to help people establish creditworthiness in India
  • FieldPulse Research to collect data from market sellers in Mogadishu, Somalia

Even if you work in a place with a bit more stability than Mali or Somalia, you can use Telerivet to build automated SMS services like opt-in subscriptions, polls, and informational services, or just send and receive SMS in your browser.

Read more about the amazing things that other people are already doing with Telerivet, and try it out yourself!

Jesse Young is Telerivet's Chief Technology Officer.