SMS Text from the IBM i.

[adrotate group=”3,7,8″]
I had a call recently about sending SMS text messages from the IBM i. One of our partners provides a solution for this but it requires the purchase of a GSM modem and service contract with a cell provider to use. One of the things I have been looking at is how to build in some kind of SMS status messaging into our HA4i product so the clients request got me thinking.

SMS text are ideal for status messaging because they allow simple messages to be sent to mobile devices, this means not only our favorite smart phones but a lot of other phones that support SMS but not email and the like. HA4i has had the emailer built in for many years, but SMS was one area we just kept ignoring until now. As I have said the clients request peaked my interest again so I decided to take a look at what is available out there to allow me to build in a simple SMS status service.

I could have built a program to talk with a GSM modem which is probably fairly easy to accomplish, another option would be to look at the SMS text providers out there that supply a web interface to send SMS text to users at a very reasonable cost (about 2cents) using https strings over an SSL connection. But I finally ended up looking at doing it via the providers Email to SMS service. The nice thing about this method is its free to send the message, the receiver may attract costs if they do not have a text messaging service on their phone.

First thing we did was look for a list of the providers and their gateway address, on top of this we also found out that the cell number sometimes needs a prefix to work on certain providers networks so we had to take into consideration and format of the address on the email we send. Once we had all of this information we could then start to build the solution. Our first pass was going to be very simple, we want to be able to take a message input from a user, format it to the desired string and send out via the SMTP connection we use today.

As always the biggest time consumer is building the interfaces to the actual programs that do the work, we also had to build interfaces to allow access to the configuration data and be able to control the functions. The next step was to determine how the product would pick up the message requests and send them out to the SMTP server, as we have been using Data Queues for years in all of our products we decided to build a program that would accept requests via a data queue and send them out to the SMTP server. This program would be submitted to a specific Subsystem and Job Queue and would constantly look for a request from the data queue to end or send the message.

The first couple of send attempts failed due to programming errors (we forgot to NULL terminate some strings) but after that everything seemed to work out just fine. We have managed to send test messages to our Bell phones and Rogers cell phones without any problems (well we did have a problem with the Rogers phone because it had to be registered to receive the messages).

So if you are interested we now have a working IBM i to SMS messaging product, its not got all the bells and whistles of the major providers and we can only do one way text messages, but the cost of doing so for the sender is very attractive.

Let us know if you want to give it a spin, we will be packaging it up and posting it to the websites in the coming weeks.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.