/server

Message to Multiple Destinations

Overview

SMPP protocol provides dedicated operation (submit_multi) defined as in [SMPP] (4.2.3) to submit the same message for up to 255 destinations in one operation.  Each destination can be either phone number (SME Address) or a Distribution List (DL) which has to be defined in SMSC's configuration.

The operation is not always supported by the SMSC but in case it is and the scenario fits it may provide great performance advantage over classic approach where each message has to be submitted to every destination separately.

Usage

SMSC Server Library supports transparently the SMPP protocol operation. When client uses Mutli Destination version of the submit function OnSmppSubmitMessageReceived event returns list of destination addresses in the Destination parameter of the event.

Code inside OnSmppSubmitMessageReceived event has to detect whether the Destination parameter contains single destination address or a list of destination addresses and mark this when calling smppSendSubmitMessageResponse function to send appropriate response.

Easiest way to detect if the Destination parameter is a list of destination addresses is to examine whether it contains semi-colon (";") character.

Destination parameter syntax

The Destination parameter may contain up to 255 fields separated by semi-colon (";"). Each field may be either a properly qualified phone number (SME Address) or distribution list (DL) identifier. The syntax of the Destination field for Multiple Destinations is as follows:

(destination[:ton][:npi]|@list)[;(destination[:ton][:npi]|@list)]

Where:

destination Phone number (destination_addr) in format accepted by the SMSC. Usually this is regular international phone number like "48999123456" (without quotes). Field may contain up to 21 numerical characters.
@list Distribution List identifier (dl_name) considered without leading "@" sign. Distribution List is a set of numbers defined in the configuration of the SMSC. Field may contain up to 21 alpha-numerical characters not counting the leading "@" sign.
ton Type Of Number (TON) for the preceding sme-address field. If the parameter is empty, e.g. by formatting the destination chunk like "48999123456::1" it will be replaced by the TON parameter of the appropriate submit function.
npi Numbering Plan Identifier (NPI) for the preceding sme-address field. If the parameter is empty, e.g. by formatting the destination chunk like "48999123456:1:" it will be replaced by the (NPI in this case) parameter of the appropriate submit function call.

Examples

Example below shows code inside the OnSmppSubmitMessageReceived event. The event delivers both messages sent to single and to multiple destinations. When the message has multiple destinations its Destination parameter will contain at least one semi-colon (";") character. On the presence of the semi colon decision is undertaken which response to send back:


//
// Event fired when message to submit is received
// (send_sm or submit_multi) from client
//
private void serverSMPP_OnSmppSubmitMessageReceived(
  object sender, smscs.SMPP.smppSubmitMessageReceivedEventArgs e)
{
  //
  // Use some method to generate unique message ID
  //
  string MessageID = getMessageID();

  bool MultipleDestinations = (e.Destination.IndexOf(";") != -1);

  serverSMPP.smppSendSubmitMessageResponse(e.ClientID,
    e.SequenceNumber, 0, MessageID, MultipleDestinations);
}

For better clarity some details of code that submits message have been removed.

See Also

smppSendSubmitMessageResponse

document.".$focusitem.".focus();"; } if($script != "") { echo $script; } ?>