/client

SMSCclientSMPP

Overview

Class SMSCclientSMPP
Namespace smscc.SMPP
Parent TComponent
Interfaces ISMSCclientSMPP

Methods

tcpConnect Connect on network protocol (TCP/IP) level.
tcpDisconnect Disconnect on network protocol (TCP/IP) level.
smppSendRAW Send generic (RAW) SMPP message.
smppInitializeSession Login and initialize communication session on SMPP protocol level.
smppInitializeSessionEx Login and initialize communication session on SMPP protocol level with extended parameter set.
smppFinalizeSession Logout and finalize communication session on SMPP protocol level.
smppSubmitMessage Submit message to the SMSC.
smppSubmitMessageEx Submit message to the SMSC with extended parameter set.
smppSubmitMessageAsync Submit message in asynchronous mode.
smppSubmitData Submit data message to the SMSC.
smppQueryMessage Query status of the message in SMSC queue.
smppCancelMessage Remove message from the SMSC queue, providing it has not been delivered to the time.

Events

OnTcpDisconnected Event triggered on disconnection on network protocol (TCP/IP) level.
OnSmppRAWReceived Event triggered on non interpreted (RAW) message receive.
OnSmppMessageReceived Event triggered on message being received from the SMSC.
OnSmppMessageCompleted Event triggered on multipart message is reconstructed.
OnSmppSubmitResponseAsyncReceived Event triggered on receive of message submission confirmation in asynchronous mode.
OnSmppStatusReportReceived Event triggered on receive of status report.
OnSmppQueryResponseReceived Event triggered on receive of response to smppQueryMessage function.
OnSmppCancelResponseReceived Event triggered on receive of response to smppCancelMessage function.
OnSmppTraceProtocol Event triggered on every SMPP protocol message exchanged between component and the SMSC.

Properties

Connected Returns information on connection state.
KeepAliveInterval Connection keep-alive timing.
ResponseTimeOut Communication timeout.
ImmediateResponse Status report confirmation mode.
ThrottleRate Message throttling limit parameter.

Methods

tcpConnect

Connect on network protocol (TCP/IP) level.

int tcpConnect(string RemoteHost, int RemotePort, string ExtendedParameters = "");

Parameters

RemoteHost
Either numeric or alphanumeric TCP/IP address of the SMSC ("192.168.8.16", "smsc.telecom.com" etc.)
RemotePort
Port number of the SMSC for the TCP/IP protocol connection.
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.

tcp.localhost

Sets local host IP address used to establish TCP/IP connection. Required by some providers' security measures.

Syntax

tcp.localhost=Sn

Where Sn is a string with either numerical or alphanumerical TCP/IP interface IP address.

Example

tcp.localhost=85.202.12.136

tcp.localport

Sets local port number used to establish TCP/IP connection. Required by some providers' security measures.

Syntax

tcp.localport=Nn

Where Nn is numerical string defining port number.

Example

tcp.localport=6300

tls.enabled

Allows to establish Secure Sockets Layer (SSL) and Transport Layer Security (TLS) secured connection.

Syntax

tls.enabled=B

Where B is 1 for enabled or 0 for disabled.

Example

To enable SSL/TLS for particular connection following should be set:

tls.enabled=1

tls.checks

Allows to disable policy error checks done on server certificate thus allowing to use self-signed certificates etc.

Syntax

tls.checks=B

Where B is 1 for enabled or 0 for disabled.

Example

To disable checks for particular connection set:

tls.checks=0

tls.protocols

Allows to narrow the set of allowed protocols used in Secure Sockets Layer (SSL) and Transport Layer Security (TLS) negotiations. By default all protocols supported by the stack are supported.

Syntax

tls.protocols=PPP[:PPP]

Where PPP is one or more of the following identifiers:

ssl20 Enable SSL protocol version 2.0.
ssl30 Enable SSL protocol version 3.0.
tls10 Enable TLS protocol version 1.0.

Example

To enable only SSL 3.0 and TLS 1.0 protocols during negotiations:

tls.protocols=ssl30:tls10

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

See Also

tcpDisconnect, smppInitializeSession, smppInitializeSessionEx

tcpDisconnect

Disconnect on network protocol (TCP/IP) level.

void tcpDisconnect();

See Also

tcpConnect, OnTcpDisconnected

smppSendRAW

Send generic (RAW) SMPP message.

