SMSSend is a program used to send SMS messages over the network via command line in linux. It is licensed unto the GNU General License.

I recently aimed to integrate this into Zabbix remote monitoring software. I had a hell of a time finding the software because its original page, here, has some sort of apache configuration error and does not load. Thankfully, I found the source files needed on a mirror. For the sake of anyone else looking for this file, you can download it locally here:

https://systembash.com/source/smssend-3.5.tar.gz
https://systembash.com/source/skyutils-2.9.tar.gz

You will need to install that particular version of skyutils first, before compiling smssend.

Also, since the site is down, you can not grab the versions of the .sms that you need for certain providers. However, I used google cache to grab the one for clickatell and re-formatted the file to look right. Since it was not so obvious how to do this, I will paste clickatell.sms for you:

## SkySMS provider file - http://www.clickatell.com
## # Version 0.1
# by Steve Herrell
# Error codes :
# 1 -> General failure

NbParams 6
%Login : Your Login
%Password Hidden : Your Password
%ApiID Hidden : Your API ID
%Sender : The API Name
%Tel : Where it's going to
%Message Size=160 Convert : Your message

GetURL https://api.clickatell.com/http/sendmsg
Params from=\%Sender%&user=\%Login%&password=\%Password%&api_id=\%ApiID%&to=\%Tel%&text=\%Message%
Search ID:
PrintMsg message sent
Else
ErrorMsg 1 error sending message
GO

You then use this file (you can place in /usr/local/share/smssend/ which is the default location of the rest of the scripts) and then call this file using this syntax:

smssend clickatell.sms "Hello World"

If all goes well, you now have a text message that says “hello world”.

Note: Some of you, like me, may think that using your phones email address is a better (free) way to send alerts. You may be right. But my opinion is that adding e-mail into the mix adds an extra layer of uncertainty in actually receiving the message. I have had messages delayed for days that were sent via e-mail. Sending via SMS should be a more direct way to receive your urgent alerts.

Note 2: Don’t forget that you need to have internet connectivity to send SMS messages this way. The only way to have your server send an SMS message while being offline is by having a GSM Modem attached to it. Zabbix can talk directly with this modem to send your page.

6 comments
  1. Hi,

    There is a slight bug in with the above clickatell.sms script.

    The line:

    Params from=%Sender%&user=%Login%&password=%Password%&api_id=%ApiID%&to=%Tel%&text=%Message%

    needs to be

    Params from=%Sender%&user=%Login%&password=%Password%&api_id=%ApiID%&to=%Tel%&text=%Message%

    Else it doesn’t catch the correct var’s from the CLI.

    (smssend Version 3.4)

  2. Hi,

    There is a slight bug in with the above clickatell.sms script.

    The line:

    Params from=%Sender%&user=%Login%&password=%Password%&api_id=%ApiID%&to=%Tel%&text=%Message%

    needs to be

    Params from=\%Sender%&user=\%Login%&password=\%Password%&api_id=\%ApiID%&to=\%Tel%&text=\%Message%

    Else it doesn’t catch the correct var’s from the CLI.

    (smssend Version 3.4)

  3. Alex:

    This script seems to work with me. I believe depending on your system type you might need to escape the variables – but on CentOS it works like a charm how it is set up. Note to anyone trying this, if you have problems try using it with the escape slashes.

  4. Alex:

    This script seems to work with me. I believe depending on your system type you might need to escape the variables – but on CentOS it works like a charm how it is set up. Note to anyone trying this, if you have problems try using it with the escape slashes.

  5. Hi, I’m trying to get this to work; I’m not a coder, and do not understand how to use this. Should I enter the %values in the clickatell.sms file, or pass them as command line arguments. I’ve tried both without success so far. E.g. changing the NbParams6 values, aswell as trying to run it like “smssend login password API.. “. I would be grateful if anyone could explain a bit more in detail howto.

  6. Hi, I’m trying to get this to work; I’m not a coder, and do not understand how to use this. Should I enter the %values in the clickatell.sms file, or pass them as command line arguments. I’ve tried both without success so far. E.g. changing the NbParams6 values, aswell as trying to run it like “smssend login password API.. “. I would be grateful if anyone could explain a bit more in detail howto.

Comments are closed.

You May Also Like

Ubuntu Server in Place Network Upgrade From 8.10 to 9.04

It is easy to do an in-place upgrade of Ubuntu Server from…

Add IP to whitelist for Postini Mail Filtering

I could not find any way to see how you could add…

A phpBB 3 iPhone Style Theme With Option to Disable

A forum that I am an adminstrator for has been clamoring for an iPhone theme (style) for a long time now. In the past, I hadn’t seen any usable iPhone template for phpBB3, until now. View this entire post to view my modifications to a theme switcher for mobile devices, so that the end user can disable a mobile theme for their login if they should choose to do so.

Secure Drupal Admin Login Page

Drupal’s administration login area is not secure by default. Usually there is…