/server

SMSCserverSMPP

Overview

Class SMSCserverSMPP
Namespace smscs.SMPP
Parent TComponent
Interfaces ISMSCserverSMPP

Methods

smppInitializeServer Start listening to the incoming connections.
smppFinalizeServer Stop listening to the incoming connections.
tcpAcceptConnection Accept incomming connection.
tcpCloseConnection Close either incomming or existing connection.
tcpCloseAllConnections Closes all active connections maintained by the component.
smppSendRAW Send raw SMPP message.
smppSendLoginResponse Send response to the login message.
smppSendLogoutResponse Send response to the logout message.
smppSendDeliverMessage Deliver message to the client.
smppSendDeliverStatusReport Deliver status report to the client.
smppSendSubmitMessageResponse Send response to a submitted message.

Events

OnTcpConnected Event triggered on client connection on network protocol (TCP/IP) level.
OnTcpDisconnected Event triggered on client disconnection on network protocol (TCP/IP) level.
OnSmppRAWReceived Event triggered on non interpreted (RAW) message receive.
OnSmppLoginReceived Event triggered on receive of login message.
OnSmppLogoutReceived Event triggered on receive of logout message.
OnSmppDeliverResponseReceived Triggered on a response to message delivered to the client.
OnSmppSubmitMessageReceived Triggered when a message is submitted by client.
OnSmppSubmitMessageCompleted Event triggered when multipart message is reconstructed.
OnSmppTraceProtocol Event triggered on every SMPP protocol message exchanged between component and the SMSC.

Properties

KeepAliveInterval Connection keep-alive timing.
ThrottleRate Message throttling limit parameter.

Methods

smppInitializeServer

Start listening to the incoming connections.

int smppInitializeServer(string LocalHost, int LocalPort, string ExtendedParameters);

Parameters

LocalHost
Either numeric or symbolic address of local interface that the component should listen on. In most cases should be set to the address of the local host e.g. "127.0.0.1" or left empty to listen on all interfaces.
LocalPort
Port number on which the component should listen to the incoming connections.
ExtendedParameters
Allows passing additional parameters to the function call. For the description and syntax of parameters that can be passed this way see Extended Parameters.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

smppFinalizeServer, OnTcpConnected, tcpAcceptConnection, tcpCloseConnection

smppFinalizeServer

Stop listening to the incoming connections.

int smppFinalizeServer();

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

smppInitializeServer

tcpAcceptConnection

Accept incomming connection.

int tcpAcceptConnection(int ClientID);

Parameters

ClientID
Client connection identifier.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

smppInitializeServer, tcpCloseConnection, OnTcpConnected

tcpCloseConnection

Close either incomming or existing connection.

int tcpCloseConnection(int ClientID);

Parameters

ClientID
Client connection identifier.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

smppInitializeServer, OnTcpDisconnected

tcpCloseAllConnections

Closes all active connections maintained by the component.

void tcpCloseAllConnections();

See Also

tcpCloseConnection, OnTcpDisconnected

smppSendRAW

Send raw SMPP message.

int smppSendRAW(int ClientID, int SequenceNumber, int CommandID, int CommandStatus, string Payload);

Parameters

ClientID
Client connection identifier.
SequenceNumber
Transaction identifier.
CommandID
SMPP command identifier.
CommandStatus
Command Status as defined in SMPP Error Codes chapter Command status section.
Payload
Message binary data (except header) in hexadecimal form.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

OnSmppRAWReceived

smppSendLoginResponse

Send response to the login message.

int smppSendLoginResponse(int ClientID, int SequenceNumber, smppBindModeEnum BindMode, int CommandStatus, string MCIdentifier, string ExtendedParameters);

Parameters

