New feature: Message Routes

Telerivet has always made it easy to connect multiple phones to your Telerivet account, whether you’re sending messages to multiple countries, taking advantage of in-network SMS rates, or sending more messages than a single phone can handle.

We know that being able to send messages from multiple phones gives you more flexibility and reliability with your communications. But it has required manual effort to choose the right phone to send each message.

So we’re happy to announce our new, long-awaited Message Routes feature!

Any Telerivet user with more than one phone connected to their Telerivet account can now easily create custom routing rules to determine which phone to use to send each message. Whether you utilize Android phones, virtual numbers, or a combination, it’s now easy to choose which phones send which messages.

Here are our top three reasons why you should try out Message Routes:

1. Make your SMS sending more reliable

 If some of your Android phones are disconnected, Message Routes can send messages using any active phones. And if one of your phones has an error sending a message, Telerivet can automatically transfer the message to another phone.

2. Decrease your SMS costs

If it’s cheaper to send an SMS message to another phone on the same mobile network, you can easily use phones on different mobile networks to send messages to different contacts.

3. Send more messages than a single phone can handle

 Message Routes can automatically distribute messages among multiple phones. If your phoneshave a lot of queued messages, Telerivet can automatically choose the phone with the shortest queue.

Better yet, Message Routes work everywhere in Telerivet, including Telerivet’s web app, automated services, and the developer API.

Sounds pretty great, right? When you’re ready to try it out, here’s how to do it.

 

Creating Routes

In your Telerivet project, go to the Phones page, and click on the "Routes" tab. Then click the "Add new route" button to set up your routing rules.

If you’ve used Telerivet’s Rules Engine, then you already know how to create a Message Route. Each message route is just a collection of one or more “rules” —  either an “if … then …” condition, or a rule choosing the phone(s) that can be used to send the message.

Depending on what you want your Message Route to accomplish, you can add rules in different ways. Below we’ll describe how to create two different types of Message Routes: Load-balancing routes, and Least-cost routes.

 

1. Load-balancing routes – Distributing messages among multiple phones

To create routes that distribute messages among multiple phones, all you need to do is click “Add rule…” and click "Choose phone(s) to send message":

 

Route_addrule

Then add all the phones you want to use. Click the (+) button on the right hand side to add more phones:

 

Route_multi

That’s it! Just click “Save route” and you’re done.

Now, when you use this route to send messages, Telerivet will automatically distribute messages among all the of phones you list:

So, how does Telerivet choose which phone to use for each message? When you send a message, Telerivet calculates a numeric score for each phone in the list, and then chooses the phone with the highest score.

Curious how Telerivet calculates the score? Here’s how we do it:

1. If the phone has connected to Telerivet’s servers in the past half-hour (+1000 points)

 2. The number of errors sending messages in the past hour (-5 points per failure)

 3. The number of messages waiting to be sent (-1 point per queued message)

 If multiple phones have the same score, then Telerivet will just choose a phone at random.

If a phone tries to send a message and it fails (e.g. if airtime runs out on one of your phones), Telerivet will also retry sending the message via another phone in the list.

By creating a route with multiple phones, it’s easy to send SMS reliably, even if some of your phones are temporarily out-of-order.

 

2. Least-Cost Routing — Using different phones to send SMS to different contacts

The other big use case for Message Routes is when you want to send messages to different contacts using different phones.

To create a Message Route with this behavior, start by creating an "if … then …" condition for each of your phones, and then add a "Choose phone(s) to send message" rule underneath each one:

 

Route_ifthen

 

The next step is to actually define each of the if/then conditions, to specify which messages get sent via which phones. There are a few different ways you could do that:

 

Option 1. Look at first digits of the phone number:

 

Route_number

 

Option 2. Create a custom variable for each of your contacts:

 

Route_var

Option 3. Add contacts to a group:

 

Route_group

 

If you can determine which phone to use from the first digits of the phone number, that’s usually the easiest option, since you don’t need manually import or organize your contacts.

It's possible to create a route that doesn't assign every phone number to a phone. If you try to send a message that is not routed to any phone, you'll just get an error message.

 

Using your routes

Once you’ve created your routing rules, using them is easy. After you create a route, it will show up anywhere in Telerivet where you select a phone to send a message:

 

Send_route

 

If you click the "Set as default route when sending messages" checkbox when creating or editing your route, then it will be selected by default.

You can use custom routes on the Messages page, in polls, in the rules engine, and even in the Developer API.

To use your routes in the Developer API, visit the API page for your project to get the Route ID. Any time you send a message from the API, simply use your Route ID for the phone_id parameter. See API documentation.

 

Overriding the default route for each contact

Like before, there is also the ability to override the default route for each contact, but now you can also disable that functionality.

On your project settings page, there is now a checkbox labeled "Allow customizing sender phone for each contact":

 

Custom_contact_routing

If this setting is enabled, then you can set the "Default Sender Phone" (or route) separately for each contact, the route selected by default will show up as "Default phone" — which just means to use the default phone (route) for each contact.

For backwards compatibility, existing projects with multiple phones have this setting enabled by default, but new projects will not. So if you don’t need to have a different default route for each contact, you might want to disable this setting.

Try out the message routes feature and let us know what you think!

-Elizabeth

New expansion packs – Increase your message capacity

We just released a new version of the Android app that lets you send even more SMS messages per hour. We just added 7 additional SMS expansion packs, giving Telerivet Android app users access to download 16 SMS expansion packs total. With these additional expansion packs, you can now send up to 1,020 SMS an hour on Android 4.1+ and 1,700 SMS an hour on older versions — assuming your phone can keep up.

