Configuration
Configuration for SMPP Router is stored in the smpprouter.conf
file on the file system of the SMPP Router host. It is split into three mandatory section: “base”, “esme” and “targetsets”. Additional sections may be present based on other features (e.g. “routes-mt”, “routes-mo”, “cdr”, etc).
The command-line and API calls can be used to update configuration. The “base” section can only be changed by editing the configuration file directly and restarting SMPP Router. All other changes can be made without a restart being required (unless otherwise indicated).
Purpose
Messages from ESMEs are routed to target sets, and subsequently the targets that are members of those sets, based on configuration.
When messages are routed to a target set, the messages are load-balanced over the targets in the target set based on the weights of each target.
Configuration file sections
The configuration file has the following sections:
File format
The configuration file is in JSON format:
{
"base": {
"_product": "SMPPRouter",
"auth.client_id": "",
"auth.client_secret": "",
"default_binding_enabled": true,
"dlr.default_system_id": "",
"dlr.disable_msgid_tracking": false,
"ipwhitelistonly": false,
"smpp.max_connections_per_ip": 250,
"smpp.port": 2775
},
"cdr": {
"mode": "collate",
"file_path": "cdrs.csv",
"batch_size": 1000,
"batch_flush_interval": 30,
"cleanup_interval": 24
},
"esme": [
{
"systemid": "esme001",
"sharedtargetsetid": "0001",
"tpslimit": 50,
"password_hash": "$2y$05$cRW9RL/Er3M5wP4sJKz1wOyX4hqH.vrkzTXV2eay2UMrbd.0WmlFO"
},
{
"systemid": "esme002",
"sharedtargetsetid": "0001",
"tpslimit": 20,
"binding_enabled": false,
"submits_enabled": false,
"password": "NUO0t4pR",
"allowedip": ["192.168.100.101","192.168.200.104"]
},
{
"systemid": "esme003",
"sharedtargetsetid": "0002",
"tpslimit": 20,
"inboundmo": ["^4477"]
}
],
"routes-mo": [],
"routes-mt": [],
"targetsets": [
{
"id": "0001",
"name": "TS001",
"submits_enabled": true,
"targets": [
{
"name": "smsc1",
"host": "192.168.196.138",
"port": 2775,
"bindqty": 5,
"systemid": "993607",
"password": "3cb44e",
"systemtype": "",
"weight": 1,
"admindown": false
},
{"name":"smsc2","host":"192.168.196.138","port":2775,"bindqty":5,"systemid":"885282","password":"6af196","systemtype":"","weight":1,"admindown":false},
{"name":"smsc3","host":"192.168.196.138","port":2775,"bindqty":2,"systemid":"792747","password":"df03a0","systemtype":"","weight":0,"admindown":false},
{"name":"smsc4","host":"192.168.196.138","port":2775,"bindqty":10,"systemid":"186650","password":"0eb11e","systemtype":"","weight":1,"admindown":true}
]
},
{
"id": "0002",
"name": "TS002",
"submits_enabled": true,
"targets": [
{"name":"smsc3","host":"192.168.196.138","port":2775,"bindqty":2,"systemid":"792747","password":"df03a0","systemtype":"","weight":4,"admindown":false},
{"name":"smsc4","host":"192.168.196.138","port":2775,"bindqty":2,"systemid":"186650","password":"0eb11e","systemtype":"","weight":1,"admindown":false}
]
}
]
}
If the configuration file contains invalid JSON, then the configuration will not be loaded. When reloading configuration, existing configuration will continue to be used if the new configuration cannot be loaded.
Base section
“base
"
This optional section of the configuration defines the general configuration of the SMPP Router.
The entries in the base
section are:
Field | Description | Example |
---|---|---|
| API and GUI client ID optional Default: empty - no access | |
| API and GUI client secret optional | |
| Is binding permitted for an ESME where not specified in ESME’s configuration optional Default: |
|
| Write MT and MO messages to audit.log. Use for troubleshooting. Not for production use. optional Default: |
|
| Log level for application.log Choice: optional Default: |
|
| ESME system ID to where DLRs should be routed when unable to identify ESME. optional Default: |
|
| Disables the tracking of message IDs returned by targets. Used when DLRs may not be returned to an SMPP Router. optional Default: |
|
| Permit only connections from IP addresses that are in the IP whitelist. optional Default: |
|
| Port number for SMPP Router listening for SMPP connections from customers optional Default: |
|
| Maximum number of connections per client IP optional Default: |
|
Target Sets section
“targetsets
"
This mandatory section of the configuration defines the upstream platforms that the SMPP Router connects to. These targets are referenced by their “name”.
Each entry in “targetsets
" contains a "targets
" section that defines the upstream platforms.
Field | Description | Example |
---|---|---|
| Identifier of target set String of up to 64 characters and comprised of a-z, A-Z, 0-9, -, . and _. |
|
| Name of target set String of up to 64 characters and comprised of a-z, A-Z, 0-9, -, . and _. |
|
| Controls submits to this target set optional Default: |
|
| Target SMSCs forming this target set. A target, represented by a set of SMPP credentials, must only be defined once in the configuration. See below. |
JSON
|
Each entry in the targets
section contains:
Field | Description | Example |
---|---|---|
| Identifier of target String of up to 64 characters and comprised of a-z, A-Z, 0-9, -, . and _. mandatory |
|
| IP or hostname mandatory |
|
| TCP port number optional Default: |
|
| Number of SMPP binds to this target Maximum of 256 for TRX binds (or 128 for TX+RX binds). optional Default: |
|
| Use TX+RX binds instead of TRX or RX optional Default: |
|
| Use RX binds instead of TRX or TX+RX optional Default: |
|
| Maximum allowed number of SubmitSM per second (TPS) for each bind Target will be ignored if TPS limit reached. If no targets remain, SMPP throttle error will be returned to ESME. optional Default: |
(5000 SubmitSM per second) |
| System ID mandatory |
|
| Password mandatory |
|
| System type optional Default: null (empty) | |
| When load balancing traffic, weighting is used to determine which target to send traffic to. For example, if ESME’s traffic is load balanced over two targets, both with an equal number of binds, target A with a weight of 2 will receive 2/5 (40%) of the traffic, while target B with a weight of 3 will receive 3/5 (60%). Numeric value of 0 or higher. optional Default: |
|
| Bind UP/DOWN. optional Default (bind UP): |
|
| ||
|
routes-mt section
“routes-mt
"
This optional section of the configuration defines the global routing of messages submitted by customers connecting to the SMPP Router. Entries in this section specify criteria that if matched will result in MT SMS being routed to the specified target set.
See Routing section for further details.