ClientID
Client connection identifier.
SequenceNumber
Transaction identifier.
BindMode
Type of bind operation for the component. Works according to the definition of the smppBindModeEnum type. Accepted values:
bmTransceiver The node will be able to both send and receive the messages.
bmTransmitter The node will only be able to send the messages.
bmReceiver The node will only be able to receive the messages.
CommandStatus
Command Status as defined in SMPP Error Codes chapter Command status section.
MCIdentifier
SMSC identifier.
ExtendedParameters
Allows passing additional parameters to the function call. For the description and syntax of parameters that can be passed this way see Extended Parameters.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

OnSmppLoginReceived

smppSendLogoutResponse

Send response to the logout message.

int smppSendLogoutResponse(int ClientID, int SequenceNumber, int CommandStatus);

Parameters

ClientID
Client connection identifier.
SequenceNumber
Transaction identifier.
CommandStatus
Command Status as defined in SMPP Error Codes chapter Command status section.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

OnSmppLogoutReceived

smppSendDeliverMessage

Deliver message to the client.

int smppSendDeliverMessage(int ClientID, int SequenceNumber, string Destination, int DTON, int DNPI, string Originator, int OTON, int ONPI, WideString Content, EncodingEnum Encoding, string UserDataHeader, SubmitOption Options, string ServiceType, string ExtendedParameters, ref List< uint > SequenceNumbers);

Parameters

ClientID
Client connection identifier.
SequenceNumber
Transaction identifier.
Destination
Message recipient identifier. Usually this is mobile phone number in fully qualified format.
DTON
Type Of Number (TON) for Destination parameter.
DNPI
Numbering Plan Identifier (NPI) for Destination parameter.
Originator
Message sender identifier. Usually this is is number of the SMSC's account (a short GSM number). This parameter can also be an alphanumeric string or general phone number where permitted.
OTON
Type Of Number (TON) for Originator parameter.
ONPI
Numbering Plan Identifier (NPI) for Originator parameter.
Content
The text or content of the message to be sent. The conversion of the characters transferred by parameter to the mobile infrastructure alphabet is done according to the value passed via Encoding parameter.
Encoding
Decides on the which conversion is applied to the Content parameter to convert it to the character set supported by message. Accepted values, members of EncodingEnum type:
et7BitText Message is encoded using 7-bit GSM alphabet as in [03.38] (6.2).
et8BitHexadecimal Message contains binary data encoded in hexadecimal format. Each two hexadecimal digits encode one byte of data.
etUCS2Text Message contains Unicode character string encoded according to UCS2 coding.
etISO88591 Message encoded as Latin 1 (ISO-8859-1). Support for this encoding may depend on SMSC configuration.
etISO88595 Message encoded as Cyrllic (ISO-8859-5). Support for this encoding may depend on SMSC configuration.
etISO88598 Message encoded as Latin/Hebrew (ISO-8859-8). Support for this encoding may depend on SMSC configuration.
etWAPPushOrMMS WAP Push/MMS required encoding. Sets F5 (hex) as the Data Coding Scheme (DCS) value. Required by some SMSC providers.
UserDataHeader
User Data Header (UDH) for the message. The header must be passed as a byte string in hexadecimal format. For example: "06050415831583" is 7 bytes large header.
Options
Options that can be set for message submitted as per SubmitOptionEnum type definition. It is possible to set more than one option by using the binary OR operator on the chosen option values. Accepted values:
soRequestStatusReport Request status report for the message.
soDirectDisplay Message will be sent as a Direct Display (FlashSMS) type message.
soDeliveryTimeRelative DeliveryTime is considered relative.
soDeliveryTimeAbsolute DeliveryTime is considered absolute.
soValidityPeriodRelative Validity period will be considered relative.
soValidityPeriodAbsolute Validity period will be considered absolute.
soMessageClass0 Message class will be set to 0.
soMessageClass1 Message class will be set to 1.
soMessageClass2 Message class will be set to 2.
soMessageClass3 Message class will be set to 3.
soZeroSMS Message will be delivered as "ZERO" SMS.
ServiceType
Allows to set the SMPP submit_sm parameter service_type. Parameter is required by some service providers. For more information see SMPP (5.2.11).
ExtendedParameters
Allows passing additional parameters to the function call. For the description and syntax of parameters that can be passed this way see Extended Parameters.
SequenceNumbers
Identifier(s) of the transaction with the SMSC. Allows matching the submission with return code provided by the OnSmppDeliverResponseReceived event. Returns more than one value when long message was split for sending into multiple parts.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