int smppSendRAW(int CommandID, int CommandStatus, string Payload, ref uint SequenceNumber);

Parameters

CommandID
SMPP command identifier.
CommandStatus
Operation status.
Payload
Hexadecimally encoded message binary data without header.
SequenceNumber
Transaction identifier. Set by the component internally and returned for matching with response.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

smppInitializeSession

Login and initialize communication session on SMPP protocol level.

int smppInitializeSession(string SystemID, string Password, int TON, int NPI, string SystemType);

Parameters

SystemID
SMSC user identifier.
Password
SMSC user password.
TON
Type Of Number.
NPI
Numbering Plan Identifier.
SystemType
System type identifier. The parameter is optional and if required should be supplied by the SMSC operator.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

See Also

smppInitializeSessionEx, smppFinalizeSession

smppInitializeSessionEx

Login and initialize communication session on SMPP protocol level with extended parameter set.

int smppInitializeSessionEx(string SystemID, string Password, int TON, int NPI, string SystemType, smppBindModeEnum BindMode, int ProtocolVersion, string ExtendedParameters);

Parameters

SystemID
SMSC user identifier.
Password
SMSC user password.
TON
Type Of Number.
NPI
Numbering Plan Identifier.
SystemType
System type identifier. The parameter is optional and if required should be supplied by the SMSC operator.
BindMode
Type of bind operation 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.
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) or according to the SMSC service provider's instructions. Typically this value should be set as follows:
3 (dec) To indicate client's support for version 3.3 of SMPP protocol.
52 (dec) To indicate client's support for version 3.4 of SMPP protocol.
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.

smpp.long-messages

Method for encoding of long messages.

Syntax

smpp.long-messages=Sn

Where Sn is one of the following values:

none No message concatenation.
udh8 Message concatenation is done using User Data Header field (UDH) with 8 bit reference field.
udh16 Message concatenation is done using User Data Header field (UDH) with 16 bit reference field.
sar Messages is split using sar_msg_ref_num (0x020c), sar_total_segments (0x020e) and sar_segment_seqnum (0x020f) optional parameters (TLVs).
payload Long message can be accepted by the SMSC encoded in message_payload (0x0424) optional parameter (TLV).

Default

smpp.long-messages=none

smpp.smsc-encoding

Allows to set which encoding will be applied to messages submitted in SMPP protocol as 7bit (et7BitText). By default component encodes messages in GSM 03.38 (IA5) alphabet. Some SMSCs are configured to submit messages using different encodings.

Syntax

smpp.smsc-encoding=Sn

Where Sn is one of the following values:

ia5 GSM 03.38 encoding.
iso-8859-1 ISO 8859-1 (Latin1) encoding.
hp-roman-8 HP Roman 8 encoding.

Example

smpp.smsc-encoding=iso-8859-1

smpp.7bit-packing

Allows to enable/disable packing message characters to 7 bit. Most contemporary SMPP enabled SMSCs expect by default the message to be in GSM 03.38 (IA5) or other encoding contained in octets (bytes). Some older SMSCs, mainly those that support SMPP version 3.3 expect messages to be 7-bit packed.

Syntax

smpp.7bit-packing=B

Where B is 1 for enabled or 0 for disabled. For example to enable packing to 7 bit following command should be passed:

Example

smpp.7bit-packing=1

smpp.sequence-number

Allows to set initial value of sequence_number field. Library will internally increment the value for every outgoing protocol frame (PDU). The value should be set according to the [SMPP] (4.7.24) or according to the SMSC service provider's instructions.

Syntax

smpp.sequence-number=Nn

Where Nn is decimal number:

Example

smpp.sequence-number=1024

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

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

See Also

smppInitializeSession, smppFinalizeSession

smppFinalizeSession

Logout and finalize communication session on SMPP protocol level.

int smppFinalizeSession();

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

See Also

smppInitializeSession, smppInitializeSessionEx

smppSubmitMessage

Submit message to the SMSC.

int smppSubmitMessage(string Destination, int DTON, int DNPI, string Originator, int OTON, int ONPI, string Content, EncodingEnum Encoding, string UserDataHeader, SubmitOption Options, ref List< string > MessageIDs);

Parameters

