2011-09-19 03:45:09 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset='utf-8'>
|
2011-09-24 03:42:11 +00:00
|
|
|
<meta http-equiv="cache-control" content="no-cache, must-revalidate" >
|
2011-09-23 22:18:36 +00:00
|
|
|
<title>EnvayaSMS: How it Works</title>
|
2011-09-24 03:42:11 +00:00
|
|
|
<link rel='stylesheet' type='text/css' href='/styles/site.css' />
|
2011-09-19 03:45:09 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2011-09-23 00:25:32 +00:00
|
|
|
<a href="http://github.com/youngj/EnvayaSMS"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
|
2011-09-19 03:45:09 +00:00
|
|
|
|
|
|
|
<div id="container">
|
2011-09-23 22:18:36 +00:00
|
|
|
|
|
|
|
<a style='float:left' href="/"><img src='/media/icon.png' height='72' width='72' style='margin-right:10px' /></a>
|
|
|
|
<h1 style='padding-top:13px'><a href="/">EnvayaSMS</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
|
|
|
|
<span class="small">
|
2011-09-23 00:25:32 +00:00
|
|
|
SMS gateway for Android
|
|
|
|
</span>
|
|
|
|
|
2011-09-19 03:45:09 +00:00
|
|
|
</h1>
|
|
|
|
|
2011-09-23 00:25:32 +00:00
|
|
|
<div class='menu' style='clear:both;padding-top:5px'>
|
2011-09-23 22:18:36 +00:00
|
|
|
<a href='/'>Home</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
·
|
2011-09-23 22:18:36 +00:00
|
|
|
<a href='/install/'>Install</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
·
|
2011-10-01 22:47:55 +00:00
|
|
|
<a href='/test/'>Test</a>
|
|
|
|
·
|
2011-09-23 22:18:36 +00:00
|
|
|
<a class='active' href='/how/'>How it Works</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
·
|
2011-09-23 22:18:36 +00:00
|
|
|
<a href='/serverapi/'>API Reference</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
·
|
2011-09-23 22:18:36 +00:00
|
|
|
<a href='/faq/'>FAQ</a>
|
2011-09-23 19:16:53 +00:00
|
|
|
·
|
2011-09-23 22:18:36 +00:00
|
|
|
<a href='/history/'>History</a>
|
2011-09-23 23:36:51 +00:00
|
|
|
·
|
|
|
|
<a href='/community/'>Community</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
</div>
|
2011-09-23 22:18:36 +00:00
|
|
|
|
2011-09-19 03:45:09 +00:00
|
|
|
<h2>How it Works</h2>
|
2011-09-23 22:18:36 +00:00
|
|
|
|
|
|
|
<p>
|
2012-11-14 02:02:40 +00:00
|
|
|
EnvayaSMS typically only needs to be installed on one Android phone.
|
2011-09-23 00:25:32 +00:00
|
|
|
Suppose that you have installed EnvayaSMS on an Android phone in Dar es Salaam,
|
2011-09-19 06:00:30 +00:00
|
|
|
Tanzania, with phone number <code>+255987654321</code> (local number <code>0987654321</code>),
|
2011-09-23 23:14:39 +00:00
|
|
|
with GSM service from Vodacom.
|
2011-09-19 06:00:30 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-09-23 23:14:39 +00:00
|
|
|
Suppose also that your web server is <code>example.com</code>, and its servers are located in a datacenter in London.
|
2011-09-19 06:00:30 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
In Dar es Salaam, you would put the Android phone in an office with internet access and a Wi-Fi router,
|
2011-09-23 00:25:32 +00:00
|
|
|
and connect the phone to the Wi-Fi network. (Wi-Fi is not strictly necessary, since EnvayaSMS will also
|
2011-09-27 22:47:02 +00:00
|
|
|
work over the phone's mobile data connection, but Wi-Fi is likely to be faster, cheaper, and more reliable.)
|
2011-09-19 06:00:30 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Then your network would look like this:
|
2011-09-23 23:14:39 +00:00
|
|
|
<br />
|
2011-10-01 22:47:55 +00:00
|
|
|
<img src='/media/topology.png' width='650' height='262' />
|
2011-09-19 06:00:30 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-09-23 00:25:32 +00:00
|
|
|
Typically your organization will need only one phone running EnvayaSMS in a
|
2011-09-19 06:00:30 +00:00
|
|
|
particular country. However, it is possible to use multiple phones to load-balance requests
|
|
|
|
for higher throughput, to offer different user services, or to serve different mobile networks.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>Receiving incoming SMS and sending replies</h3>
|
|
|
|
|
2011-09-23 00:25:32 +00:00
|
|
|
<p>Here is an example of how EnvayaSMS would forward an incoming SMS to your server, and send a SMS back as a reply:</p>
|
2011-09-19 06:00:30 +00:00
|
|
|
|
|
|
|
<ol>
|
|
|
|
<li>User in Tanzania, using Nokia phone with phone number <code>0555551234</code>, sends SMS message to <code>0987654321</code></li>
|
|
|
|
<li>Your Android phone at <code>0987654321</code> receives SMS</li>
|
2011-09-23 00:25:32 +00:00
|
|
|
<li>EnvayaSMS sends SMS to <code>example.com</code> via HTTP</li>
|
2011-09-19 06:00:30 +00:00
|
|
|
<li>example.com processes the message and returns SMS reply in HTTP response</li>
|
2011-09-23 00:25:32 +00:00
|
|
|
<li>EnvayaSMS forwards SMS reply to <code>0555551234</code></li>
|
2011-09-19 06:00:30 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Since users generally are charged only for outgoing messages in Tanzania, the user would be charged
|
|
|
|
for sending one local SMS message, and your phone would also be charged for sending one local SMS message.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>Sending outgoing SMS notifications</h3>
|
|
|
|
|
2011-09-23 00:25:32 +00:00
|
|
|
<p>EnvayaSMS uses a different process to send SMS notifications that were not in response to an incoming message.</p>
|
2011-09-19 06:00:30 +00:00
|
|
|
|
2011-09-23 00:25:32 +00:00
|
|
|
<p>Assume now that <code>example.com</code> has multiple phones using EnvayaSMS in different countries,
|
2011-09-19 06:00:30 +00:00
|
|
|
and it is configured to send all messages to phone numbers with a <code>255</code> prefix (Tanzania's country code)
|
|
|
|
via the cell phone with number <code>+255987654321</code>.
|
|
|
|
|
|
|
|
<ol>
|
|
|
|
<li><code>example.com</code> wants to send an SMS message to <code>+255555551234</code></li>
|
|
|
|
<li><code>example.com</code> identifies that the recipient number has a <code>255</code>
|
|
|
|
prefix, and chooses sender phone number <code>+255987654321</code></li>
|
2011-10-02 02:00:24 +00:00
|
|
|
<li>The next time EnvayaSMS polls <code>example.com</code> for outgoing messages
|
2011-09-19 06:00:30 +00:00
|
|
|
for its phone number <code>+255987654321</code>, the server responds with
|
|
|
|
the message to send
|
|
|
|
</li>
|
2011-09-23 00:25:32 +00:00
|
|
|
<li>EnvayaSMS forwards the message to <code>0555551234</code></li>
|
|
|
|
<li>EnvayaSMS notifies <code>example.com</code> via HTTP that message was sent</li>
|
2011-09-19 06:00:30 +00:00
|
|
|
<li><code>example.com</code> removes the SMS message from its queue of outgoing messages.</li>
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
In these examples, even though SMS messages are being communicated between Dar es Salaam and London,
|
|
|
|
all SMS messages are sent domestically and are not charged as international SMS messages.
|
|
|
|
</p>
|
2011-09-19 03:45:09 +00:00
|
|
|
|
|
|
|
<div class="footer">
|
2011-09-23 00:25:32 +00:00
|
|
|
get the source code on GitHub : <a href="http://github.com/youngj/EnvayaSMS">youngj/EnvayaSMS</a>
|
2011-09-19 03:45:09 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2011-09-22 06:10:31 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var _gaq = _gaq || [];
|
2011-09-23 00:29:40 +00:00
|
|
|
_gaq.push(['_setAccount', 'UA-25868450-2']);
|
2011-09-22 06:10:31 +00:00
|
|
|
_gaq.push(['_trackPageview']);
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
|
|
})();
|
|
|
|
|
|
|
|
</script>
|
2011-09-19 03:45:09 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|