CVS edit link for joodas

A few months ago I took part in an SMS-related website project, which did not materialize in the end. As a result I have been left with my working implementation of MXtelecom's SMS gateway HTTP interface in form of a Drupal module (named mxtel_sms).

I would like to contribute my work back to the community and create a project page.

CommentFileSizeAuthor
#1 mxtel_sms.tar_.gz5.5 KBjoodas

Comments

joodas’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new5.5 KB

Uploading the intended contribution as per request email.

joodas’s picture

Technical details about what exactly the module does can be found at MXtelecom's website: http://www.mxtelecom.com/uk/tech/sms/http

The module is merely an implementation of the HTTP interface protocol described there, respective configuration admin pages, plus the underlying DB structure to store data about sent and received messages and delivery reports.

joodas’s picture

This seems to be taking much longer than I expected. Just to avoid more delays, here's a detailed description of what the module does.

A couple of quick facts about the module:

* There's no existing implementation of MX Telecom SMS gateway HTTP interface around.
* Apart from the admin pages the module itself does not output any HTML whatsoever.
* 3rd party modules can use mxtel_sms' module functionality to send SMS messages via MX Telecom SMS gateway.
* The module provides API for 3rd party modules to hook into individual steps of SMS sending (pre-send, post-send) as well as to be notified on SMS message or delivery report reception.
* The module is licensed under GPL2. MX Telecom have not been involved in the module development. They have been contacted, though, and acknowledged the module existence.

Overview

mxtel_sms implements the most common method of connecting to the MX Telecom SMS Gateway through the use of HTTP GET requests.

Features

* Sending SMS text messages
* Receiving SMS text messages
* Receiving realtime SMS text message delivery reports

Requirements

No 3rd party modules are required for mxtel_sms to work. For extra security, module allows to submit a whitelist of IP addresses from which SMS receive and report requests for your account will be accepted.

Sending SMS

The MX Telecom SMS Gateway allows SMS messages to be sent using HTTP GET. Several parameters are common to all message types, and should be included in the HTTP request regardless of the specific method being invoked. Details of these parameters are: user, pass, smsfrom, smsto, subaccount, report, vp, mxbillingsingleshot.

The following example shows the common structure of all HTTP requests understood by the MX Telecom SMS Gateway:
http://sms.mxtelecom.com/SMSSend?user=myusername&pass=mypassword&smsfrom......

mxtel_sms stores SMS send request data in database, takes configuration settings and constructs a URL which it eventually requests using GET method.

Parsing responses to requests

The SMS Gateway acknowledges all requests it receives with an HTTP response. The status code for the response will indicate whether the request was successful, or if not, why the request failed. For a successful request, the response body includes an SMS ID, which is a positive 64 bit integer used to uniquely identify an SMS message as it passes through the SMS Gateway.

mxtel_sms module parses the response to request and stores information about the result in database.

Receiving SMS messages using HTTP

The MX Telecom SMS Server will push received SMS messages by making an HTTP GET to the provided URL to indicate the receipt of an SMS message.

On receipt of an SMS we will send an HTTP GET request to your server, using the parameters: smsfrom, smsto, smsdate, network, smsid, smsmsg, bits.

mxtel_sms module parses the SMS delivery request and stores individual fields in database. It then responds with an HTTP 200 response with a non-empty body.

Security considerations

To ensure the authenticity of the HTTP requests module only accept requests from the MX Telecom IP address, which is configurable.

Delivery report receiving interface using HTTP

If messages are sent with delivery reports enabled (and the networks concerned support reports) then delivery reports will be added to the online billing system automatically.

The paramaters are similar to the HTTP SMS Receiving interface; however certain additional fields are available, and some are used differently: smsfrom, smsdate, smsmsg, reason, smsto, shortcode.

The smsmsg field will be of the format:

REPORT SMS-ID STATUS

mxtel_sms responds with an HTTP 200 response with a non-empty body.

Security considerations

Again, to ensure the authenticity of the HTTP requests module only accept requests from the MX Telecom IP address, which is configurable.

avpaderno’s picture

Issue tags: +Module review

Hello, and thanks for applying for a CVS account.
Would you be able to compare the code with other modules to send SMS?

joodas’s picture

I didn't really have a chance to look at all of them, apart from trying to find one that would already have support for MX Telecom SMS gateway. Which none of them did.

There's a couple of framework modules, though, on top of which I was considering to build my module. The most promising of them is SMS Framework. Eventually I decided to go for a stand-alone module, as there would have been no easy way to get the MX Telecom's message delivery report working or to send/receive any message types except for the plain SMS. I'd like to have a working implementation of the full MX Telecom SMS gateway HTTP protocol, including the model specific messages (config, logo, ringtone) and MMS.

joodas’s picture

Er, are you guys waiting for me to forget about this? I must say, you've got some pretty cool procedures in place to demotivate anyone even considering contributing their time and effort...

joodas’s picture

Status: Needs review » Closed (won't fix)

Nah, guys! I'm not used to be treated like this. Anyone interested, you'll find the MX Telecom SMS Gateway HTTP Interface implementation for Drupal 6 here: http://jan.tomka.name/project/mx-telecom-sms-gateway-drupal

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes