PowerMeMobile / smppload

SMPP Command Line Client
15 stars 4 forks source link

Build Status

Prerequisites

In order to compile smppload you need to have Erlang/OTP 19+ and GNU Make installed.

Compilation

$ git clone https://github.com/ten0s/smppload.git
$ cd smppload
$ make

Tests

$ make test

Usage

In order to run the examples below you need to have smppsink.

Now it's possible to launch smppload as an escript, which is faster, but Erlang needs to be installed:

$ _build/default/bin/smppload

or as a release, which is slower, but has greater portability:

$ _build/default/rel/smppload/smppload

Add appropriate path to smppload to your PATH.

$ smppload
SMPP Loader from Power Alley Gateway Suite (2.5.0)
Usage: /home/ten0s/bin/smppload [-h] [-H [<host>]] [-P [<port>]]
                                [-B [<bind_type>]] [-i [<system_id>]]
                                [-p [<password>]] [-t [<system_type>]]
                                [-r [<rps>]] [-s [<source>]]
                                [-d <destination>] [-b <body>]
                                [-l [<length>]] [-c [<count>]]
                                [-D [<delivery>]] [-E []]
                                [-C [<data_coding>]] [-f <file>]
                                [-v [<verbosity>]] [-T [<thread_count>]]
                                [--bind_timeout [<bind_timeout>]]
                                [--unbind_timeout [<unbind_timeout>]]
                                [--submit_timeout [<submit_timeout>]]
                                [--delivery_timeout [<delivery_timeout>]] [--ssl]
                                [--service_type [<service_type>]]
                                [--body_format [<body_format>]]

  -h, --help          Show this message
  -H, --host          SMSC server host name or IP address [default:
                      127.0.0.1]
  -P, --port          SMSC server port [default: 2775]
  -B, --bind_type     SMSC bind type: TX | TRX | RX [default: TRX]
  -i, --system_id     SMSC system_id [default: user]
  -p, --password      SMSC password [default: password]
  -t, --system_type   SMSC system_type [default: ]
  -r, --rps           Number of requests per second. Ignored for RX
                      [default: 1000]
  -s, --source        SMS source address Addr[:Len=0][,Ton=1,Npi=1].
                      Ignored for RX [default: ]
  -d, --destination   SMS destination address Addr[:Len=0][,Ton=1,Npi=1].
                      Ignored for RX
  -b, --body          SMS body, randomly generated if not set. Ignored for
                      RX
  -l, --length        Randomly generated body length. Ignored for RX
                      [default: 140]
  -c, --count         Count of SMS to send. Ignored for RX [default: 1]
  -D, --delivery      Delivery receipt. Ignored for RX [default: 0]
  -E, --esm_class     ESM class. Ignored for RX [default: 0]
  -C, --data_coding   Data coding. Ignored for RX [default: 3]
  -f, --file          Send messages from file. Ignored for RX
  -v, --verbosity     Verbosity level [default: 1]
  -T, --thread_count  Thread/process count. Ignored for RX [default: 10]
  --bind_timeout      Bind timeout, ms [default: 10000]
  --unbind_timeout    Unbind timeout, ms [default: 5000]
  --submit_timeout    Submit timeout, ms. Ignored for RX [default: 20000]
  --delivery_timeout  Delivery timeout, ms [default: TX=80000, RX=infinity]
  --ssl               Use ssl/tls connection
  --service_type      Service type [default: ]
  --body_format       Body format: default | hexdump. Ignored for RX
                      [default: default]
$ smppload -s375296660002 -d375293332211 -b050003010201abcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyzabcdefghijklmopqrstuvwxyzabcdefghi --esm_class 64
$ smppload -s375296660002 -d375293332211 -b050003010202jklmopqrstuvwxyzabcdefghij --esm_class 64
$ smppload -s375296660002 -d375293332211 -b00a9 --body_format hexdump --data_coding 0 -vv
$ smppload -Btx -d375296543210 -bHello -D
INFO:  Connected to 127.0.0.1:2775
INFO:  Bound to Funnel
INFO:  Stats:
INFO:     Send success:     1
INFO:     Send fail:        0
INFO:     Delivery success: 0
INFO:     Delivery fail:    0
INFO:     Incomings:        0
INFO:     Errors:           0
INFO:     Avg Rps:          28 mps
INFO:  Unbound

Versioning

smppload is versioned according to semantic versioning.

Known issues and limitations