For Telerivet users who send a lot of SMS messages through their Android phone, expansion packs are necessary because Android limits the number of messages each app can send per hour. This rate limit is meant to help you by preventing unscrupulous apps from sending a lot of SMS messages without your knowledge and wasting your airtime. But when when you actually want to send a lot of SMS messages, Android’s rate limit becomes more of a hindrance than a help.

As a result, we created the SMS expansion packs as a way to help you get around that limitation —  each expansion pack can send 30 SMS messages every 30 minutes on Android 4.1+, and 100 SMS messages per hour on older versions.

If you’ve been running into the SMS rate limit with Telerivet, and want to install more expansion packs, here’s how to do it:

  1. Open the Telerivet app on your Android phone.
  2. If there is a prompt that says a new version of the app is available, install the newest version of the Telerivet Android app.
  3. Click “Increase SMS Rate Limit.”
    Expansion_packs

  4. After installing the 9 original SMS Expansion Packs, if you still need additional capacity, click “More SMS Expansion Packs.”
    More_expansion_packs

  5. Install up to 16 expansion packs.
    More_expansion_packs2

The 7 new expansion packs aren’t available from Google Play, so if this is your first time installing an app that wasn’t downloaded from Google Play, you’ll need to follow the instructions to allow installing  apps from “Unknown Sources”.

-Jesse

Optimizing Telerivet for Mobile Web

Software developers like Telerivet face a number of unique challenges when designing and deploying software for users in developing countries:

  • sporadic power and internet connectivity
  • language barriers
  • devices ranging from feature phones to smartphones to PCs
  • older computers, phones, and browsers
  • users with less computer experience
  • higher latency and lower bandwidth
  • increased cost of internet access

Much of our work at Telerivet goes into addressing the particular challenges of building software that works well in developing countries, in places where most other software doesn't work very well.

Among these many challenges, we've recently been focusing on the particular challenge of making Telerivet's web-based tools work on mobile devices.

Even though Telerivet is designed for communicating with non-internet-connected mobile phone users, we initially designed Telerivet.com around the idea that our customers would manage their SMS service from a web browser on an internet-connected PC with a large screen, keyboard, and mouse.

For people using Telerivet's Android app to send and receive SMS, this meant that our customers needed two computing devices: an Android phone, and a PC.

But as we started to reach out to customers in developing countries, we realized that many of them use their phone as their primary computing device, and they didn't have easy access to a PC.

So we are happy to launch two new features today that will make a big difference for many Telerivet customers in developing countries. 

1. A Mobile web version of Telerivet.com that works on any smartphone (and many feature phones)

From any smartphone, simply open http://telerivet.com in your browser, to log in and manage your SMS service while on the go. Telerivet will automatically detect whether you are using a mobile or standard browser, so you use the same URLs on your phone as on your PC.

Mobile-contacts Mobile-messages

Mobile-send

Most things work pretty well even on feature phones with Opera Mini (if you have enough patience)!

2. A new version of Telerivet's Android app that embeds Telerivet's web-based tools

For those using Telerivet's Android app, all of Telerivet's web-based administration tools are now available as tabs directly within the app. (For security, these tools require you to log in to your Telerivet account.) You can send and view messages, view and update contact information, view statistics, and configure automated SMS services such as subscriptions, polls, and auto-replies directly from the Android app. No PC necessary.

App-running App-messages

Of course, some actions are inevitably going to be tedious on a small touchscreen device, no matter what we do. So when it's convenient, you can still log into Telerivet.com using a PC with a keyboard and mouse.

How we did it

Instead of building entirely separate interfaces and interactions for mobile and desktop browsers, the two versions share almost all the same code.

(Actually there are three different versions, since the pages that show up within the Telerivet Android app are slightly different from those viewed in a normal mobile web browser.)

Most of the differences between the two (or three) versions of Telerivet.com are simply a matter of sending the browser a different CSS stylesheet. (CSS allows web developers to specify the sizes, positions, and colors of the various visual elements on screen when someone open a web page in your browser.)

Telerivet's desktop version assumes that the browser is at least 920 pixels wide, so the CSS stylesheet often specifies the exact pixel width of various parts of the user interface. In contrast, Telerivet's mobile version automatically adjusts the content to fit the width of the screen.

But some mobile optimizations aren't possible with CSS. In these cases, we create custom HTML templates to render parts of pages differently between the mobile and desktop versions of our website.

For example, in the desktop version of our website, each page includes a header with a graphical Telerivet logo:

Desktop-header

On the mobile web version, showing this logo at the top of each page would take up a significant portion of the screen, leaving less space for the actual content (not to mention the extra bandwidth that would be used to download the logo). Instead, the mobile web version simply uses the text "Telerivet", while the version inside the Telerivet app doesn't include the word "Telerivet" at all.

Mobile-header  App-header

However, customizations like these come at a cost — more code for us to maintain and test! Since we're always rapidly adding new features to Telerivet, we don't want it to be twice as much work to support both a mobile and desktop version.

So we try to keep the differences between the desktop and mobile versions at a minimum, and structure our code so that the mobile and standard views can use the same HTML and CSS whenever possible. Only 2% of Telerivet's HTML templates and about 11% of our CSS styles are different between the mobile and standard versions of our website.

To upgrade the Telerivet app on your Android phone, just open the Telerivet app and click the button to upgrade. (If you haven't started using Telerivet yet, sign up for free here.)

Try it out on your phone, and let us know what you think!

(Stay tuned for more blog posts where we'll discuss our work to optimize Telerivet for users in developing countries, and follow us on Twitter for more updates!)

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.

Search_phone
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.

Integrated_billing
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!