Routing
MT SMS routing in SMPP Router is determined by a combination of an ESME’s assigned target set and optional routing rules defined using routes-mt
. For SMPP Router operating details, refer to the Operation section.
ESME target set
Each ESME can be assigned a shared target set using the sharedtargetsetid
field. If no routing rules exist, all MT SMS submitted by that ESME are routed and load-balanced across the targets defined in that target set. This behaviour applies regardless of the destination address.
Routing rules: routes-mt
Where MT SMS should be routed to particular targets based on destination address, you can define routing rules using routes-mt
. These rules may be declared globally (affecting all ESMEs) or within a specific ESME’s configuration (overriding global rules).
Global routes-mt (applies to all ESMEs)
{
"base": ...,
"esme": ...,
"routes-mt": [
{
"criteria": {
"match": "destination", "type": "country", "value": "44"
},
"targetset": "0001"
},
{
"criteria": {
"match": "destination", "type": "regex", "value": "^4917"
},
"targetset": "0003"
}
],
"targetsets": ...
}
ESME-specific routes-mt (applies only to that ESME)
{
"base": ...,
"esme": [
{
"systemid": "esme001",
"password": "xyz",
"sharedtargetsetid": "0001",
"routes-mt": [
{
"criteria": {
"match": "destination", "type": "ndc", "value": "447700"
},
"targetset": "0001"
},
{
"criteria": {
"match": "destination", "type": "country", "value": "33"
},
"targetset": "0002"
}
]
}
],
"routes-mt": ...,
"targetsets": ...
}
An ESME’s sharedtargetsetid
entry will be where MT SMS are routed to unless there are routes-mt
rules with criteria that are true. The global routes-mt
will first be processed to determine a target set. The ESME’s routes-mt
will then be processed, even if a target set was found in the global routes-mt
.
How routing is evaluated
The following order of precedence is used for selecting a target set:
ESME
routes-mt
rulesGlobal
routes-mt
rulesESME
sharedtargetsetid
definition (default)
Anatomy of routes-mt rule
Each entry in routes-mt
has a criteria object and a target set. The criteria object contains the field on which the match
, the type
of match and the value
. If the result of the criteria is true, the message will be routed to the specified targetset
.
Example
{
"criteria": {
"match": "destination",
"type": "regex",
"value": "^4917"
},
"targetset": "0003"
}
In the above example, the match is done on the destination address field of the ESME’s SubmitSM. The type of match specifies using a regular expression (regex
). The value to match against is the regular expression ^4917
. The means that traffic will be routed to target set 0003
if the destination address of the SubmitSM begins with the digits 4917
.
Criteria matching reference
The type of match will depend on the field specified in match
.
Match | Type | Example value | Description |
---|---|---|---|
|
|
Destination address is | Exact match on full destination address. |
|
Country digits of destination address are | Match on country code portion of destination address. | |
|
Country and NDC of destination address are | Match on country code + NDC digits. | |
|
Destination address is in the range 447720300100-447720300199. | Regular expression match on destination digits. | |
|
Following a look-up, the destination address belongs to MNO with MCC | Match on MCC of destination following look-up. | |
|
Following a look-up, the destination address belongs to MNO with MCC-MNC | Match on MNC of destination following look-up. | |
|
|
Source address is | Exact match on source address. |
|
Source address ends with | Regular expression match on characters in source. |