OnSmppDeliverResponseReceived, smppDeliverResponseReceivedEventArgs

smppSendDeliverStatusReport

Deliver status report to the client.

int smppSendDeliverStatusReport(int ClientID, int SequenceNumber, string Destination, int DTON, int DNPI, string Originator, int OTON, int ONPI, smppReportTypeEnum ReportType, string ServiceType, string MessageID, int SubmittedCount, int DeliveredCount, DateTime SubmitDate, DateTime DoneDate, smppMessageStateEnum MessageState, int NetworkErrorCode, string Text, string ExtendedParameters);

Parameters

ClientID
Client connection identifier.
SequenceNumber
Transaction identifier.
Destination
Message recipient identifier. Usually this is mobile phone number in fully qualified format.
DTON
Type Of Number (TON) for Destination parameter.
DNPI
Numbering Plan Identifier (NPI) for Destination parameter.
Originator
Message sender identifier. Usually this is is number of the SMSC's account (a short GSM number). This parameter can also be an alphanumeric string or general phone number where permitted.
OTON
Type Of Number (TON) for Originator parameter.
ONPI
Numbering Plan Identifier (NPI) for Originator parameter.
ReportType
Defines type of the report according to smppReportTypeEnum type definition.
ServiceType
Allows to set the SMPP submit_sm parameter service_type. Parameter is required by some service providers. For more information see SMPP (5.2.11).
MessageID
Message identifier. It has to be identical to the identifier allocated to the message when originally submitted.
SubmittedCount
Number of short messages originally submitted. This is only relevant when the original message was submitted to a distribution list. For more information see SMPP (Appendix B).
DeliveredCount
Number of short messages delivered. This is only relevant where the original message was submitted to a distribution list. For more information see SMPP (Appendix B).
SubmitDate
The time and date at which the short message was submitted. In the case of a message which has been replaced, this is the date that the original message was replaced. For details see SMPP (Appendix B).
DoneDate
The time and date at which the short message reached it's final state. For details see SMPP (Appendix B).
MessageState
The final status of the message. Set according to SMPP Error Codes chapter Message State section.
NetworkErrorCode
Where appropriate this may hold a Network specific error code or an SMSC error code for the attempted delivery of the message. These errors are Network or SMSC specific and are not included here. For details see SMPP Error Codes chapter Network Error Code section. If not used set to zero.
Text
The first 20 characters of the short message. For details see SMPP (Appendix B).
ExtendedParameters
Allows passing additional parameters to the function call. For the description and syntax of parameters that can be passed this way see Extended Parameters.
SequenceNumber
Identifier of the transaction with the SMSC. Allows matching the submission with return code provided by the OnSmppDeliverResponseReceived event.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

OnSmppDeliverResponseReceived, smppDeliverResponseReceivedEventArgs

smppSendSubmitMessageResponse

Send response to a submitted message.

int smppSendSubmitMessageResponse(int ClientID, int SequenceNumber, int CommandStatus, string MessageID, bool MultipleDestinations);

Parameters

ClientID
Client connection identifier.
SequenceNumber
Transaction identifier.
CommandStatus
Command Status as defined in SMPP Error Codes chapter Command status section.
MessageID
Message identifier.
MultipleDestinations
Indicates whether the response is to simgle or multiple destinations message frame. Response should be different if responding to 'submit_sm' or 'submit_multi' SMPP frames and the flag allows to create correct response.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value means Network Error Code.

