Skip to main content
Skip table of contents

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)

JSON
{
  "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)

JSON
{
  "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:

  1. ESME routes-mt rules

  2. Global routes-mt rules

  3. ESME 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

JSON
    {
      "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

exact

33101231234

Destination address is 33101231234.

Exact match on full destination address.

country

44

Country digits of destination address are 44.

Match on country code portion of destination address.

ndc

447700

Country and NDC of destination address are 447700.

Match on country code + NDC digits.

regex

^447720300[1,2][0-9][0-9]

Destination address is in the range 447720300100-447720300199.

Regular expression match on destination digits.

mcc

234

Following a look-up, the destination address belongs to MNO with MCC 234.

Match on MCC of destination following look-up.

mnc

23414

Following a look-up, the destination address belongs to MNO with MCC-MNC 23414.

Match on MNC of destination following look-up.

source

exact

Abacus

Source address is Abacus

Exact match on source address.

regex

^(.*)(-AD)$

Source address ends with -AD

Regular expression match on characters in source.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.