Appendix B. Using the fake SMS center
Options and messages are explained below, but as a quick example, a typical startup can go like this:
test/fakesmsc -i 0.1 -m 100 "100 200 text nop" "100 300 text echo this"
This tells fakesmsc to connect to bearerbox at localhost:10000 (default) and send a hundred messages
with an interval of 0.1 seconds. Each message is from number 100, and is either to number 200 with
message ’nop’ or to 300 with message ’echo this’.
Messages received from bearerbox are shown in the same format (described below).
Fake messages
Each message consists of four or five parts: sender number, receiver number, type, udh (if present) and
main message itself. Sender and receiver numbers do not mean anything except for log files and
number-based routing in Kannel.
The parts of a message are separated with spaces. As each message is taken as one argument, it must be
put in quotation marks.
Message type must be one of the following: "text", "data" and "udh". Here’s an example of using each:
test/fakesmsc -i 0.01 -v 1 -m 1000 "100 300 text echo this message"
test/fakesmsc -i 0.01 -m 1000 "100 300 data echo+these+chars%03%04%7f"
test/fakesmsc -m 1 "100 500 udh %0eudh+stuff+here main+message"
For "text", the rest of the argument is taken as the literal message. For "data", the next part must be the
urlcoded version of the message. Space is coded as ’+’. For "udh", the next 2 parts are the UDH and
main message. Both must be in urlcoded form.
If multiple messages are given, fakesmsc randomly chooses one for each sending.
Fakesmsc command line options
Fake SMS center can be started with various optional command line arguments.
Table B-1. Fakesmsc command line options
Switch
Value
Description
-H
host
Use host
host
instead of default
localhost
.
-p
port
Use port number
port
instead of
default 10000.
-i
interval
Use message interval
interval
(in
seconds, fractions accepted)
instead of default interval 1.0
seconds.
96