CLI Client

Introduction

Built on the same SMPP protocol stack as the JSLEE SMPP service, the SMPP client is a command line interface for sending SMS messages over SMPP. The client provides also a simple load testing system.

The SMPP CLI client is not distributed by default with the JSLEE system, but may be provided by N-Squared Support as required.

Execution

To execute:

java -jar /path/to/smpp_client.jar <options>

The available options are:

Field Type Required? Default Description
-s
--server
String No 127.0.0.1 The IP address or hostname of the SMPP server to connect to.
-p
--port
Integer No 4001 The TCP port to connect to the SMPP server on.
-u
--username
String No - The SMPP system_id to use when connecting to the SMPP server.
-P
--password
String No - The SMPP password to use when connecting to the SMPP server.
-f
--from
String No 12345 The SMPP source_addr to use when sending SMS.
-t
--to
String No 67890 The SMPP “To” address - i.e. the phone number the SMS is being sent to.
-m
--message
String No Hello world Ḽơᶉëᶆ ȋṕšᶙṁ The SMPP message to send.
-d
--datacoding
Integer No 8 The data coding value to send in SMPP messages created. Will be interpreted by the far end in order to decode the message text.
-e
--encoding
String No ucs2 The SMPP encoding scheme to use to encode the message (and decode any returned text).
-x
--xlarge
Flag No Not set If set, SMPP messages created will be much larger in size.
-l
--load
String No 0 If set to a value other than 0, this is the number of seconds to run for to find the maximum load. New messages will only be sent if the backlog is not full.
-b
--backlog
Integer No 1000 The maximum amount of outstanding messages allowable when running under load. Once reached, no new messages will be sent until responses are received.
-r
--receiver
Flag No Not set If set, the client will remain open after sending messages until all responses have been received.
-h
--help
Flag No Not set Show usage information and exit.

Logging

Like the JSLEE server process, the command line client responds to logback configuration files for logging. A simple logback configuration file for debugging output might be:

<configuration>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%highlight(%d{HH:mm:ss.SSS} [%-25thread] %-5level %-30logger{0} - %msg%n)</pattern>
        </encoder>
    </appender>

    <root level="DEBUG">
        <appender-ref ref="STDOUT" />
    </root>
</configuration>

Changing DEBUG to INFO will stop debugging messages from being printed. To pass the logback configuration file location through to the process, use the following syntax:

java -Dlogback.configurationFile=/path/to/logback.xml -jar smp_client.jar ...