You are on page 1of 3

The purpose of SMS enabling our meta-search engine is to allow access to remote areas which do not have internet

access but have GSM access. Essentially, SMS services work by allowing a user to send a short message to a unique number. An application receives this message, checks it and replies with another message. DEVELOPING SMS APPLICATIONS (the easiest of all applications!!!!). Introduction The GSM network has a node called SMSC. This node understands SMPP protocol v3.4 or v5 specification. Now, there was need to communicate to these nodes using IP, HTTP means, since today our application programs understand these easily than having to re-implement SMPP messaging libraries everywhere. Then came the SMS GATEWAYs. An SMS GATEWAY hides the SMPP over IP protocol. For the SMS GATEWAY to speak with the SMSC, It needs to first decide how it binds with the SMSC. It can either bind in receiver mode, transmitter mode or TX/RX (dual) mode. In receiver mode, the SMS GATEWAY can only receive SMSs but cannot send. In transmitter mode, it can only send but cannot receive. E.t.c. This is how it works: the SMSC knows where every customer (SIM) is and it is the one which receives all SMSs when people send them (it is the SMS Switch or router---- whatever you may understand). Now, the SMS GATEWAY attaches on the SMSC and is assigned a number say, 6868. Now when users send an SMS to 6868, the SMSC forwards it to the SMS GATEWAY. The SMS GATEWAY is a program/application/software which can run anywhere. The SMS GATEWAY is normally running somewhere even far from the actual SMSC but they maintain a connection (TCP/IP hence HTTP access). This means that the SMS GATEWAY can be in your bed room, in your sitting room, under your bed, in your office premises e.t.c as long as it is connected to the INTERNET. Now, when you go to ZAIN (sorry AIRTEL? or to WARID or to MTN) and you tell them please i want to have SMS access to people. You will pay, after that; you are assigned a number e.g. 6868. They tell you that your customers must send SMSs to that number, and you will also be able to send to them. Now, you realise that for all these to work an SMS GATEWAY is assigned a PORT on the SMSC. When it is connecting, it sends a username, a password, connects to a URL and a PORT using TCP/IP, once the connection is made, it starts sending PDUs (commands). Usually for these telecom companies, you will be required to pay in order to get an account on their SMSC. This account enables you to send/receive SMSs to anyone anywhere as long as he has a SIM CARD for that service provider. Business Picture Now When the SMS GATEWAY receives an SMS, the SMS comes along with the telephone number of the sender, date and time e.t.c. The SMS reaches in human readable format. You have seen on TV presenters telling guys that: TYPE NBS, then YOUR MESSAGE and send to 6868. This happens when there is one company e.g. SMS media with an SMS GATEWAY and it has paid all telecom companies to give it the same unique number. Now because UBC (UTV), NBS, WBS, radio stations e.t.c all go to SMS Media, what it does it now tells them that each of you will tell their customers to distinguish the SMS by typing something at the beginning of the Message. Say, for NBS they say: type NBS leave a space then your message

and send to 6868. For UBC, they say: type UBC leave a space then your message and send to 6868. Now it means that the SMS MEDIA guys write a small python or java or Perl or PHP script which then PARSES the SMS at its first Word. If it finds NBS, it will know that this is a message for NBS. Question is now, how does this SMS move from SMS media to NBS studios? Do they now send it normally to a mobile number? (This would be foolish; i mean why didnt they tell the senders to send to the number directly?). Now, there are mechanisms in which the SMS GATEWAYS communicate with other native applications (Desktop applications) and Web applications (via Web servers). After the SMS GATEWAY
Web interface/ Page/ application or desktop application capable of Web2.0, HTTP 1.1, Comet, and Http long polling, Web Push e.t.c

Application: PHP under MySQL or Erlang/OTP under Mnesia, YOUR WEB SERVER e.g. APACHE or YAWS

SMS GATEWAY e.g. NowSMS, OSERL, Kannel, OZEKI e.t.c SMSC

Fig: The entire SMS application Stack As you configure the SMS GATEWAY, you give it the URL to connect to and you give it the HTTP GET parameters to use as it connects. An example will illustrate this to you below: If i have my web server running, say YAWS. I have a page say: receive_sms.html. I am on the LAN and my PC or LAPTOP has a static IP Address say: 192.168.0.5. I have it listening not on port 80 but on port 8080, this makes the entire URI to be: http://192.168.0.5:8080/receive_sms.html For this link to be useful, it needs get parameters. The keywords would be number and message

http://192.168.0.5:8080/receive_sms.html?number=0774115170&message=i love you honey Now, the NowSMS gateway has an in built HTTP 1.1 Client and Server. In laymans language, the SMS GATEWAY has inside it, a Web client (look at it like a browser) and a Web Server. It can speak HTTP and listen (interpret) HTTP. Now, because of this, the GATEWAY can be told that after it receives the SMS from the SMSC, it uses its Web Client (HTTP client) to make a hit on our Web server running somewhere on the LAN. Remember that the Web server can be running on local host (127.0.0.1). It makes a GET request, passing along the message and the number of the sender. The Web server contacts your application say: PHP running under MySQL, Erlang/OTP running under Mnesia, Nitrogen Web framework running under Mnesia or Ets Tables or Dets tables e.t.c. Your PHP would extract these parameters by: $number = $_GET[number], $message = $_GET[message] (Am not so good at PHP so if the syntax has a problem i know you understand what i am saying. You do not have to use this ugly language!) The PHP generates the reply from a database whatever and then it has to contact the Web server of the SMS GATEWAY too. Which means just as the SMS GATEWAY has a web client, your application must be able to speak HTTP to a Web server. The reply is sent from your application using HTTP as well by hitting a configured link onto which your SMS GATEWAYs Web Server is listening on, passing the reply using GET requests. More on this i can explain when i am physically closer to you. Expensive or Cheaper approach The service provider asks for a minimum of 4 million per Year to allow access to their SMSC from you SMS GATEWAY. I know u guys (or your parents, or your university) have money but this would be costly. What can be done to by pass this would be the use of the internet Modem. Look at the Documentation of your favourite SMS Gateway. The Now SMS GATEWAY can speak with the (WARID or ORANGE) modem directly and cause it to send an SMS or receive SMS on behalf of the GATEWAY. As soon as the modem gets any SMS it forwards it to the SMS GATEWAY and likewise the SMS GATEWAY sends SMS through the Modem. Kannel and NowSMS can speak with a modem but the Erlang/OTP (OSERL) has not yet gotten such a plug-in. For more Information: Author: Muzaaya Joshua Contact: +256774115170, joshmuza@gmail.com

You might also like