See Also

OnSmppSubmitMessageReceived, OnSmppSubmitMessageCompleted

Events

OnTcpConnected

Event triggered on client connection on network protocol (TCP/IP) level.

public delegate void tcpConnectedEvent(TObject sender, tcpConnectedEventArgs e);

Description

The event informs that a clietn has connected to the server. It is then up to the server logic to decide whether to accept or reject such connection. In response to the event either tcpAcceptConnection or tcpCloseConnection should be called inside the event code.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
string RemoteHost
IP address of the remote client that is about to connect to the server. In dotted numeric representation (e.g. "192.168.8.16").
int RemotePort
Port number of the remote client that is about to connect to the server.

See Also

tcpConnectedEvent, tcpConnectedEventArgs, tcpAcceptConnection, tcpCloseConnection

OnTcpDisconnected

Event triggered on client disconnection on network protocol (TCP/IP) level.

public delegate void tcpDisconnectedEvent(TObject sender, tcpDisconnectedEventArgs e);

Description

The event informs about the tear down of connection between the component and the SMSC on the network layer level (TCP). Such situation may be due to disconnection by SMSC (as per the rules of protocol after the timeout of inactivity of the component, in the case when connection is not kept alive) and in the case of disconnection for other reasons concerning functioning of the network layer.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int Reason
When the result is zero the connection has been disconnected by remote party. When the result is -1 then connection has been ended by the component itself, because inproperly formatted response has been received during the attempt to communicate with the remote party. Positive value means Network Error Code.

See Also

tcpDisconnectedEvent, tcpDisconnectedEventArgs

OnSmppRAWReceived

Event triggered on non interpreted (RAW) message receive.

public delegate void smppRAWReceivedEvent(TObject sender, smppRAWReceivedEventArgs e);

Description

Event triggered on receive of a SMPP message that has not been decoded by any of the functionality serviced by the component.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.
int CommandID
This field identifies the particular SMPP PDU which indicates what operation data is contained within Protocol Data Unit (PDU).
int CommandStatus
Command Status as defined in SMPP Error Codes chapter Command status section.
string Payload
Protocol frame (also referred as PDU, Protocol Data Unit) consists of header (which contains Sequence Number, Command ID and Command Status) and message data. This property contains message data part, without header, in hexadecimal representation (each two hexadecimal digits represent one byte of data).

See Also

smppRAWReceivedEvent, smppRAWReceivedEventArgs, smppSendRAW

OnSmppLoginReceived

Event triggered on receive of login message.

public delegate void smppLoginReceivedEvent(TObject sender, smppLoginReceivedEventArgs e);

Description

The event informs that the client has issued login (bind) message. User can analyze login message credentials and other parameters and decide whether to accept or reject client's communication. In event handler smppSendLoginResponse should be called to pass response to the client.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.
string SystemID
SMSC user identifier.
string Password
SMSC user password.
int TON
int value denoting Type Of Number.
int NPI
int value denoting Numbering Plan Identifier.
String SystemType
The parameter is optional and is used by some SMSCs to perform additional configuration of the client connection.
smppBindModeEnum BindMode
Works according to the definition of the smppBindModeEnum type.
int ProtocolVersion
Version of the protocol supported by the client application reported to the SMSC. Some SMSC are sensitive to the version of the protocol reported in the bind operation of the SMPP protocol. The value should be set according to the SMPP (5.2.4).
string ExtendedParameters
Allows to retrieve the additional parameters from the message received. For the description and syntax of parameters that can be retreived this way see Extended Parameters.

smpp.address-range

Range of short numbers serviced by the connection. The value should be set according to the [SMPP] (5.2.7) or according to the SMSC service provider's instructions.

Syntax

smpp.address-range=Sn

Where Sn is string parameter:

Example

smpp.address-range=24556

See Also

smppLoginReceivedEvent, smppLoginReceivedEventArgs, smppSendLoginResponse

