Tutorial: Managing targets
Managing Targets and Target Sets in SMPP Router Using smpproutercli
This tutorial will guide you through the process of configuring targets and target sets in SMPP Router using the command-line interface tool smpproutercli
. A target represents a connection from SMPP Router to a mobile network operator, SMS gateway, hub or provider.
In addition to using
smpproutercli
, configuration can also be performed by editing thesmpprouter.conf
file directly or via HTTP API calls to SMPP Router’s management endpoint.
Prerequisites
Ensure smpproutercli
is installed and accessible in your environment. You can verify this by running:
smpproutercli --help
Step 1: Adding a New Target Set
We begin by creating a target set into which we will later add targets.
Command:
smpproutercli add-targetset id=ts001 name=TS001 submits_enabled=true
id=ts001
: The identifier for the target set. This will be used to identify the target set.name=TS001
: The name for the target set. This is a friendly name for the target set.submits_enabled=true
: Controls submits to this target set. Setting to true indicates that messages can be submitted to this target set.
Step 2: Viewing Target Sets
To list all currently configured target sets:
smpproutercli list-targetsets
If run at this point in the tutorial, the following output will be seen:

This shows a single target set “ts001”.
Step 3: Add a Target to a Target Set
We now need to add a target to the target set. Multiple targets can be added to a target, but we will only add one for this tutorial.
Command:
smpproutercli add-target ts001 name=smsc1 host=smscsim.melroselabs.com port=2775 bindqty=5 systemid=630530 password=16bf2a
name
: The name of the target. This will be used to identify the target.host
: The hostname or IP address of the target.port
: The port number for the target.bindqty
: The number of TRX, TX+RX or RX binds to the target.systemid
: The system ID for the account connecting to the target.password
: The password for the account connecting to the target.
Step 4: View Targets in a Target Set
To list all currently configured targets in a target set:
smpproutercli list-targets ts001
If run at this point in the tutorial, the following output will be seen:

This shows a single target “smsc1” in target set “ts001”.
Step 4: View Status of Targets
To show the current status of SMPP Router and its connections to targets:
smpproutercli status
If run at this point in the tutorial, the following output will be seen:

This shows 5 x TRX binds in the SMPP bound state to target “smsc1” which is part of target set “ts001”.
Step 5: Modify the Target
Change bind quantity to target
We are going to reduce the number of binds from 5 to 4:
smpproutercli mod-target ts001 smsc1 bindqty=4
Running smpproutercli status
command again will now show:

This shows 4 x TRX binds - reduced from 5 x TRX binds.
Bring the connection to the target “administratively down”
The following command will bring down the connection to the target:
smpproutercli mod-target ts001 smsc1 admindown=true
Running the “status” command again will now show:

Messages will not be attempted via target connection that is down.
Step 6: View a Target
To view the configuration for target “smsc1”, we use the following command:
smpproutercli get-target ts001 smsc1
This will show the following:

Step 7: Delete a target
When we no longer require the target, we use the following command to delete the target from the target set and SMPP Router:
smpproutercli del-target ts001 smsc1
After this command has been run, running smpproutercli status
will show no targets:

Conclusion
Using smpproutercli
, administrators can easily manage target sets and targets in SMPP Router - from creation and modification to deletion. This command-line tool supports rapid creation of connections to mobile network operators, SMS gateways, hubs and providers.
For advanced configuration or automation, consider using the HTTP API or editing the configuration file directly.