You are here:

ActiveXperts.com > Support > ActiveXperts SMS and MMS Toolkit > Online > SMPP Address Range and Regular Expressions

Activexperts Support Pages

SMPP Address Range and Regular Expressions

1. Address Range

The 'Address Range' parameter is used in the bind_receiver and bind_transceiver command to specify a set of SME addresses serviced by the ESME client. A single SME address may also be specified in the address_range parameter. UNIX Regular Expression notation should be used to specify a range of addresses.

Messages addressed to any destination in this range shall be routed to the ESME.

Note 1: For IP addresses, it is only possible to specify a single IP address. A range of IP addresses are not allowed. IP version 6.0 is not currently supported in this version of the protocol.

Note 2: It is likely that the addr_range field is not supported or deliberately ignored on most Message Centres. The reason for this is that most carriers will not allow an ESME control the message routing as this can carry the risk of mis-routing mesages. In such circumstances, the ESME will be requested to set the field to NULL.

2. UNIX regular expressions

Full explanations of UNIX regular expressions can be found in section 5 of the standard online UNIX manuals (man 5 regexp). Furthermore, many UNIX books explain regular expressions and the various syntax used. This section gives useful and applicable examples of regular expressions in the context of the SMPP usage of same.

SMPP uses a regular expression in the bind_receiver and bind_transceiver PDUs. The ESME uses this to provide routing criteria to the SMSC, namely, TON, NPI and routing_expr. The TON & NPI values are fixed values where the routing_expr itself is the regular expression.

^1234

The '^' char is used to represent "beginning with", therefore ^1234 is interpreted as MSISDNs beginning with 1234. This allows an ESME specify a specific set of numbers based on a a given prefix common to all.

5678$

The '$' char is used to represent "ending with", thus 5678$ will match any MSISDN ending with 5678.

^123456$

A combination of '^' and '$' at the beginning and end of a regular expression, is used to specify an absolute address, i.e the above expression will match MSISDNs beginning with and ending with 123456. The only value ever matched to this will in fact be '123456' itself.

[13579]$

values within [] denote a character class. The above expression will match MSISDNs ending with any of 1, 3, 5, 7 or 9. So this expression will match MSISDNs ending in an odd digit. If a '^' character is placed inside the '[', then the match is based on any character not in the specified class; e.g [^13579]$ will match MSISDNs not ending with any of the specified digits.