OnSmppLogoutReceived

Event triggered on receive of logout message.

public delegate void smppLogoutReceivedEvent(TObject sender, smppLogoutReceivedEventArgs e);

Description

The event informs that the client has issued logout (unbind) message. In event handler smppSendLogoutResponse should be called to pass response to the client.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.

See Also

smppLogoutReceivedEvent, smppLogoutReceivedEventArgs, smppSendLogoutResponse

OnSmppDeliverResponseReceived

Triggered on a response to message delivered to the client.

public delegate void smppDeliverResponseReceivedEvent(TObject sender, smppDeliverResponseReceivedEventArgs e);

Description

The event informs that the client has confirmed a message delivered. The same event is fired for both a message and status report. To which message is this confirmation can be determined by SequenceNumber parameter.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.
int CommandStatus
Command Status as defined in SMPP Error Codes chapter Command status section.

See Also

smppDeliverResponseReceivedEvent, smppDeliverResponseReceivedEventArgs

OnSmppSubmitMessageReceived

Triggered when a message is submitted by client.

public delegate void smppSubmitMessageReceivedEvent(TObject sender, smppSubmitMessageReceivedEventArgs e);

Description

The event informs that the client has submitted a message to the server. To respond smppSendSubmitMessageResponse or should be called to pass response with MessageID to the client.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.
string Destination
Usually this is mobile phone number in canonical format.
int DTON
int value denoting Type Of Number.
int DNPI
int value denoting Numbering Plan Identifier.
string Originator
Usually this is is number of the SMSC's account (a short GSM number). This parameter can also be an alphanumeric string or phone number.
int OTON
int value denoting Type Of Number.
int ONPI
int value denoting Numbering Plan Identifier.
String Content
This can be ASCII characters string or hexadecimally encoded binary content.
EncodingEnum Encoding
Possible values as per EncodingEnum type:
et7BitText Message is encoded using 7-bit GSM alphabet as in [03.38] (6.2).
et8BitHexadecimal Message contains binary data encoded in hexadecimal format. Each two hexadecimal digits encode one byte of data.
etUCS2Text Message contains Unicode character string encoded according to UCS2 coding.
etISO88591 Message encoded as Latin 1 (ISO-8859-1). Support for this encoding may depend on SMSC configuration.
etISO88595 Message encoded as Cyrllic (ISO-8859-5). Support for this encoding may depend on SMSC configuration.
etISO88598 Message encoded as Latin/Hebrew (ISO-8859-8). Support for this encoding may depend on SMSC configuration.
etWAPPushOrMMS WAP Push/MMS required encoding. Sets F5 (hex) as the Data Coding Scheme (DCS) value. Required by some SMSC providers.
SubmitOption Options
Options that can be set to submitted message as per SubmitOptionEnum type definition. More than one option can be set at the same time by using the OR operator on selected option values. Accepted values:
soRequestStatusReport Request status report for the message.
soDirectDisplay Message will be sent as a Direct Display (FlashSMS) type message.
soDeliveryTimeRelative DeliveryTime is considered relative.
soDeliveryTimeAbsolute DeliveryTime is considered absolute.
soValidityPeriodRelative Validity period will be considered relative.
soValidityPeriodAbsolute Validity period will be considered absolute.
soMessageClass0 Message class will be set to 0.
soMessageClass1 Message class will be set to 1.
soMessageClass2 Message class will be set to 2.
soMessageClass3 Message class will be set to 3.
soZeroSMS Message will be delivered as "ZERO" SMS.
string UserDataHeader
If the message received contains the User Data Header (UDH), it will be returned in this field as hexadecimally encoded binary content, for example: "06050415831583". If the message does not have UDH empty string is returned.
DateTime DeliveryTime
Contains the message delivery time. Works according to Options parameter. If Options parameter contains the flag soDeliveryTimeRelative then the delivery time considered relative to the time when message was submitted to the SMSC. If the Options parameter contains the flag soDeliveryTimeAbsolute then the delivery time is considered absolute in the machine local time zone. When set as relative the time is calculated by subtracting 2000.01.01 00:00:00 from the value passed. Effectively that is number of days, hours, minutes and seconds from 12:00am of January 1stMaximum time span that can be passed as relative parameter is 30 days 23 hours and 59 seconds.
DateTime ValidityPeriod
Contains the message validity time. Works according to Options parameter. If Options parameter contains the flag soValidityPeriodRelative then the message validity time is considered relative to the submission to the SMSC. If Options parameter contains the flag soValidityPeriodAbsolute then the message validity time is considered absolute in the machine local time zone. If both options are specified absolute time is set. When set as relative the time is calculated by subtracting 2000.01.01 00:00:00 from the value passed. Effectively that is number of days, hours, minutes and seconds from 12:00am of January 1stMaximum time span that can be passed as relative parameter is 30 days 23 hours and 59 seconds.
string ExtendedParameters
Allows to retrieve the additional parameters from the message received. For the description and syntax of parameters that can be retreived this way see Extended Parameters.