Destination
Message recipient identifier. Usually this is mobile phone number (SME Address) in fully qualified format e.g. "48999123456". It may also contain a list of destination addresses when the function is used to submit uniform message to multiple destinations (see Submit to Multiple Destinations for details).
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. 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.
MessageIDs
Message identifier(s) returned by SMSC. Allows to identify status report returned via OnSmppStatusReportReceived. 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 is Command Status of SMPP error code.

Remarks

Function returns after receiving from SMSC a response to the submission operation. If the status report (soRequestStatusReport) request option is set in Options parameter a status report will be asynchronously returned by the OnSmppStatusReportReceived event.

See Also

smppSubmitMessageEx, smppSubmitMessageAsync, smppSubmitData

smppSubmitMessageEx

Submit message to the SMSC with extended parameter set.

int smppSubmitMessageEx(string Destination, int DTON, int DNPI, string Originator, int OTON, int ONPI, string Content, EncodingEnum Encoding, string UserDataHeader, SubmitOption Options, DateTime DeliveryTime, DateTime ValidityPeriod, string ServiceType, int ProtocolID, string ExtendedParameters, ref List< string > MessageIDs);

Parameters

Destination
Message recipient identifier. Usually this is mobile phone number (SME Address) in fully qualified format e.g. "48999123456". It may also contain a list of destination addresses when the function is used to submit uniform message to multiple destinations (see Submit to Multiple Destinations for details).
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.
DeliveryTime
Sets the message delivery time. Works according to the Options parameter. If Options parameter contains the flag soDeliveryTimeRelative then the delivery time is considered relative to the submission to the SMSC. If the Options parameter contains the flag soDeliveryTimeAbsolute then the delivery time is considered absolute in the machine local time zone and converted to UTC. 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.
ValidityPeriod
Sets the message validity time. Works according to the Options parameter. If Options parameter contains the flag soValidityPeriodRelative then the message validity time is considered relative to the time when message is submitted to to the SMSC. If Options parameter contains the flag soValidityPeriodAbsolute then the message validity time is considered absolute in the machine local time zone and converted to UTC. 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.
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.
ProtocolID
Allows to set the SMPP submit_sm parameter protocol_id. Parameter is required by some service providers. For more information see SMPP (5.2.13).
MessageIDs
Message identifier(s) returned by SMSC. Allows to identify status report returned via OnSmppStatusReportReceived. 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 is Command Status of SMPP error code.

Remarks

Function returns after receiving from SMSC a response to the submission operation. If the status report (soRequestStatusReport) request option is set in Options parameter a status report will be asynchronously returned by the OnSmppStatusReportReceived event.

See Also

smppSubmitMessage, smppSubmitMessageAsync, smppSubmitData

smppSubmitMessageAsync

Submit message in asynchronous mode.

int smppSubmitMessageAsync(string Destination, int DTON, int DNPI, string Originator, int OTON, int ONPI, string Content, EncodingEnum Encoding, string UserDataHeader, SubmitOption Options, DateTime DeliveryTime, DateTime ValidityPeriod, string ServiceType, int ProtocolID, string ExtendedParameters, ref List< uint > SequenceNumbers);

Parameters

Destination
Message recipient identifier. Usually this is mobile phone number (SME Address) in fully qualified format e.g. "48999123456". It may also contain a list of destination addresses when the function is used to submit uniform message to multiple destinations (see Submit to Multiple Destinations for details).
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.
DeliveryTime
Sets the message delivery time. Works according to the Options parameter. If Options parameter contains the flag soDeliveryTimeRelative then the delivery time is considered relative to the submission to the SMSC. If the Options parameter contains the flag soDeliveryTimeAbsolute then the delivery time is considered absolute in the machine local time zone and converted to UTC. 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 1st 2000. Maximum time span that can be passed as relative parameter is 30 days 23 hours and 59 seconds.
ValidityPeriod
Sets the message validity time. Works according to the Options parameter. If Options parameter contains the flag soValidityPeriodRelative then the message validity time is considered relative to the time when message is submitted to to the SMSC. If Options parameter contains the flag soValidityPeriodAbsolute then the message validity time is considered absolute in the machine local time zone and converted to UTC. 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 1st 2000. Maximum time span that can be passed as relative parameter is 30 days 23 hours and 59 seconds.
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.
ProtocolID
Allows to set the SMPP submit_sm parameter protocol_id. Parameter is required by some service providers. For more information see SMPP (5.2.13).
SequenceNumbers
Identifier(s) of the transaction with the SMSC. Allows matching the submission with return code provided by the OnSmppSubmitResponseAsyncReceived 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 is Command Status of SMPP error code.

