TON (Type of Number)
The Type of Number (TON) setting is used to tell both your EMSE the format of the addressing (bind addressing) that will be processed for inbound messages as well as tell the NeuTrafiX network (source and destination addressing) how it should be processed for submits. There are three separate pairs of TON and NPI values; receiving addressing, source addressing, and destination addressing. These definitions are derived from the ETSI GSM 03.40 specification, which defines the SMS protocol. The SMPP specification defines the following TON values:
If you wish to specific a special value for the TON, the available options are:
- 0: Unknown
- 1: International
- 2: National
- 3: Network Specific
- 4: Subscriber Number
- 5: Alphanumeric
- 6: Abbreviated
NeuTrafiX does not generally require specific TON values from your bind to our network. We store specific values as defaults for your routes, connections, and communication assets (Short Code, Long Code, Alphanumeric Code).
NPI (Numbering Plan Identification)
The Numbering Plan Identification setting is used to tell both your EMSE the numbering plan associated with your messaging. The SMPP specification defines the following TON values:
If you wish to specific a special value for the NPI, the available options are:
- Unknown = 0
- ISDN/telephone numbering plan (E163/E164) = 1
- Data numbering plan (X.121) = 3
- Telex numbering plan (F.69) = 4
- Land Mobile (E.212) =6
- National numbering plan = 8
- Private numbering plan = 9
- ERMES numbering plan (ETSI DE/PS 3 01-3) = 10
- Internet (IP) = 13
- WAP Client Id (to be defined by WAP Forum) = 18
SMPP Official Specification
For details on the SMPP Specification, see SMPP 3.4 Official Specification.
Example usage of TON and NPI:
Telin requires the following TON and NPI when terminating messages to Indonesia or else your message will be rejected.
For Alphanumeric Sender
Source address : TON 5 and NPI 0
Destination address : TON 1 and NPI 1
For Numeric (Long Code/Long Digits) Sender
Source address : TON 1 and NPI 1
Destination address : TON 1 and NPI 1
Here is an example NodeJs SMPP client passing TON and NPI for Source Address and Destination Address to meet the requirement:
Parameters
- source_addr_ton:5,
- source_addr_npi:0,
- dest_addr_ton:1,
- dest_addr_npi:1,
const nanoid = require('nanoid') var smpp = require('smpp'); var session = smpp.connect('smpp://smpp.neutrafix.telin.net:2776'); smpp.addTLV('billing_price', { id: 0x1520, type: smpp.types.tlv.string }); smpp.addTLV('billed_msgs_cnt', { id: 0x1521, type: smpp.types.tlv.string }); session.bind_transceiver({ system_id: '******', password: '**********' }, function(pdu) { if (pdu.command_status == 0) { // Successfully bound session.submit_sm({ destination_addr: '6282114311111', source_addr: 'Google', registered_delivery: 1, message_id: nanoid(24), source_addr_ton:5, source_addr_npi:0, dest_addr_ton:1, dest_addr_npi:1, short_message: 'Your google code is: G-183837', }, function(pdu) { if (pdu.command_status == 0) { // Message successfully sent console.log("message sent OK"); } else { console.log("message sending failed"); } console.log("SOMETHING HAPPENNED:",pdu); }); session.on('deliver_sm', function(pdu) { console.log(pdu) if (pdu.esm_class == 4) { var shortMessage = pdu.short_message; console.log('Received DR: %s', shortMessage); session.send(pdu.response()); } }); session.on('pdu', function(pdu) { console.log("GOT PDU ", pdu) }); } });