See Also

smppSubmitMessageReceivedEvent, smppSubmitMessageReceivedEventArgs, smppSendSubmitMessageResponse

OnSmppSubmitMessageCompleted

Event triggered when multipart message is reconstructed.

public delegate void smppSubmitMessageCompletedEvent(TObject sender, smppSubmitMessageCompletedEventArgs e);

Description

The event informs that the client has submitted a message which either completes a multipart message or does not need completition.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to received protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
int SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.
string Destination
Usually this is mobile phone number in canonical format.
int DTON
int value denoting Type Of Number.
int DNPI
int value denoting Numbering Plan Identifier.
string Originator
Usually this is is number of the SMSC's account (a short GSM number). This parameter can also be an alphanumeric string or phone number.
int OTON
int value denoting Type Of Number.
int ONPI
int value denoting Numbering Plan Identifier.
String Content
This can be ASCII characters string or hexadecimally encoded binary content.
EncodingEnum Encoding
Possible values as per EncodingEnum type:
et7BitText Message is encoded using 7-bit GSM alphabet as in [03.38] (6.2).
et8BitHexadecimal Message contains binary data encoded in hexadecimal format. Each two hexadecimal digits encode one byte of data.
etUCS2Text Message contains Unicode character string encoded according to UCS2 coding.
etISO88591 Message encoded as Latin 1 (ISO-8859-1). Support for this encoding may depend on SMSC configuration.
etISO88595 Message encoded as Cyrllic (ISO-8859-5). Support for this encoding may depend on SMSC configuration.
etISO88598 Message encoded as Latin/Hebrew (ISO-8859-8). Support for this encoding may depend on SMSC configuration.
etWAPPushOrMMS WAP Push/MMS required encoding. Sets F5 (hex) as the Data Coding Scheme (DCS) value. Required by some SMSC providers.
SubmitOption Options
Options that can be set to submitted message as per SubmitOptionEnum type definition. More than one option can be set at the same time by using the OR operator on selected option values. Accepted values:
soRequestStatusReport Request status report for the message.
soDirectDisplay Message will be sent as a Direct Display (FlashSMS) type message.
soDeliveryTimeRelative DeliveryTime is considered relative.
soDeliveryTimeAbsolute DeliveryTime is considered absolute.
soValidityPeriodRelative Validity period will be considered relative.
soValidityPeriodAbsolute Validity period will be considered absolute.
soMessageClass0 Message class will be set to 0.
soMessageClass1 Message class will be set to 1.
soMessageClass2 Message class will be set to 2.
soMessageClass3 Message class will be set to 3.
soZeroSMS Message will be delivered as "ZERO" SMS.
string UserDataHeader
If the message received contains the User Data Header (UDH), it will be returned in this field as hexadecimally encoded binary content, for example: "06050415831583". If the message does not have UDH empty string is returned.
DateTime DeliveryTime
Contains the message delivery time. Works according to Options parameter. If Options parameter contains the flag soDeliveryTimeRelative then the delivery time considered relative to the time when message was submitted to the SMSC. If the Options parameter contains the flag soDeliveryTimeAbsolute then the delivery time is considered absolute in the machine local time zone. When set as relative the time is calculated by subtracting 2000.01.01 00:00:00 from the value passed. Effectively that is number of days, hours, minutes and seconds from 12:00am of January 1stMaximum time span that can be passed as relative parameter is 30 days 23 hours and 59 seconds.
DateTime ValidityPeriod
Contains the message validity time. Works according to Options parameter. If Options parameter contains the flag soValidityPeriodRelative then the message validity time is considered relative to the submission to the SMSC. If Options parameter contains the flag soValidityPeriodAbsolute then the message validity time is considered absolute in the machine local time zone. If both options are specified absolute time is set. When set as relative the time is calculated by subtracting 2000.01.01 00:00:00 from the value passed. Effectively that is number of days, hours, minutes and seconds from 12:00am of January 1stMaximum time span that can be passed as relative parameter is 30 days 23 hours and 59 seconds.
string ExtendedParameters
Allows to retrieve the additional parameters from the message received. For the description and syntax of parameters that can be retreived this way see Extended Parameters.
<> List MessageIDs
Message identifier(s) returned to the SMSC for the messages that form the completed message. They should be used to later deliver Status Reports using smppSendDeliverStatusReport.

