SMS Gateway 4.4 - User's Guide

Table of ContentsPreviousNextIndex

5. Sending a message

To send a message you can use the sms command. Before you can send a message the SMS daemon, smsd, must be running.

Start smsd like this:

# smsd

When smsd is started it creates a lockfile called LCK.smsd in SMDIR. If you get a message that smsd is already running whent you try to start it although you know it is not, the lockfile has not been removed properly from the SMSDIR directory. Remove it manually. You can use the -debug option to get smsd print debug information on stdout.

The basic way of using the sms command is by supplying a recipient number and a message as argument:

# sms 0707123456 "Hello world!"

This will send the message "Hello world!" to the recipient 0707123456.

5.1 Scheduling a message

You can schedule a message for transmission at a specific time by using the -t option to sms.

# sms -t 22:00 0707123456 "Test message"

This will send the message 22:00 in the evening.

5.2 Specifying the sender a message

It is possible to set the sender, or originating address, on a per-message basis. Please not that all SMSCs (Nokia SMSC via CIMD2 for example) allow the application to specify the sender.

# sms -sender 46123456 0707123456 "Test message"

5.3 Sending a flash SMS

It is possible to send a so-called flash SMS by using the -msgclass parameter. A flash SMS is a SMS that will be immediately displayed in the phone displayed and that will not be stored on the SIM card..

# sms -msgclass 0 0707123456 "Test message"

A value of 0 means a flash SMS, the default value is 1 (message stored on SIM card).

5.4 Using a list of recipients

You can send the same message to many recipients by using the -l option with sms. The format of the file is one recipient number per row.

# sms -l reclist "Test message"

This will send the message to all recipients in the file reclist.

5.5 Sending raw messages

Sometimes a character translation will be done on messages before they are sent out. This can be avoided using the "-raw" parameter with faxsend. If specified the messages will be sent out exactly as supplied.

5.6 Using mappings

It is possible to apply a character mapping to an outgoing message. The mapping, which is a one-to-one mapping must be defined in the config file and then referenced using the -mapping command with faxsend.

Sample mapping (in config file) translating all `a' into `B'.

MAPPING atoB <
# Map ASCII 97 (`a') to ASCII 66 (`B')
97=66
>

Sample command line using the mapping:

# sms -mapping atoB 123456 "Test message with letter a"

Table of ContentsPreviousNextIndex