Receiving messages

Inbound messages will be delivered to your platform as a DELIVER_SM. The table below shows what the PDU looks like for each mobile originated SMS sent to (one of) your short codes or long numbers.

Optionally, MCC and MNC indicators can be submitted for inbound traffic on short codes.

Parameter Description
command_id Will always be DELIVER_SM
service_type Will always be 0
source_addr_ton TON for the source address, will be INTERNATIONAL (1) for all mobile originated messages
source_addr_npi NPI for the source address, will be MSISDN (1) for all mobile originated messages
source_addr Source address - the MSISDN the SMS was sent from
dest_addr_ton TON for the destination address, will be INTERNATIONAL (1) Long numbers and NATIONAL (2) for Short code
dest_addr_npi NPI for the destination address, will always be MSISDN (1)
destination_addr Destination address - the MSISDN the SMS was sent to (your Long Number or Short Code)
esm_class Will always be 0
protocol_id Will always be 0
priority_flag Will always be 0
schedule_delivery_time Will always be 0
validity_period Will always be 0
registered_delivery Will always be 0
replace_if_present_flag Will always be 0
data_coding Encoding used. Default is GSM-7 (0), UCS-2 for messages containing characters outside GSM-7 (8)
sm_default_msg_id Will always be 0
sm_length Short Message Length - number of characters in message content
short_message Message content

MCC + MNC in status reports

Include MCC + MNC information in SMPP delivery receipts as optional parameters. This information, optionally configured per SMPP account, is passed in a vendor-specific TLV (0x1403).

In the value field, you will receive the MCC + MNC of the destination operator.

Examples

Here are a few examples for both long numbers and short codes.

Inbound SMS sent to a long number

Parameter Example
command_id DELIVER_SM
service_type 0
source_addr_ton 1
source_addr_npi 1
source_addr 46706160585
dest_addr_ton 1
dest_addr_npi 1
destination_addr 46737494630
esm_class 0
protocol_id 0
priority_flag 0
schedule_delivery_time 0
validity_period 0
registered_delivery 0
replace_if_present_flag 0
data_coding 0
sm_default_msg_id 0
sm_length 4
short_message Test

Inbound SMS sent to a short code

Parameter Example
command_id DELIVER_SM
service_type 0
source_addr_ton 1
source_addr_npi 1
source_addr 46706160585
dest_addr_ton 2
dest_addr_npi 1
destination_addr 71630
esm_class 0
protocol_id 0
priority_flag 0
schedule_delivery_time 0
validity_period 0
registered_delivery 0
replace_if_present_flag 0
data_coding 0
sm_default_msg_id 0
sm_length 4
short_message Test

Additional resources

Was this page helpful?