/client

Delivery Time and Validity Period

Delivery Time and Validity Period submit parameters

Delivery Time allows to control the moment the message is sent to the final destination (e.g. mobile handset). Validity Period determines how long the message is considered valid for delivery - if the message cannot be delivered for the specified amount of time it is reported as undelivered.

Both Delivery Time and Validity Period can be set either as absolute or relative.

Absolute

Setting any of these to absolute means that the date and time passed is considered the exactly date and time at which the message is supposed to be delivered or when the message is about to expire.

It is important to remember that local date and time may be existing in different Time Zone than that of the SMSC. Date and time passed must match Time Zone of the SMSC to act effectively.

SMPP protocol example below demonstrates setting Delivery Time to some arbitrary date and time:


int options;
DateTime delivery;

// [...]

options |= (int)SubmitOptionEnum.soDeliveryTimeAbsolute;

delivery = new DateTime(2014, 5, 14, 7, 40, 00);

result = clientSMPP.SubmitMessageEx("48999123456", 1, 1,
  "79123", 1, 1, smContent, EncodingEnum.et7BitText, "", 0,
  delivery, DateTime.now, "", 0, "", messageID);

Availability of absolute delivery time and validity period functionality may be limited by SMSC configuration or policies.

Relative

Setting any of these parameters to relative means that it is considered relative to the date and time when the SMSC received the message to submit. For example setting the Validity Period to 10 minutes means that if SMSC will be unable to deliver the message within 10 minutes from the moment it has been submitted it will be cancelled and reported as undelivered.

Relative time is calculated by subtracting 2000.01.01 00:00:00 from the value passed as parameter's value. So effectively it means that it 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.

SMPP protocol example below demonstrates setting Validity Period to 10 minutes relative to the moment SMSC receives the message to submit:


int options;
DateTime validity;

// [...]

options |= (int)SubmitOptionEnum.soValidityPeriodRelative;

validity = new DateTime(2000, 1, 1, 0, 10, 00);

result = clientSMPP.SubmitMessageEx("48999123456", 1, 1,
  "79123", 1, 1, smContent, EncodingEnum.et7BitText, "", 0,
  DateTime.now, validity, "", 0, "", messageID);

Availability of relative delivery time and validity period functionality may be limited by SMSC configuration or policies.

Parameters are only passed to the SMSC if either of two flags soDeliveryTimeAbsolute, soDeliveryTimeRelative respectively for Delivery Time and/or soValidityPeriodAbsolute, soValidityPeriodRelative for Validity Period is set in Options parameter. If none of these parameters is set then SMSC defaults are assumed.

See Also

smppSubmitMessage, smppSubmitMessageEx, smppSubmitMessageAsync