Integrated Normalisation
Introduction
The JSLEE provides a normalisation interface common to all applications that support normalisation. This interface is a utility for modifying numbers based on information provided by the network, both for incoming (“normalisation”) and outgoing (“denormalisation”) scenarios.
To configure a JSLEE service to have normalisation support, add the number-rules
configuration
section to the application’s JSLEE configuration, e.g.:
{
"applications": {
"app1": {
"configuration": {
"number-rules": {
"enabled": true
The number-rules
section can also be inserted into the global configuration, e.g.:
{
"number-rules": {
"normalisation": {
<normalisation rules>
},
"denormalisation": [
<denormalisation rules>
]
},
"applications": {
"app1": {
"configuration": {
"number-rules": {
"enabled": true,
Global normalisation configuration will apply to all services, but parameters specified at the service level will override those defined at the global level.
If no number-rules
configuration is provided at all or if the enabled
flag is either
not present or set to false
, normalisation will not be active.
Number Rule Types
There are two rule types supported for normalisation:
- Rules in the
normalisation
section which can be applied to numbers received from the network, and - Rules in the
denormalisation
section which can be applied to numbers presented to the network.
Either or both rule types may be defined.
Address Natures
All rule types support the following address natures:
international
- the address digits are specified as being in an international format. This may be used when an IDD is present, or when a number is in full international format already.national
- the address digits are specified as being in a national format. This is generally used when a NAC is present.unknown
- the address digits are specified as being in an unknown format. This is generally used for short codes.network
- the address digits are specified as being in network-specific format.subscriber
- the address digits are specified as being in subscriber-specific format.alphanumeric
- the address digits specified as containing alphabetic characters.abbreviated
- the address digits are specified as abbreviated.
Address Plans
All rule types support the following address plans:
unknown
- the address digits are specified as using an unknown numbering plan.e164
- the address digits are specified as using the E.164 numbering plan. Note that this also includes E.163.data
- the address digits are specified as using a data-specific (e.g. X.121) numbering plan.telex
- the address digits are specified as using a telex (e.g. F.69) numbering plan.e212
- the address digits are specified as using the E.212 numbering plan.national
- the address digits are specified as using a national numbering plan.private
- the address digits are specified as using a private numbering plan.ermes
- the address digits are specified as using the ERMES numbering plan.internet
- the address digits are specified as using an IP numbering plan.wap
- the address digits are specified as using a WAP numbering plan.
Normalisation Rules
Normalisation rules are used to translate numbers recieved from the network into a normalised form, enabling other JSLEE applications to work with a known data format.
Normalisation rules are specified per address nature, and applied for the network-provided nature the in the order that the rules are defined. Once a match is made, no further rules are processed. If no rule is matched, or no rules are defined, the number is unchanged.
Example normalisation rules might be:
"normalisation": {
"unknown": [
{ "max-length": 6, "prefix": "64", "remove": 2 }
],
"national": [
{ "prefix": "00", "remove": 2 },
{ "prefix": "0", "remove": 1, "prepend": "64" },
{ "max-length": 6, "prefix": "64", "remove": 2 }
],
"international": [
{ "prefix": "00", "remove": 2 }
]
}
These rules say:
- For unknown and national nature addresses 1-6 digits long, remove the prefix
64
if it is present. - For national and international nature addresses, remove the prefix
00
if it is present. - For national nature addresses, remove the prefix
0
if it is present and add the prefix64
.
Note that mapping of the protocol-specific address nature to the generalised form is done by the receiving JSLEE application, as set out below. The natures presented and the formats expected are highly network-specific and will differ from site to site.
The following configuration options are available when defining normalisation rules:
Field | Type | Required? | Default | Description |
---|---|---|---|---|
prefix |
String | No | (empty string) | The prefix to match to the received digits. If the prefix does not match, the rule does not apply. |
min-length |
Integer | No | 0 |
The minimum length of the received digits. If the received digit string length is shorter, the rule does not apply. |
max-length |
Integer | No | 0 |
The maximum length of the received digits. If the received digit string length is longer, the rule does not apply. |
alphanumeric |
Boolean | No | (not used) | Whether the address string contains non-numeric characters. If the outcome does not match, the rule does not apply. |
plan |
String | No | (not used) | The address plan of the received digits. If the received plan does not match, the rule does not apply. |
remove |
Integer | No | 0 |
The number of digits to remove from the front of the received digits if the rule applies. |
prepend |
String | No | (empty string) | The digit string to place in front of the received digits if the rule applies. |
Rule parameters are processed in the following order:
nature
(as part of ruleset selection)prefix
,min-length
,max-length
,alphanumeric
, andplan
remove
(if matched)prepend
(if matched)
Denormalisation Rules
Denormalisation rules are used to translate numbers sent from the JSLEE to the network into a network-specific format.
As normalised numbers no longer have an address nature, denormalisation rules are simply applied in order. Once a match is made, no further rules are processed. If no rule is matched, or no rules are defined, the number is unchanged.
Example denormalisation rules might be:
"denormalisation": [
{ "alphanumeric": true, "nature": "alphanumeric", "plan": "unknown" },
{ "max-length": 6, "nature": "unknown" },
{ "nature": "international" }
]
These rules say:
- For addresses with alphabetic characters, set the nature of address to
alphanumeric
and the number plan tounknown
. - For addresses 1-6 digits long, set the nature of address to
unknown
. The number plan will default toe164
. - Otherwise, set the nature of address to
international
. The number plan will default toe164
.
Note that mapping of the generalised address nature to the protocol-specific form is done by the sending JSLEE application, as set out below. The natures presented and the formats sent are highly network-specific and will differ from site to site.
The following configuration options are available when defining denormalisation rules:
Field | Type | Required? | Default | Description |
---|---|---|---|---|
prefix |
String | No | (empty string) | The prefix to match to the outgoing digits. If the prefix does not match, the rule does not apply. |
min-length |
Integer | No | 0 |
The minimum length of the outgoing digits. If the outgoing digit string length is shorter, the rule does not apply. |
max-length |
Integer | No | 0 |
The maximum length of the outgoing digits. If the outgoing digit string length is longer, the rule does not apply. |
remove |
Integer | No | 0 |
The number of digits to remove from the front of the outgoing digits if the rule applies. |
alphanumeric |
Boolean | No | (not used) | Whether the address string contains non-numeric characters. If the outcome does not match, the rule does not apply. |
prepend |
String | No | (empty string) | The digit string to place in front of the outgoing digits if the rule applies. |
nature |
String | No | international |
The address nature to use when sending the the outgoing digits if the rule applies. |
plan |
String | No | e164 |
The address plan to use when sending the the outgoing digits if the rule applies. |
Rule parameters are processed in the following order:
prefix
,min-length
, andmax-length
remove
(if matched)prepend
(if matched)nature
andplan
(if matched)
Protocol-Specific Mappings
SMPP Mappings
SMPP Type Of Number
The following mappings are made between SMPP TON and generic [address natures](#address-natures:
SMPP TON | Generic Nature |
---|---|
Unknown (0 ) |
unknown |
International (1 ) |
international |
National (2 ) |
national |
Network Specific (3 ) |
network |
Subscriber Number (4 ) |
subscriber |
Alphanumeric (5 ) |
alphanumeric |
Abbreviated (6 ) |
abbreviated |
SMPP Number Plan Indicator
The following mappings are made between SMPP NPI and generic address plans:
SMPP NPI | Generic Nature |
---|---|
Unknown (0 ) |
unknown |
ISDN (E163/E164) (1 ) |
e164 |
Data (X.121 (3 ) |
data |
Telex (F.69) (4 ) |
telex |
Land Mobile (E.212) (6 ) |
e212 |
National (8 ) |
national |
Private (9 ) |
private |
ERMES (10 ) |
ermes |
Internet (IP) (14 ) |
internet |
WAP (18 ) |
wap |