MessageIn Event

This event is fired upon receipt of a message.

Syntax

ANSI (Cross Platform)
virtual int FireMessageIn(SMPPMessageInEventParams *e);
typedef struct {
const char *SourceAddress;
const char *ScheduleDeliveryTime;
const char *ValidityPeriod;
const char *Message;
int MessagePart;
int MessagePartCount;
int MessagePartReference;
const char *DestinationAddress;
int ResponseErrorCode; int reserved; } SMPPMessageInEventParams; Unicode (Windows) virtual INT FireMessageIn(SMPPMessageInEventParams *e);
typedef struct {
LPCWSTR SourceAddress;
LPCWSTR ScheduleDeliveryTime;
LPCWSTR ValidityPeriod;
LPCWSTR Message;
INT MessagePart;
INT MessagePartCount;
INT MessagePartReference;
LPCWSTR DestinationAddress;
INT ResponseErrorCode; INT reserved; } SMPPMessageInEventParams;
- (void)onMessageIn:(NSString*)sourceAddress :(NSString*)scheduleDeliveryTime :(NSString*)validityPeriod :(NSString*)message :(int)messagePart :(int)messagePartCount :(int)messagePartReference :(NSString*)destinationAddress :(int*)responseErrorCode;
#define EID_SMPP_MESSAGEIN 5

virtual INT IPWORKS_CALL FireMessageIn(LPSTR &lpszSourceAddress, LPSTR &lpszScheduleDeliveryTime, LPSTR &lpszValidityPeriod, LPSTR &lpszMessage, INT &iMessagePart, INT &iMessagePartCount, INT &iMessagePartReference, LPSTR &lpszDestinationAddress, INT &iResponseErrorCode);

Remarks

When a message is received, the SMPP class will parse the sender's message into the SourceAddress, ScheduleDeliveryTime, ValidityPeriod, and Message fields.

The SourceAddress parameter is the address of the originator of the message.

The DestinationAddress parameter holds the address of the recipient.

The ScheduleDeliveryTime parameter is the delivery time which the short message is scheduled to be forwarded to another MC. This will be an empty string if not scheduled.

The ValidityPeriod parameter is only applicable if this short message is being forwarded to another MC. When this occurs, it specifies how long the receiving MC should retain the SM and continue trying to deliver it. This will be an empty string if the current validity period is unavailable.

The Message parameter is the plaintext portion of the message body.

If the incoming message is a part of a larger message (the message was split up into several parts), the MessagePartCount, MessagePart, and MessagePartReference parameters will be set. MessagePartCount will hold the total number of parts for the message. MessagePart will indicate the current part's location in the message to determine the order when re-assembling the message. This will be a value from 1 to MessagePartCount. MessagePartReference holds a reference value that will be the same across all parts for the message.

The ResponseErrorCode parameter may be set to return an error condition to the server. This corresponds to the command_status protocol level field of the response.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]