Remarks

Function returns immediately after submitting the message to the SMSC. MessageID required to match appropriate Stetus Report is returned via OnSmppSubmitResponseAsyncReceived event.

See Also

OnSmppSubmitResponseAsyncReceived, smppSubmitMessage, smppSubmitMessageEx, smppSubmitData

smppSubmitData

Submit data message to the SMSC.

int smppSubmitData(string Destination, int DTON, int DNPI, string Originator, int OTON, int ONPI, string Data, SubmitOption Options, string ServiceType, string ExtendedParameters, ref string MessageID);

Parameters

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.
Data
Hexadecimally encoded binary data.
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.
MessageID
Message identifier returned by SMSC. Allows to identify status report returned via OnSmppStatusReportReceived event for the message. The value is returned by reference during the function call which means that a reference to variable has to be passed.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code Positive value is Command Status of SMPP error code.

Remarks

Function returns after receiving from SMSC a response to the submission operation. If the status report (soRequestStatusReport) request option is set in Options parameter a status report will be asynchronously returned by the OnSmppStatusReportReceived event.

See Also

smppSubmitMessage, smppSubmitMessageEx, smppSubmitMessageAsync

smppQueryMessage

Query status of the message in SMSC queue.

int smppQueryMessage(string MessageID, ref uint SequenceNumber);

Parameters

MessageID
Message identifier returned by SMSC in one of message submission functions (smppSubmitMessage, smppSubmitMessageEx, smppSubmitMessageAsync and smppSubmitData).
SequenceNumber
Identifier of the transaction with the SMSC. Allows matching the submission with return code provided by the OnSmppQueryResponseReceived event.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

See Also

OnSmppQueryResponseReceived

smppCancelMessage

Remove message from the SMSC queue, providing it has not been delivered to the time.

int smppCancelMessage(string MessageID, ref uint SequenceNumber);

Parameters

MessageID
Message identifier returned by SMSC in one of message submission functions (smppSubmitMessage, smppSubmitMessageEx, smppSubmitMessageAsync and smppSubmitData).
SequenceNumber
Identifier of the transaction with the SMSC. Allows matching the submission with return code provided by the OnSmppCancelResponseReceived event.

Returns

If the function succeeds, the return value is zero. Negative return value means Internal Error Code. Positive value is Command Status of SMPP error code.

See Also

OnSmppCancelResponseReceived

Events

OnTcpDisconnected

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

