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
tcp.localport
tls.enabled
tls.checks
tls.protocols
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
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
smpp.smsc-encoding
smpp.7bit-packing
smpp.sequence-number
smpp.address-range
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
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
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
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
smpp.tlv.ussd_service_op
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
smpp.tlv.ussd_service_op
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
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
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
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
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.