See Also

OnSubmitMessageCompleted, smppSubmitMessageCompletedEventArgs

OnSmppTraceProtocol

Event triggered on every SMPP protocol message exchanged between component and the SMSC.

public delegate void smppTraceProtocolCallback(TObject Sender, smppTraceProtocolCallbackArgs e);

Description

This event allows to log all messages exchanged on the SMPP protocol level between the component and the SMSC. Protocol messages are passed as hexadecimally encoded Protocol Data Units (PDU) which is exact binary representation of protocol message.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

int ClientID
Component can serve multiple client connections. Each connection has uniqe, numerical identifier. This identifier is used to send responses to Completed protocol messages and to send protocol messages to particular client. If the value returned by ClientID equals -1 then the connection to which event is reported has been disconnected prior to processing of the message.
string FromAddress
Colon separated IP address and port number (IP:Port).
string ToAddress
Colon separated IP address and port number (IP:Port).
LongWord CommandID
This field identifies type of particular SMPP message which indicates what operation data is contained within Protocol Data Unit (PDU).
LongWord SequenceNumber
Identifier of the request/response sequence exchanged between SMPP client and server. Response should have the same Sequence Number as request. Sequence Numbers are generated independently by client and server and should be unique for each peer.
string PDU
Protocol Data Unit (PDU) message data in hexadecimal representation (each two hexadecimal digits represent one byte of data).

See Also

smppTraceProtocolCallbackArgs, smppTraceProtocolCallback

Properties

KeepAliveInterval

Connection keep-alive timing.

public int KeepAliveInterval { get; set; }

Description

Value in seconds denoting time interval between packages keeping the connection alive in case no other packages are exchanged with the SMSC. It should be set according to the SMSC operator's instructions and the speed of Internet connection between the component and the SMSC. Typically, this value amounts to one third of the time after which the SMSC breaks the connection in case of lack of activity. When set to zero keep alive packets are never sent to the SMSC.

ThrottleRate

Message throttling limit parameter.

public int ThrottleRate { get; set; }

Description

Determines maximum rate of messages send to client per second. If set to any value above 0 component counts number of messages submitted and limits the rate by waiting appropriate time inside smppSendDeliverMessage, smppSendDeliverStatusReport functions. If the value is set to zero component does not limit the rate of messages delivered.