public delegate void tcpDisconnectedEvent(Object 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 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

OnTcpDisconnected, tcpDisconnect

OnSmppRAWReceived

Event triggered on non interpreted (RAW) message receive.

public delegate void smppRAWReceivedEvent(Object 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.

uint 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 type of particular SMPP message which indicates what operation data is contained within Protocol Data Unit (PDU).
int CommandStatus
Indicates the success or failure of an SMPP request. It is relevant only in the SMPP response message. Takes values as per the protocol documentation SMPP (5.2.28). The full list of the error codes is provided in the chapter Error Codes at the end of this manual.
string Payload
Protocol Data Unit (PDU) contains of header (which contains Sequence Number, Command ID and Command Status) and message data. This property contains message data part in hexadecimal representation (each two hexadecimal digits represent one byte of data).

See Also

smppSendRAW

OnSmppMessageReceived

Event triggered on message being received from the SMSC.

public delegate void smppMessageReceivedEvent(Object Sender, smppMessageReceivedEventArgs e);

Description

This event will occur both in the situation of receiving messages previously stored in the SMSC's queues as well as messages received while the component is connected to the SMSC.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

string Destination
Usually this is mobile phone number in canonical format.
int DTON
Integer value denoting Type Of Number.
int DNPI
Integer 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
Integer value denoting Type Of Number.
int ONPI
Integer value denoting Numbering Plan Identifier.
string Content
This can be ASCII characters string or hexadecimally encoded binary content. This value should be interpreted according to the value of Encoding parameter.
EncodingEnum Encoding
Possible values as per EncodingEnum type definition.
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.
string ServiceType
Returns the value of SMPP's deliver_sm message parameter service_type. Parameter is used by some service providers. For more information see SMPP (5.2.11).
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.tlv.its_session_info

Allows to add/extract value of its_session_info to/from SMPP protocol PDU optional parameters (TLVs).

Optional parameters are binary extensions to SMPP protocol used to carry additional information, flags etc. All the optional parameters are extracted as smpp.tlvs field in binary format. This field acts only on its_session_info flag for easier implementation of USSD service applications.

Syntax

smpp.tlv.its_session_info=HHHH

Where HHHH is hex-encoded two octet value defined as in [SMPP] (4.8.4.34).

Example

smpp.tlv.its_session_info=00E1

smpp.tlv.ussd_service_op

Allows to add/extract value of ussd_service_op to/from SMPP protocol PDU optional parameters (TLVs).

Optional parameters are binary extensions to SMPP protocol used to carry additional information, flags etc. All the optional parameters are extracted as smpp.tlvs field in binary format. This field acts only on ussd_service_op flag for easier implementation of USSD service applications.

Syntax

smpp.tlv.ussd_service_op=HH

Where HH is hex-encoded byte value defined as in [SMPP] (4.8.4.64).

Example

smpp.tlv.ussd_service_op=0A

OnSmppMessageCompleted

Event triggered on multipart message is reconstructed.

public delegate void smppMessageCompletedEvent(Object Sender, smppMessageCompletedEventArgs e);

Description

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

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

string Destination
Usually this is mobile phone number in canonical format.
int DTON
Integer value denoting Type Of Number.
int DNPI
Integer 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
Integer value denoting Type Of Number.
int ONPI
Integer value denoting Numbering Plan Identifier.
string Content
This can be ASCII characters string or hexadecimally encoded binary content. This value should be interpreted according to the value of Encoding parameter.
EncodingEnum Encoding
Possible values as per EncodingEnum type definition.
string UserDataHeader
If the message completed 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.
string ServiceType
Returns the value of SMPP's deliver_sm message parameter service_type. Parameter is used by some service providers. For more information see SMPP (5.2.11).
string ExtendedParameters
Allows to retrieve the additional parameters from the message completed. For the description and syntax of parameters that can be retreived this way see Extended Parameters.

smpp.tlv.its_session_info

Allows to add/extract value of its_session_info to/from SMPP protocol PDU optional parameters (TLVs).

Optional parameters are binary extensions to SMPP protocol used to carry additional information, flags etc. All the optional parameters are extracted as smpp.tlvs field in binary format. This field acts only on its_session_info flag for easier implementation of USSD service applications.

Syntax

smpp.tlv.its_session_info=HHHH

Where HHHH is hex-encoded two octet value defined as in [SMPP] (4.8.4.34).

Example

smpp.tlv.its_session_info=00E1

smpp.tlv.ussd_service_op

Allows to add/extract value of ussd_service_op to/from SMPP protocol PDU optional parameters (TLVs).

Optional parameters are binary extensions to SMPP protocol used to carry additional information, flags etc. All the optional parameters are extracted as smpp.tlvs field in binary format. This field acts only on ussd_service_op flag for easier implementation of USSD service applications.

Syntax

smpp.tlv.ussd_service_op=HH

Where HH is hex-encoded byte value defined as in [SMPP] (4.8.4.64).

Example

smpp.tlv.ussd_service_op=0A

OnSmppSubmitResponseAsyncReceived

Event triggered on receive of message submission confirmation in asynchronous mode.

public delegate void smppSubmitResponseAsyncReceivedEvent(Object Sender, smppSubmitResponseAsyncReceivedEventArgs e);

Description

The event informs about the response to the message, submitted via smppSubmitMessageAsync function. It should be implemented only if smppSubmitMessageAsync is used.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

uint SequenceNumber
Identifier of the submit transaction with the SMSC. Allows matching the submission result returned by the event with message submitted using the
int Status
Value has the same meaning as the return value of the smppSubmitMessage, smppSubmitMessageEx andfunctions.
See SMPP error codes chapter Command Status section for list of possible values.
string MessageID
String identifier, consistent with the message identifier received from the smppSubmitMessage, smppSubmitMessageEx and smppSubmitData functions.

See Also

smppSubmitMessageAsync

OnSmppStatusReportReceived

Event triggered on receive of status report.

public delegate void smppStatusReportReceivedEvent(Object Sender, smppStatusReportReceivedEventArgs e);

Description

The event informs about receive of a message delivering status report from the SMSC.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

string MessageID
String identifier, consistent with the message identifier received from the smppSubmitMessage, smppSubmitMessageEx and smppSubmitData functions.
string Destination
Usually this is mobile phone number in canonical format. The parameter should be set in accordance with the SMSC operator's instructions.
int DTON
Value denoting Type Of Number.
int DNPI
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
Value denoting Type Of Number.
int ONPI
Value denoting Numbering Plan Identifier.
int MessageState
See SMPP error codes chapter Message State section for list of possible values.
int NetworkErrorCode
See SMPP error codes chapter Network Error Code section for list of possible values.
string Content
Message contained in status report, if encoded according to SMPP (Appendix B), may contain additional information about message delivery.
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.

OnSmppQueryResponseReceived

Event triggered on receive of response to smppQueryMessage function.

public delegate void smppQueryResponseReceivedEvent(Object Sender, smppQueryResponseReceivedEventArgs e);

Description

The event informs about the response to the message, submitted via smppQueryMessage function.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

uint SequenceNumber
Identifier of the submit transaction with the SMSC. Allows matching the result returned by the event with command started with smppQueryMessage function.
string MessageID
String identifier, consistent with the message identifier received from the smppSubmitMessage, smppSubmitMessageEx, smppSubmitData functions.
DateTime FinalDate
Date and time according to the SMSC configuration standard.
int MessageState
Message delivery status assigned to the message on final operation. Equivalent of MessageState parameter returned by StatusReportReceived event. It takes values as per the protocol documentation SMPP (5.2.28). The full list of the error codes is provided in the chapter Error Codes at the end of this manual.
int NetworkErrorCode
Failure reason assigned to the message on final operation. It takes values as per the protocol documentation SMPP (5.3.2.31). Equivalent of NetworkErrorCode parameter returned by StatusReportReceived event.

See Also

smppQueryMessage

OnSmppCancelResponseReceived

Event triggered on receive of response to smppCancelMessage function.

public delegate void smppCancelResponseReceivedEvent(Object Sender, smppCancelResponseReceivedEventArgs e);

Description

The event informs about the response to the message, submitted via smppCancelMessage function.

Parameters

Sender

Object sending the event.

e

Object encapsulating event parameters.

uint SequenceNumber
Identifier of the submit transaction with the SMSC. Allows matching the result returned by the event with command started with smppCancelMessage function.
int Status
Operation status. Takes values as per the protocol documentation SMPP (5.2.28). The full list of the error codes is provided in the Error Codes part.

See Also

smppCancelMessage

OnSmppTraceProtocol

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

public delegate void smppTraceProtocolCallback(Object 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.

string FromAddress
Colon separated IP address and port number (IP:Port).
string ToAddress
Colon separated IP address and port number (IP:Port).
uint CommandID
This field identifies type of particular SMPP message which indicates what operation data is contained within Protocol Data Unit (PDU).
uint 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).

Properties

Connected

Returns information on connection state.

public bool Connected { get; }

Description

If property is true then connection state on TCP/IP level is connected. If property is false then connection has been disconnected on TCP/IP level. Property is useful in implementing various reconnect scenarios.

See Also

tcpConnect, tcpDisconnect

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.

ResponseTimeOut

Communication timeout.

public int ResponseTimeOut { get; set; }

Description

Time in seconds, which determines maximum time the component will wait for response from the SMSC. It concerns all protocol level functions. After this time the function returns error code denoting operation timeout.

ImmediateResponse

Status report confirmation mode.

public bool ImmediateResponse { get; set; }

Description

Property decides whether OnSmppStatusReportReceived event confirms receive of the status report to the SMSC before (true) or after (false) execution of user code in the event handler. If the report is confirmed before SMSC may initiate another status report delivery faster. Contrarywise in the report is confirmed after, if user code inside event fails the status report is not confirmed and will be repeated by the SMSC within some time.

ThrottleRate

Message throttling limit parameter.

public int ThrottleRate { get; set; }

Description

Determines maximum rate of messages submitted to the SMSC per second. If set to any value above 0 component counts number of messages submitted and limits the rate by waiting appropriate time inside smppSubmitMessage, smppSubmitMessageEx, smppSubmitMessageAsync and smppSubmitData functions. If the value is set to zero component does not limit the rate of messages submitted.